![]() |
#1 |
Deviser
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,265
Karma: 2090983
Join Date: Aug 2013
Location: Texas
Device: none
|
Python 3, Polyglot & @six.wraps
Kovid,
Should I add a local copy of wraps from six.py to my plugins that use it, or is adding it to Polyglot something that is already planned for the future since Calibre uses wraps quite a bit itself? Thanks. DaltonST |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,258
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
As far as I know, wraps exists in python 2.7. So you should just be able to useit as is.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
six.wraps was added in https://github.com/benjaminp/six/com...1debafb8138484 (in version 1.7.0)
Do you actually need the functionality it is providing (the __wrapped__ attribute)? More generally, you can guarantee that all versions of calibre come with some version of six.py bundled. Through 2.15.0, six was vendored in calibre itself, after that it was always a required part of the binary install due to being a dependency of dateutil (which calibre directly uses). calibre 1.48.0 -- 2.15.0: six 1.4.1 calibre 2.16.0 -- 2.85.0: six 1.7.2 # has six.wraps calibre 3.0.0 -- current: six 1.10.0 If you're going to rely on polyglot, it was first added in 3.32.0, and most of the useful bits were added in 3.41.0 -- so, here is the question: what would you want your minimum supported version of calibre to be? If you're okay dropping Qt4/Windows XP support, you don't need to support 1.48, so at that point there's no reason not to require at least 2.85. ... When we are ready to start python3 betas, I'll give people a recap of what their options are in terms of backwards-compat, and what utility methods are available for bridging the gap. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Python 2 to Python 3, Polyglot & Plugins | DaltonST | Calibre | 18 | 04-24-2019 12:10 AM |
Python error & now Book Details is on the Side | wildoatz | Devices | 4 | 06-27-2017 08:46 PM |
Python + PyQt enviroment for Kindle & PaperWhite devices. | bosito7 | Kindle Developer's Corner | 8 | 11-26-2016 03:43 AM |
KTerm & Python Issues | aBP | Kindle Developer's Corner | 4 | 02-10-2016 05:23 PM |
Controlling wraps in epubs | Iznogood | ePub | 4 | 11-01-2011 11:54 AM |