Switching to Python 3

Toshio Kuratomi a.badger at gmail.com
Fri Aug 3 16:19:32 UTC 2012


On Fri, Aug 03, 2012 at 03:55:26AM -0400, Bohuslav Kabrda wrote:
> ----- Original Message ----- (From Nick)
> > 
> > I believe Fedora uses Python for more core OS infrastructure than
> > Ubuntu
> > does, so it's a bigger migration challenge. Does anaconda run on
> > Python
> > 3? Does yum?
> > 
> 
> Well, I believe they don't. But if noone pushes them, they never will. I think that a decision needs to be made when the transition will happen, so that these projects have a time frame, in which they need to adapt to Python 3.
> 
I suggest that you start by asking nicely what things need to be done to
port those things to python2 and then go to work on doing them.  Trying to
force a change via the Feature process is reversing the order of things.
Features don't exist to force other people to do work.  Features exist to
showcase and coordinate the work that you are doing.

For the package management stack, I know that one big blocker is that pycurl
doesn't have a python3 port.  There's a patch out there to add it (complete
with reference counting leaks and other bugs :-(  but pycurl upstream seems
dead.  So one of the very first steps would be for someone to take over
pycurl upstream maintainance and add python3 support.  (And then start
fixing reference leaks and other bugs in both the python2 and python3
bindings).

> > It's that delta of Python applications that Fedora ships as required
> > components in the base OS, but Ubuntu does not, that will potentially
> > cause problems.
> > 
> 
> Sure, it will cause problems. But it will cause them eventually. Fedora 19 may be too soon (personally I think it's not), but we should really start pushing the various projects to actually start doing something about Python 3.
> 
The best way to push is to work with projects to port their code.  I think
talking to the projects that require python2 that are in the LiveCDs and the
install DVDs and porting the libraries that they require to be buildable as
both python2 and python3 modules would be a sensible first step.  Then work
on porting the applications themselves.  Along the way, you can figure out
some important milestones to call out in Features.  "The 100 python3 library
port challenge -- Fedora Contributors helped port 100 python libraries to
python3",  "50% python3 in distro -- half of all python modules that are
packaged are now python3 capable", "python3 package management stack -- our
package manager is now running on python3 instead of python2"

One thing to watch out for is that once you start porting applications, the
live images and install dvds will start requiring python3.  If you aren't
careful, some releases may end up requiring both python2 and python3.  This
is something that would need to be coordinated with the spins as well as the
applications you're porting to figure out what is okay as a size constraint.
You may end up having to maintain a parallel python3 branch for many
applications until all of the applications on an image are ported to
python3.

-Toshio
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.fedoraproject.org/pipermail/python-devel/attachments/20120803/b6ea16da/attachment.sig>


More information about the python-devel mailing list