Xenial Python UOS notes

On 2015-11-04 we had a Ubuntu Online Summit session to discuss the work needed to remove Python 2.7 from the default images/seeds for 16.04 LTS. Collected here are the notes from that session. Specific work items will be tracked on the blueprint below.

For reference:

Feature freeze is the drop dead date for dropping Python 2.7 from the images. We will be hard-nosed about this! Once python2.7 and libpython2.7 are removed from a seed, we'll blacklist them so they can't be accidentally reseeded.

Notes from session

software-center

Plan for 16.04 is to drop software-center in favor of Gnome Software Center with plugins for the Ubuntu store. We should do this asap and lots of things will drop off our list as a result, including oneconf. We will not put effort into porting software-center to Python 3.

ubuntu-sso-client

Robert Ancell will look at switching all uses of ubuntu-sso-client to OAuth so that this can be dropped as well.

landscape-client-ui-install

This can be dropped as it's unsupported.

backups

deja-dup is C code but it depends on duplicity which is currently Python 2.7. Let's drop duplicity and implement an installer in deja-dup to prompt for duplicity install if needed. Michael Terry will do this.

Eventually it would be good to port duplicity to Python 3, but it has significant string/bytes issues that have to be worked out, and it supports plugins so supporting only Python 3 would have implications for them. Probably not all plugins will be ported to Python 3. The code base if fairly old. Upstream won't do the work but would likely accept patches. (This work isn't required for 16.04 but for the longer term goal of demotion of Python 2.7 to universe).

apt-xapian-index

We still need this even after software-center gets dropped because unity (?) still depends on it. This will probably be the most work. One issue is that the Xapian bindings for Python 3 are only supported in Xapian 1.3 which is a development (unreleased) version. The Debian maintainer is also the upstream, and they don't want to package an unreleased version, so currently only Ubuntu has Python 3 bindings in the archive (via python3-xapian1.3). Ubuntu is also carrying a delta against apt-xapian-index which needs to be merged. Barry has started looking at porting apt-xapian-index and it's not entirely trivial, but the work will be continued.

A thread on xapian-discuss starts a conversation about a Xapian 1.4 release. We'll see if their timeline aligns with our needs.

samba & system-config-printer

Samba upstream doesn't want to support both Python 2 and 3 at the same time, citing complexity. There is an open bug in Debian. For now it seems like a similar approach as to be used for duplicity will be invoked, i.e. prompt for install on demand but drop it from the seed. Steve Langasek will investigate.

system-config-printer

system-config-printer is implemented in Python 2 and needs to be ported or dropped (installed on demand?).

CORRECTION: system-config-printer is already switched over to Python 3.

cloud

Python 2 was off the cloud images until the last minute when lxd -> lxc -> cloud-image-utils pulled it back in. Scott Moser will make sure Python 2 is taken back off the cloud images.

server

apt-get purge libpython2.7 shows that just vim is keeping the library on cloud. We need to rebuild vim with just the Python 3 binding.

checkbox

zyga will make sure checkbox is Python 3 clean. Python 2 was only needed for one test which can be dropped.

libpeas

libpeas depends on libpython2.7. seb128 will look into this.

Lubuntu

There's a meta bug for dropping Python 2.7 from Lubuntu.

What about /usr/bin/python shebangs?

Scott Moser's approach. Maybe only needed until we can sunset Precise?

Steve also points to this approach