Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev <gentoo-dev@l.g.o>
Cc: python <python@g.o>
Subject: [gentoo-dev] [RFC] Python 2.7 & PyPy 2.7
Date: Tue, 19 Nov 2019 14:30:40
Message-Id: 94ed9a2e16d2d42949cdf6dc0f9915624e099f12.camel@gentoo.org
Hi,

TL;DR: I'd like to propose starting to eliminate PyPy2.7 support
in packages soonish, and non-critical features for Python 2.7.


As you probably already know, Python 2.7 is going EOL by the end
of the year [1].  Upstream is planning to make one more security release
mid-April but that's it.  I don't think we're going to remove
the interpreter itself anytime soon but...

A growing number of projects are dropping support for Python 2
and starting to be 3-only [2].  Of big influential packages this
includes IPython, pytest, sphinx, tox.  The packages in the middle have
huge numbers of revdeps.  Right now, their users are usually preventing
from downgrading due to py2 revdeps, and our work is becoming
increasingly harder.

Now, PyPy upstream is not planning to kill PyPy2.7 anytime soon [3]. 
However, it will still be affected by packages losing support
for Python 2, and given its compatibility problems existing already,
this will become even worse.  PyPy3 is actually better in both regards.


All this considered, I'd like to propose the following:

1. We'd keep Python 2.7 and PyPy 2.7 interpreters for as long as we can
feasibly can.  Even after the last upstream release, we should be able
to keep it as long as people supply patches to keep it working.

2. We'd start sunsetting PyPy 2.7 support in packages real soon.  It's
quite a hassle already, due to its incompatibilities with CPython 2.7,
and we just don't have the manpower to keep supporting it.  PyPy 3.*
target will continue being supported.

3. We'd start sunsetting Python 2.7 for non-critical features.  For
example, packages using Sphinx to build documentation will slowly start
requiring Python 3.x to do that.  This will make it possible for more
people to upgrade to newer package versions, without py2 revdeps holding
them back.

4. Once PyPy2.7 target is gone and more packages lose py2 support, we'd
remove Python 2.7 from default PYTHON_TARGETS.  Py2-only packages will
now get 2.7 implicitly enabled via IUSE defaults (as the only target
available), and their deps can have them enabled via package.use in
profils.


WDYT?


[1] https://www.python.org/dev/peps/pep-0373/#update
[2] https://python3statement.org/#sections40-timeline
[3] https://pypy.readthedocs.io/en/latest/faq.html#how-long-will-pypy-support-python2

-- 
Best regards,
Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature