Please port to python3

Bug #1456642 reported by Jeff Huang
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
calibre
Won't Fix
Undecided
Unassigned

Bug Description

Please port calibre to python3 entirely.

Revision history for this message
Kovid Goyal (kovid) wrote : Re: calibre bug 1456642

Nope.

 status wontfix

Changed in calibre:
status: New → Won't Fix
Revision history for this message
James Broadhead (jamesbroadhead) wrote :

@Kovid: Could you expand on this a little please?

Aside from the amount of effort, could you please explain the rationale?

In particular, does this mean that you would reject patches which began to work towards 2/3 cross-compatibility?

Revision history for this message
Kovid Goyal (kovid) wrote :

1) Waaaaay too much work -- calibre has half a MILLION lines of python and python extension code

2) calibre has lots and lots of code that deals with bytes -- network protocols, binary file formats, etc. Python 3 is simply worse than python 2 for this use case. It has a crippled bytes type among other unfelicities.

3) calibre has lots and lots of native code that interfaces with external native code. On windows, all this code uses UTF-16 encoded strings. All that interface code would need to be re-written and would also become less efficient since in python 2 string are stored internall in UTF-16 whereas in python 3 they would need to be cross-converted.

4) There is absolutely nothing in python 3 that makes it worth the effort. If python 3 ever grows something that makes it worth the effort, I will simply backport it to python 2. I already maintain my own python 2 fork for windows (see my github repos).

The only case in which I will accept patches for python 3 is if they have:

a) negligible runtime cost
b) minimal code complexity/maintainability cost
c) Low probability of breakage -- either the patches are dead simply or they come with lots of tests

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.