FoundationsTPythonVersions

Differences between revisions 9 and 10
Revision 9 as of 2012-03-30 20:21:44
Size: 6120
Editor: mail
Comment:
Revision 10 as of 2012-03-30 21:32:55
Size: 4592
Editor: mail
Comment:
Deletions are marked like this. Additions are marked like this.
Line 50: Line 50:
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.
Python3 packaging is covered in this [[http://wiki.debian.org/Python/LibraryStyleGuide|packaging best practices guide]]. However {{{dh_auto-*}}} doesn't yet support Python 3. There's was a Debian GSoC project to write a new tool before fixing {{{dh}}} (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 may be non-trivial.
Line 73: Line 57:
 * https://blueprints.launchpad.net/ubuntu/+spec/foundations-q-python-versions
 * https://blueprints.launchpad.net/ubuntu/+spec/foundations-p-python-versions
Line 78: Line 64:
https://wiki.ubuntu.com/MaverickMeerkat/TechnicalOverview/Python
Line 82: Line 66:

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

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

Python 3 packaging

Python3 packaging is covered in this packaging best practices guide. However dh_auto-* doesn't yet support Python 3. There's was a Debian GSoC project to write a new tool before fixing dh (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 may be non-trivial.

Historical reference

As mentioned, we've actually been working on this spec since the Maverick days. Here is some historical information from the whiteboard:

See also this wiki page for detailed background:

Full UDS-O session notes: http://pad.ubuntu.com/uds-o-foundations-o-python-versions

Python/FoundationsTPythonVersions (last edited 2013-11-15 21:49:11 by mail)