Page MenuHomePhabricator

Add PyPy 3.11 to Wikimedia CI
Closed, ResolvedPublic

Description

Currently PyPy is available for Wikimedia CI but its PyPy3 release is outdated. It uses

Python 3.9.16 (7.3.11+dfsg-2+deb12u3, Dec 30 2024, 22:36:23)
[PyPy 7.3.11 with GCC 12.2.0]

It cannot be used any longer due to T423568 (Vulnerability found with pytest < 9.0.3) and pytest 9.0.3+ needs Python 3.10 as minimal version. Python 3.9 also reached EOL but PyPy 3.11 is available and should be used by default instead.

So I recommend to install PyPy 3.11 for Wikimedia CI, that PyPy can be tested.

Event Timeline

Xqt renamed this task from Add PyPy > 3.9 to Wikimedia CI to Add PyPy 3.11 to Wikimedia CI.Apr 18 2026, 5:56 AM

The CI image being used would be docker-registry.wikimedia.org/releng/python-all which is defined at https://gerrit.wikimedia.org/g/integration/config/+/refs/heads/master/dockerfiles/python-all/Dockerfile.template

The base image is Debian Bookworm and we install pypi from it (see comment on last line):

RUN pyenv install   2.7 3.9 3.7 3.8 3.10 3.11 3.12 3.13 3.14 \
    && pyenv global 2.7 3.9 3.7 3.8 3.10 3.11 3.12 3.13 3.14 \
    && pyenv versions
# NOTE: pypy is installed from the Debian package

That gives us pypy 7.3.11 which is Python 3.9.16:

$ docker run --rm -it --entrypoint=pypy3 docker-registry.wikimedia.org/releng/python-all --version
Python 3.9.16 (7.3.11+dfsg-2+deb12u3, Dec 30 2024, 22:36:23)
[PyPy 7.3.11 with GCC 12.2.0]

The image has Pyenv 2.6.26 which gives us:

$ /opt/pyenv/pyenv-2.6.26/bin/pyenv install --list|grep -P 'pypy3.11.*(?<!-src)$'
  pypy3.11-7.3.18
  pypy3.11-7.3.19
  pypy3.11-7.3.20

Thus we can stop using the Debian package for pypy and instead use Pyenv to ship pypy3.11-7.3.20?

Change #1295865 had a related patch set uploaded (by Hashar; author: Hashar):

[integration/config@master] dockerfiles: add support for Pypy Python 3.11

https://gerrit.wikimedia.org/r/1295865

Change #1296604 had a related patch set uploaded (by Hashar; author: Hashar):

[integration/config@master] jjb: update python jobs for Pypy/Python3.11

https://gerrit.wikimedia.org/r/1296604

Change #1295865 merged by jenkins-bot:

[integration/config@master] dockerfiles: add support for Pypy Python 3.11

https://gerrit.wikimedia.org/r/1295865

Change #1296604 merged by jenkins-bot:

[integration/config@master] jjb: update python jobs for Pypy/Python3.11

https://gerrit.wikimedia.org/r/1296604

I have build the new images which have Pypy 7.3.20 which would match Python 3.11.13. All the Jenkins jobs have been updated to use those new images.

Mentioned in SAL (#wikimedia-releng) [2026-06-02T16:05:42Z] <hashar> integration: upgraded pypy from 7.3.11 (py3.9) to 7.3.20 (py3.11) # T423607

@Xqt you are very welcome, and thank you for asking those Python/pypy upgrades! :-]