Page MenuHomePhabricator

Add Python 3.13 to Wikimedia CI
Closed, ResolvedPublic

Description

Currently we have Python 3.8 - 3.12 for CI tests (for Pywikibot) but it would be good to have Python 3.13 test before merging patches.

Pywikibot download statistic of the last 6 months

Python%rank
3.150.0
3.140.0
3.131.9
3.1251.7⏹⏹⏹⏹⏹
3.1128.7⏹⏹⏹
3.109.7
3.92.7
3.80.3
other0.2
unknown4.7

There are some backports and code changes made for this release and it is important to have Python 3.13 CI tests available before the code is merged even tests are made at github after it.

See also:

Event Timeline

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

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

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

Change #1166761 merged by jenkins-bot:

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

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

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

[integration/config@master] jjb: update tox jobs to support Python 3.13

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

Change #1166792 merged by jenkins-bot:

[integration/config@master] jjb: update tox jobs to support Python 3.13

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

@hashar: is this ready to use with Pywikibot tests for CI?

@Xqt https://gerrit.wikimedia.org/r/c/integration/config/+/1166761 added python 3.13 but I did not rebuild the child image releng/tox-v3-pywikibot :/

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

[integration/config@master] dockerfiles: add Python 3.13 to tox-v3-pywikibot

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

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

[integration/config@master] jjb: add Python 3.13 to pywikibot/core

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

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

[integration/config@master] Zuul: [pywikibot/core] Add Python 3.13 fasttest

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

Change #1178056 merged by jenkins-bot:

[integration/config@master] dockerfiles: add Python 3.13 to tox-v3-pywikibot

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

I have built the image:

Successfully published image docker-registry.wikimedia.org/releng/tox-v3-pywikibot:1.1-s2

All the pythons installed by pyvenv:

docker run --rm -it --entrypoint=/opt/pyenv/pyenv-2.6.3/bin/pyenv docker-registry.wikimedia.org/releng/tox-v3-pywikibot:1.1-s2 versions
  system
* 2.7.18 (set by /opt/pyenv/version)
* 3.7.17 (set by /opt/pyenv/version)
* 3.8.20 (set by /opt/pyenv/version)
* 3.9.23 (set by /opt/pyenv/version)
* 3.10.18 (set by /opt/pyenv/version)
* 3.11.13 (set by /opt/pyenv/version)
* 3.12.11 (set by /opt/pyenv/version)
* 3.13.5 (set by /opt/pyenv/version)

And Python 3.13:

docker run --rm -it --entrypoint=python3.13 docker-registry.wikimedia.org/releng/tox-v3-pywikibot:1.1-s2 --version
Python 3.13.5

Change #1178057 merged by jenkins-bot:

[integration/config@master] jjb: add Python 3.13 to pywikibot/core

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

Change #1178058 merged by jenkins-bot:

[integration/config@master] Zuul: [pywikibot/core] Add Python 3.13 fasttest

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

Mentioned in SAL (#wikimedia-releng) [2025-08-12T18:49:16Z] <hashar> Reloaded Zuul for [pywikibot/core] Add Python 3.13 fasttest [integration/config] - https://gerrit.wikimedia.org/r/1178058 - T396273

Thank you @hashar. Most test works with Python 3.13 except of plain {name}-tox job. I get a missing interpreter error when pre-commit is running with lint-py313. I guess the docker is still the old one. Can we also change deeptests from py312 to py313?

Change #1178468 had a related patch set uploaded (by Xqt; author: Xqt):

[integration/config@master] jjb: add Python 3.13 to pywikibot jobs

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

Change #1178469 had a related patch set uploaded (by Xqt; author: Xqt):

[integration/config@master] Zuul: [pywikibot/core] Use deeptest with Python 3.13

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

Change #1178468 abandoned by Xqt:

[integration/config@master] jjb: add Python 3.13 to pywikibot jobs

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

Change #1178469 merged by jenkins-bot:

[integration/config@master] jjb/zuul: add Python 3.13 to pywikibot jobs

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

Xqt claimed this task.

@hashar: Interpreter is not found for the affected tests. Is any cache to be cleaned? See https://integration.wikimedia.org/ci/job/pywikibot-i18n-tox/164/console for example.

I should have verified, let me investigate :]

This is the command I have used:

./jjb-update pyikibot-{core,i18n,xqbot}-tox pywikibot-core-tox-deeptest-py313
             ^^^

It has a typo (missing w) and that is reflected in the output I have pasted on the change https://gerrit.wikimedia.org/r/c/integration/config/+/1178469/comments/0d3f0408_12dbad56 :

INFO:jenkins_jobs.builder:Number of jobs generated: 1
INFO:jenkins_jobs.builder:Creating jenkins job pywikibot-core-tox-deeptest-py313
INFO:jenkins_jobs.cli.subcommand.update:Number of jobs updated: 1

Only one job got updated.

@Xqt I have updated the other jobs:

$ ./jjb-update pywikibot*
INFO:jenkins_jobs.builder:Number of jobs generated:  18
INFO:jenkins_jobs.builder:Reconfiguring jenkins job pywikibot-core-tox
INFO:jenkins_jobs.builder:Reconfiguring jenkins job pywikibot-i18n-tox
INFO:jenkins_jobs.builder:Reconfiguring jenkins job pywikibot-xqbot-tox
INFO:jenkins_jobs.cli.subcommand.update:Number of jobs updated: 3

Great, thanks a lot. All is fine now.

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

[integration/config@master] jjb: add python 3.13 to labs/tools/heritage job

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

Change #1180716 merged by jenkins-bot:

[integration/config@master] jjb: add python 3.13 to labs/tools/heritage job

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