Page MenuHomePhabricator

Add Python 3.10, 3.11 and 3.12 to Wikimedia CI
Closed, ResolvedPublic

Description

Currently we have Python 3.7, 3.8 and 3.9 for CI tests but Python 3.10 and 3.11 are the topmost used Python platforms for Pywikibot:

Download statistic of the last 6 months

Python%rank
3.130.0
3.128.9
3.1133.6+++
3.1033.6+++
3.912.2+
3.84.8
3.71.8
other0.4
unknown4.8

It is important to have Python 3.10 as well as 3.11 and 3.12 CI tests available before the code is merged even tests are made at github after it.

Event Timeline

we need to cover 3.11 as well as it's the python version shipped with Debian bookworm: https://packages.debian.org/bookworm/python3

we need to cover 3.11 as well as it's the python version shipped with Debian bookworm: https://packages.debian.org/bookworm/python3

Would be great to have 3.11 too. On the other side we can drop 3.6 in few months if that helps.

The Jenkins CI images are using Debian Buster and gets extra Python versions via Debian packages built and uploaded by SRE at:

http://apt.wikimedia.org/wikimedia  buster-wikimedia thirdparty/pyall and

Python 3.9 got previously added by T289222, thus I guess the same process has to be followed. Python 3.10 is apparently still in unstable so I guess building from sources is still possible.

We would also need the Debian package for distutils (see T289222#8348337).

And I guess this task can be made to build both 3.10 and 3.11 (else another task can be filed for 3.11).

We would also need the Debian package for distutils

Please note that distutils is deprecated since Python 3.10 and Pywikibot no longer used this package since release 6.1.

See T274696 and https://docs.python.org/3.10/library/distutils.html?highlight=distutils#module-distutils

I am guessing @jbond might be able to build Python 3.10 & 3.11.

For Python 3.9 they got uploaded to apt.wikimedia.org under buster-wikimedia component/python39 and the related patches are https://gerrit.wikimedia.org/r/q/bug:T289222+owner:jbond

Xqt renamed this task from Add Python 3.10 to Wikimedia CI to Add Python 3.10 and 3.11 to Wikimedia CI.Dec 4 2023, 4:26 PM
Xqt updated the task description. (Show Details)

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

[integration/config@master] dockerfiles: tox with Bookworm using pyenv

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

This comment was removed by Xqt.

@Xqt it is not yet available cause I kind of mixed those updates with the upgrade of tox v3v4 however tox version 4 has so many back compatibily breakage that I might consider sticking to the legacy v3 instead :-/

Change 983247 merged by jenkins-bot:

[integration/config@master] dockerfiles: tox with Bookworm using pyenv

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

Xqt renamed this task from Add Python 3.10 and 3.11 to Wikimedia CI to Add Python 3.10, 3.11 and 3.12 to Wikimedia CI.Feb 5 2024, 3:31 PM
Xqt updated the task description. (Show Details)

See also: T368837, it would be nice to have the tests before merge.

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

[integration/config@master] jjb: migrate python tox jobs to python-all image

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

Change #1060142 merged by jenkins-bot:

[integration/config@master] jjb: migrate python tox jobs to python-all image

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

@Xqt I haven't done Pywikibot though! The jobs use a different image (docker-registry.wikimedia.org/releng/tox-pywikibot).

@Xqt I haven't done Pywikibot though! The jobs use a different image (docker-registry.wikimedia.org/releng/tox-pywikibot).

Can't the dependency fixed like in https://gerrit.wikimedia.org/r/c/integration/config/+/1060467?

Yes something like that, that is an excellent start by @JCM89. I will split up a bit to:

  • create the image
  • switch existing jobs
  • add the python 3.10, 3.11, 3.12 versions

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

[integration/config@master] dockerfiles: migrate tox-pywikibot to python-all

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

Change #1060467 merged by jenkins-bot:

[integration/config@master] dockerfiles: migrate tox-pywikibot to python-all

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

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

[integration/config@master] jjb: switch pywikibot images to python-all and tox v3

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

Change #1060821 merged by jenkins-bot:

[integration/config@master] jjb: switch pywikibot images to python-all and tox v3

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

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

[integration/config@master] jjb: switch pywikibot-core jobs to python-all image

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

Change #1060823 merged by jenkins-bot:

[integration/config@master] jjb: switch pywikibot-core jobs to python-all image

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

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

[integration/config@master] Add Python 3.10, 3.11, 3.12 to pywikibot/core

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

Change #1060830 merged by jenkins-bot:

[integration/config@master] Add Python 3.10, 3.11, 3.12 to pywikibot/core

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

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

[pywikibot/core@master] [CI] Add support for python 3.10, 3.11 and 3.12

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

I have added support for Python 3.10, 3.11 and 3.12 with the python-all image and the tox-v3 child image. The few extra steps are to upgrade pywikibot as well which is using a more specific image.

The adjustements to the tox.ini are in https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1060824 and once merged this task can be marked resolved.

Xqt claimed this task.
Xqt reassigned this task from Xqt to hashar.
  NODES
HOME 1
mac 2
Note 2
os 6