FoundationsPPythonVersions
Shipping Python 3 on the 12.04 LTS CD
Originally, this spec said "shipping only Python 3 on the 12.04 LTS CD". Okay, that's pretty ambitious, and it's not going to happen for 12.04 LTS. This is basically work we've tried to do for several cycles leading up to 12.04, and our goal is now the more modest one of porting at least one desktop application, including its full dependency stack, to Python 3 for inclusion on the CD images. We'll claim some space for Python 3 that way (mitigated by the removal of Python 2.6 from 12.04), and we'll learn a lot about the porting process, i.e. what don't we know?
The ultimate goal is really to relegate Python 2 to universe for 14.04 LTS.
The blueprint contains the work items and some additional details. This wiki page will be used to further specific the task for 12.04.
Plan
The plan is to identify a handful of desktop applications included on the default install, follow their dependency stack, and investigate whether their upstreams already support Python 3 (either in a released version, a development branch, or fork). For those which have no upstream support yet, we have several choices:
- Find an alternative that does already support Python 3
- Encourage and help upstream to do the port
- Port it ourselves and contribute to upstream
- Fork or rewrite from scratch
Candidates for Python 3 porting:
- Software Center (LP: #823254)
- Update Manager
- Jockey
- gwibber backend
- Computer Janitor
There is no plan to make Python 3 the default /usr/bin/python. See for upstream policy on this.
Known blockers
python-dbus (some porting work already started by barry)
- xapian
- gstreamer
Warning: Ubuntu Software Center currently plans to stay on Python 2.7. dbus and xapian are the main blockers to moving to Python 3. Talk to Michael Vogt for more details. —mpt
Resources
There were discussions with Fedora at PyCon 2011
Python 3 packaging
Python3 packaging is covered in the packaging guide. However dh_auto-* doesn't support it yet. There's was a Debian GSoC project to write a new tool before fixing dh and CDBS (python-multibuild tool to be later integrated). It needs work (Piotr in debian-python is leading this now). Until this lands, we should just continue using overrides in the meantime. Distutils packages can override these easily, however other packages are non-trivial.
Distutils Example: http://paste.ubuntu.com/606872/
Piotr is a little concerned about the reliability of using overrides:
12:48 < slangasek> POX: do you mean that the implementation in Debian today is not mature enough? 12:48 < ScottK> If we do it focused on using the Debian python3 tools/policy does that mitigate your concern? 12:48 < POX> slangasek: no, implementation is missing 12:48 < POX> that's my point 12:49 < slangasek> ah 12:49 < ScottK> If we are only supporting one python3 version, what's missing? 12:49 < POX> well, if you will drop these overrides later, maybe it's not that a big problem 12:49 < ScottK> That would be the plan.
We don't know how much python3 is used in production yet. barry doesn't think we'll run into any major issues in python itself. However python3 ports are still pretty green. We can expect a few issues in ports, these are the real risks.
Historical reference
As mentioned, we've actually been working on this spec since the Maverick days. Here is some historical information from the whiteboard:
https://blueprints.launchpad.net/ubuntu/+spec/foundations-m-python-2.7
https://blueprints.launchpad.net/ubuntu/+spec/foundations-m-python-3
See also this wiki page for detailed background:
https://wiki.ubuntu.com/MaverickMeerkat/TechnicalOverview/Python
Full UDS-O session notes: http://pad.ubuntu.com/uds-o-foundations-o-python-versions
Work items (oneiric):
- [barry] Ensure that 3.1 is gone: DONE
[barry] look at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=622279 for blockers which we could apply resources to to help unblock: DONE
- [allison] take transition discussion to DEX: DONE
- [barry] research python3 disk usage for CDs. (Size estimate of python3 binary plus duplicates of all current python 2 packages, or at least the ones that have been ported to 3): DONE
- [kate.stewart] at the june rally: reassess adding Python3 or python3 only on the CD: DONE
Since 2.6 will not be in 12.04, the Launchpad team wants a 10.04 PPA with Python 2.7 in it so that they can transition to 2.7 before transitioning to 12.04. This is available here: https://launchpad.net/~pythoneers/+archive/lts
Python/FoundationsPPythonVersions (last edited 2011-11-09 20:31:10 by mail)