Wandering Thoughts archives

2020-10-19

What versions of PyPy I can use (October 2020 edition)

We have to do something about our Python 2 programs, especially on our Ubuntu machines where Python 2 may be gone entirely in Ubuntu 22.04 (which is now less than two years away, and we move slowly). One way to keep Python 2 programs running is with PyPy, and PyPy can potentially also be used to speed up Python 3 programs (well, long running ones). Thinking about various things to do with PyPy makes me curious as to what versions of it I can use on the various systems I care about.

On Fedora 32, PyPy is at 7.3.1 (Fedora 31 is at 7.1.1, but I should upgrade all my machines). Both Python 3 and Python 2 versions are available. On Ubuntu, PyPy is at version 7.3.1 on 20.04, 5.10.0 on 18.04, and 5.1.2 on 16.04. Ubuntu 16.04 is pretty much irrelevant at this point, since it goes out of support in less than six months. Only Ubuntu 20.04 has a 'pypy3' package; 16.04 and 18.04 don't.

PyPy 7.3.1 (on my Fedora machines) reports that its Python 2 is 2.7.13 and its Python 3 version is 3.6.9, which could be worse. The Ubuntu 18.04 PyPy 5.10.0 also reports that it's Python 2.7.13; the Ubuntu 16.04 PyPy 5.1.2 says it's Python 2.7.10. This is somewhat behind everyone's actual version of Python 2.7, where Ubuntu 16.04 has Python 2.7.12, 18.04 has 2.7.17, and 20.04 has 2.7.18rc1 (Fedora 32 has the release version of 2.7.18). In practice probably no one cares that much about sub-versions of Python 2.7; there hasn't exactly been lots of change there.

(For my own reference if nothing else, see new features added to Python 2.7 maintenance releases. I'm not sure if this completely covers changes to the standard library, but I think the Python people have been trying to keep those down in 2.7 for the obvious reasons.)

I'm somewhat surprised that Ubuntu 18.04 has no Python 3 version of PyPy, because according to the PyPy 5.10 release notes it supported both. PyPy 5.10 only supposed Python 3.5, but then Ubuntu 18.04 has Python 3.6.9, so the Python 3 versions aren't all that far apart. Perhaps Ubuntu thought that the Python 3 support in PyPy wasn't quite ready to be shipped as part of a LTS release, or perhaps it just wasn't on their radar then.

We'd likely see speed improvements in newer PyPy releases, but for just running undemanding Python 2 programs I think any of these versions of PyPy are probably good enough. If speed matters we probably want to be using PyPy on Ubuntu 20.04.

(We have one or two Python programs that can do enough work that they might benefit from PyPy. Unfortunately they're Python 3 programs that run on machines that will probably not be upgraded to 20.04 for various reasons.)

MyPyPyVersions2020-10 written at 00:52:53; Add Comment


Page tools: See As Normal.
Search:
Login: Password:
Atom Syndication: Recent Pages, Recent Comments.

This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.