FoundationsTPythonVersions
5014
Comment:
|
6120
|
Deletions are marked like this. | Additions are marked like this. |
Line 4: | Line 4: |
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? | For many cycles Ubuntu developers have been working on a migration to Python 3. This has taken modest steps leading up to 12.04, with many packages (primarily libraries) getting Python 3 versions upstream, into Debian, and into Ubuntu. Python 3 is not distributed on the Ubuntu 12.04 CD images though, but major milestones have been reached, such as the porting of dbus-python to Python 3.2. With Ubuntu 12.10 (Q cycle), we plan on removing Python 2 from the CD images. Don't worry, Python 2.7 will still be available in the archive, and more specifically 'main' for now. But we want all libraries and applications on the CD (or more specifically, those packages with '''Task: ubuntu-desktop''' (also ''minimal'' and ''standard'') to be running on Python 3. |
Line 8: | Line 10: |
The [[https://blueprints.launchpad.net/ubuntu/+spec/foundations-p-python-versions|blueprint]] contains the work items and some additional details. This wiki page will be used to further specific the task for 12.04. | The [[https://blueprints.launchpad.net/ubuntu/+spec/foundations-p-python-versions|Precise blueprint]] contains work items and some additional details relating to previous (but ongoing) efforts. This wiki page will be used to further specific the task for 12.10. This [[https://docs.google.com/a/canonical.com/spreadsheet/ccc?key=0AiT4gOXSkmapdFA1anRkWERsaXgtWnllUG9QWXhDVWc#gid=0|Google document]] captures the set of packages and leaf applications that still need packaging or porting as of Ubuntu 12.04. This list was generated with the {{{oncd.py}}} script from [[https://code.launchpad.net/~barry/+junk/pydeps|this branch]]. '''WE NEED YOUR HELP!'''. Some packages have Python 3 support upstream but are not yet packages for Ubuntu. Others do not yet have Python 3 support. In those cases we must either help the upstream to land Python 3 support or rewrite our applications to not require the unported dependency. |
Line 30: | Line 34: |
* python-dbus (some porting work [[https://code.launchpad.net/~barry/python-dbus/trunk|already started]] by barry) | |
Line 38: | Line 41: |
* [[https://docs.google.com/a/canonical.com/spreadsheet/ccc?key=0AiT4gOXSkmapdFA1anRkWERsaXgtWnllUG9QWXhDVWc#gid=0|Ubuntu porting status page]] '''-- START HERE''' |
Shipping only Python 3 on the 14.04 LTS CD
For many cycles Ubuntu developers have been working on a migration to Python 3. This has taken modest steps leading up to 12.04, with many packages (primarily libraries) getting Python 3 versions upstream, into Debian, and into Ubuntu. Python 3 is not distributed on the Ubuntu 12.04 CD images though, but major milestones have been reached, such as the porting of dbus-python to Python 3.2.
With Ubuntu 12.10 (Q cycle), we plan on removing Python 2 from the CD images. Don't worry, Python 2.7 will still be available in the archive, and more specifically 'main' for now. But we want all libraries and applications on the CD (or more specifically, those packages with Task: ubuntu-desktop (also minimal and standard) to be running on Python 3.
The ultimate goal is really to relegate Python 2 to universe for 14.04 LTS.
The Precise blueprint contains work items and some additional details relating to previous (but ongoing) efforts. This wiki page will be used to further specific the task for 12.10.
This Google document captures the set of packages and leaf applications that still need packaging or porting as of Ubuntu 12.04. This list was generated with the oncd.py script from this branch. WE NEED YOUR HELP!. Some packages have Python 3 support upstream but are not yet packages for Ubuntu. Others do not yet have Python 3 support. In those cases we must either help the upstream to land Python 3 support or rewrite our applications to not require the unported dependency.
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
- 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
Ubuntu porting status page -- START HERE
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/FoundationsTPythonVersions (last edited 2013-11-15 21:49:11 by mail)