From: John Snow <jsnow@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"John Snow" <jsnow@redhat.com>,
"Kohei Tokunaga" <ktokunaga.mail@gmail.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Michael Roth" <michael.roth@amd.com>,
"Markus Armbruster" <armbru@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Mauro Carvalho Chehab" <mchehab+huawei@kernel.org>,
"Cleber Rosa" <crosa@redhat.com>,
"Pierrick Bouvier" <pierrick.bouvier@oss.qualcomm.com>,
"Philippe Mathieu-Daudé" <philmd@mailo.com>
Subject: [PATCH 00/12] python: require python3.12+
Date: Mon, 24 Aug 2026 01:28:46 -0400 [thread overview]
Message-ID: <20260824052859.880475-1-jsnow@redhat.com> (raw)
The stars have aligned, and we can jump all the way from Python3.9 to
Python3.12.
GitLab CI: https://gitlab.com/jsnow/qemu/-/pipelines/2781408192
Python 3.9 is EOL, and Python 3.10 will be EOL in about two months
(October 2026). Python 3.11 is, to be blunt, perfectly serviceable -
but when investigating our actual minimum dependency requirements, I
realized none of our supported platforms used anything older than
Python 3.12, so we may as well build and test with the version that
all of our build platforms are actually using.
This reduces the Python compat test matrix by quite a lot and allows
us a few nice things. From memory, the highlights are:
- Pattern matching syntax (fancy case statements). I am not dying to
use these anywhere, but they're nice!
- Vastly improved error reporting from CPython
- Ability to annotate exceptions with "notes", which allows us augment
the default reporting behavior for unhandled exceptions - this can
be used in e.g. iotests to help give additional information on tool
crashes that is sometimes hard to discover otherwise
- The ability to use standard library types for typing syntax instead
of importing from Typing (Technically, valid since 3.9, but...)
- The ability to use "x | y" instead of Union[x, y] in type hint
syntax. Combined with the above, it's a good time to clean up the
typing in qapi to make it read much more nicely.
- ExceptionGroups - the ability to capture and report multiple
exceptions simultaneously. This is extremely useful for async QMP
and managing multiple VMs from a single python context. Async QMP
will be able to get a few nice QOL improvements with this.
My personal favorite:
- We can move to a much newer Sphinx, which gets rid of an awful lot
of very ugly compat code. This is the *actual* motivation of this
series.
Anyway, here's the version chart for our supported build platforms and
why this is safe to do:
distro EOS python3 pip setuptools sphinx wheel
-------------------------------------------------------------------------
centos_stream_9 2026-12-12 3.9.25 21.3.1 53.0.0 3.4.3 0.36.2
centos_stream_9+ 2026-12-12 3.12.13 23.2.1 68.2.2 --- 0.41.2
freebsd -- 3.12.14 23.3.2 63.1.0 9.0.4 0.48.0
ubuntu_24_04 2028-04-23 3.12.3 24.0 68.1.2 7.2.6 0.42.0
centos_stream_10 2030-01-01 3.12.13 23.3.2 69.0.3 7.2.6 0.41.2
alpine_3_21 2026-11-01 3.12.14 24.3.1 70.3.0 8.1.3 0.43.0
debian_13 2028-08-09 3.13.5 25.1.1 78.1.1 8.1.3 0.46.1
fedora_43 2026-12-09 3.14.7 25.1.1 78.1.1 8.2.3 0.45.1
ubuntu_26_04 2031-05-29 3.14.4 25.1.1 78.1.1 8.2.3 0.46.3
fedora_44 2027-06-02 3.14.7 26.0.1 80.10.2 8.2.3 0.45.1
macports -- 3.14.7 26.0.1 80.10.2 9.1.0 0.48.0
alpine_3_22 2027-05-01 3.12.14 25.1.1 80.9.0 8.2.3 0.46.3
alpine_3_23 2027-11-01 3.12.14 25.1.1 80.9.0 8.2.3 0.46.3
openbsd -- 3.14.6 26.2.1 80.9.0 9.1.0 0.48.0
alpine_3_24 2028-06-01 3.14.7 26.1.2 82.0.1 9.1.0 0.47.0
pkgsrc_current -- 3.13.15 26.2.1 84.0.0 9.1.0 0.48.0
CentOS stream 9 note: python3.12, python3.12-pip,
python3.12-setuptools and python3.12-wheel are available as optional
packages in the standard repository. Sphinx is not available, but can
be side-loaded from PyPI using pip3.12.
More cleanups to follow: we may have the chance to upgrade to
pyproject.toml packaging once and for all now that FreeBSD has moved
to Python3.12, which will get us off the legacy packaging we've been
using. This isn't a problem *currently*, but it has been the cause of
a lot of pain in the past, and the sooner we can ditch it the better.
toodles,
--js
John Snow (12):
tests: re-add opencv2 and numpy dependencies
tests: add Python3.12 to centos9.docker
tests: update emsdk-wasm64-cross
qapi: update type hint for types_seen
python: upgrade to Python3.12+
python: fix license configuration
python: allow mypy to run as the current python version
python: remove distutils workarounds
python: remove stale setup.cfg options
sphinx: require sphinx 7.2.6
sphinx: drop fakedbusdoc
sphinx: drop qapidoc back-compat overboiled spaghetti dinner
docs/conf.py | 11 +-
docs/interop/dbus-display.rst | 14 +-
docs/interop/dbus-vmstate.rst | 14 +-
docs/interop/dbus-vnc.rst | 14 +-
docs/sphinx/compat.py | 230 ------------------
docs/sphinx/fakedbusdoc.py | 30 ---
docs/sphinx/qapi_domain.py | 47 ++--
configure | 11 +-
tests/docker/dockerfiles/alpine.docker | 1 +
tests/docker/dockerfiles/centos9.docker | 14 +-
.../dockerfiles/debian-amd64-cross.docker | 2 +
.../dockerfiles/debian-arm64-cross.docker | 2 +
.../dockerfiles/debian-armhf-cross.docker | 2 +
.../dockerfiles/debian-i686-cross.docker | 2 +
.../dockerfiles/debian-ppc64el-cross.docker | 2 +
.../dockerfiles/debian-riscv64-cross.docker | 2 +
.../dockerfiles/debian-s390x-cross.docker | 2 +
tests/docker/dockerfiles/debian.docker | 2 +
.../dockerfiles/emsdk-wasm64-cross.docker | 4 +-
.../dockerfiles/fedora-rust-nightly.docker | 2 +
.../dockerfiles/fedora-win64-cross.docker | 2 +
tests/docker/dockerfiles/fedora.docker | 2 +
tests/docker/dockerfiles/opensuse-leap.docker | 2 +
tests/docker/dockerfiles/ubuntu2404.docker | 2 +
.gitlab-ci.d/macos-14.vars | 2 +-
python/Makefile | 10 +-
python/scripts/mkvenv.py | 58 +----
python/setup.cfg | 33 +--
python/tests/linters.py | 11 -
python/tests/minreqs.txt | 66 ++---
pythondeps.toml | 13 +-
.../ci/setup/debian/debian-13-ppc64le.yaml | 2 +
.../ci/setup/ubuntu/ubuntu-2404-aarch64.yaml | 2 +
.../ci/setup/ubuntu/ubuntu-2404-s390x.yaml | 2 +
scripts/qapi/types.py | 2 +-
tests/lcitool/mappings.yml | 24 +-
tests/lcitool/projects/qemu.yml | 2 +
tests/lcitool/targets/centos-stream-9.yml | 4 +-
tests/vm/generated/freebsd.json | 2 +
39 files changed, 156 insertions(+), 493 deletions(-)
delete mode 100644 docs/sphinx/compat.py
delete mode 100644 docs/sphinx/fakedbusdoc.py
--
2.55.0
next reply other threads:[~2026-08-24 5:30 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-24 5:28 John Snow [this message]
2026-08-24 5:28 ` [PATCH 01/12] tests: re-add opencv2 and numpy dependencies John Snow
2026-08-24 7:16 ` Philippe Mathieu-Daudé
2026-08-24 7:38 ` marcandre.lureau
2026-08-24 5:28 ` [PATCH 02/12] tests: add Python3.12 to centos9.docker John Snow
2026-08-24 7:38 ` marcandre.lureau
2026-08-24 8:17 ` Paolo Bonzini
2026-08-24 13:09 ` John Snow
2026-08-24 13:14 ` Daniel P. Berrangé
2026-08-24 5:28 ` [PATCH 03/12] tests: update emsdk-wasm64-cross John Snow
2026-08-24 7:38 ` marcandre.lureau
2026-08-25 4:16 ` Kohei Tokunaga
2026-08-24 5:28 ` [PATCH 04/12] qapi: update type hint for types_seen John Snow
2026-08-24 7:17 ` Philippe Mathieu-Daudé
2026-08-24 7:38 ` marcandre.lureau
2026-08-24 8:05 ` Markus Armbruster
2026-08-24 5:28 ` [PATCH 05/12] python: upgrade to Python3.12+ John Snow
2026-08-24 7:38 ` marcandre.lureau
2026-08-24 8:21 ` Paolo Bonzini
2026-08-24 5:28 ` [PATCH 06/12] python: fix license configuration John Snow
2026-08-24 7:38 ` marcandre.lureau
2026-08-24 5:28 ` [PATCH 07/12] python: allow mypy to run as the current python version John Snow
2026-08-24 7:15 ` Philippe Mathieu-Daudé
2026-08-24 7:38 ` marcandre.lureau
2026-08-24 5:28 ` [PATCH 08/12] python: remove distutils workarounds John Snow
2026-08-24 7:38 ` marcandre.lureau
2026-08-24 5:28 ` [PATCH 09/12] python: remove stale setup.cfg options John Snow
2026-08-24 7:38 ` marcandre.lureau
2026-08-24 5:28 ` [PATCH 10/12] sphinx: require sphinx 7.2.6 John Snow
2026-08-24 7:38 ` marcandre.lureau
2026-08-24 13:16 ` Daniel P. Berrangé
2026-08-24 13:21 ` John Snow
2026-08-24 5:28 ` [PATCH 11/12] sphinx: drop fakedbusdoc John Snow
2026-08-24 7:38 ` marcandre.lureau
2026-08-24 5:28 ` [PATCH 12/12] sphinx: drop qapidoc back-compat overboiled spaghetti dinner John Snow
2026-08-24 7:38 ` marcandre.lureau
2026-08-24 9:39 ` Markus Armbruster
2026-08-24 14:34 ` John Snow
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260824052859.880475-1-jsnow@redhat.com \
--to=jsnow@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=armbru@redhat.com \
--cc=crosa@redhat.com \
--cc=ktokunaga.mail@gmail.com \
--cc=marcandre.lureau@redhat.com \
--cc=mchehab+huawei@kernel.org \
--cc=michael.roth@amd.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@mailo.com \
--cc=pierrick.bouvier@oss.qualcomm.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.