Please port to python3

Bug #1456642 reported by Jeff Huang on 2015-05-19
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
calibre
Undecided
Unassigned

Bug Description

Please port calibre to python3 entirely.

Nope.

 status wontfix

Changed in calibre:
status: New → Won't Fix

@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?

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  Edit
Everyone can see this information.

Other bug subscribers