← Back to team overview

launchpad-dev team mailing list archive

Dropping Python 2 support from server-side-only lazr.* packages


I'm still slightly wary of dropping Python 2 support from lazr.*
packages that are part of launchpadlib's dependency tree, since old
Ubuntu series are still supported and contain Python 2 versions of those
packages.  (Not saying we necessarily have to wait for those old series
to go out of support, just that it seems a less obvious decision.)

However, for packages that are in practice only used on the server side,
specifically as part of Launchpad itself, there doesn't seem much point
retaining Python 2 support now that Launchpad itself is on Python 3.  I
therefore propose that we drop Python 2 support from the following


Some of these are used by other packages outside the Launchpad
ecosystem; for instance, lazr.config and lazr.delegates are used by
Mailman.  I've checked all the reverse library dependencies that show up
on libraries.io for each of these packages (e.g.
https://libraries.io/pypi/lazr.config/dependents) and they all have
Python 3 support, so this doesn't seem too unreasonable, but we should
bump the major version number anyway to be safe.

In most cases this will mainly involve using "pyupgrade --py3-plus" or
similar to remove Python 2 compatibility code; at least lazr.delegates
has some significant extra complexity on top of the usual sort of thing
that can be stripped out once Python 2 support is no longer required.

What do people think?

Colin Watson (he/him)                           [cjwatson@xxxxxxxxxxxxx]

Follow ups