Is it worth back porting PEP 3147 to Python < 3.2?

Barry Warsaw barry at
Tue Apr 20 20:50:17 BST 2010

On Apr 20, 2010, at 10:14 AM, Piotr Ożarowski wrote:

>[Omer Zak, 2010-04-20]
>> My take of the situation:
>> Yes, please backport PEP 3147 to at least Python 2.7.
>> The rationale: we'll need to support both Python 2.x and Python 3.x for
>> several years, and it will be nice if the same library package can be
>> made to support both 2.x and 3.x.
>you cannot (in most cases) share 2.X and 3.X Python code, so adding it
>to 2.7 and not to 2.6 doesn't make sense

Just thinking out loud: How insane would it be to think of an import hook that
could do it at run time?  Or, a compilall switch that would do it when the pyc
file was generated?  You'd need some way to specify that a particular module
could/should not be auto-converted, or conversely if automatic support were
more the exception, some way to say it can be done.  I wonder if something in
the debian/[control|rules] file could trigger that.

>I doubt we'll touch 2.X packages in Debian Squeeze and in Squeeze+1
>we'll most probably have only 1 Python 2.X version (if any) so I don't
>see a point in backporting it in Debian.

Good to know, thanks.

>If you want to ship two 2.X Python versions in Ubuntu, you could use my
>new dh_python for that (I hope to finish it soon), but you'd have to
>convert *all* packages to it and lets face it, python2.5 and python2.6
>transitions in Ubuntu (at least in universe) were...  well not even
>close to Debian's quality and these transitions didn't require that much

Sorry, I don't really know the history of any of that so I can't comment.  But
I would like to know more about your new dh_python, what changes it would
require, etc.  Where can I find it, or information about it?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
Url : 

More information about the ubuntu-devel mailing list