All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/16] python: require python3.12+
@ 2026-08-25  5:14 John Snow
  2026-08-25  5:14 ` [PATCH v2 01/16] tests: update vm tests to prefer locally-built QEMU John Snow
                   ` (15 more replies)
  0 siblings, 16 replies; 30+ messages in thread
From: John Snow @ 2026-08-25  5:14 UTC (permalink / raw)
  To: qemu-devel
  Cc: John Snow, Alex Bennée, Peter Maydell,
	Philippe Mathieu-Daudé, Warner Losh, Kohei Tokunaga,
	Pierrick Bouvier, Cleber Rosa, Paolo Bonzini, Reinoud Zandijk,
	Kyle Evans, Michael Roth, Marc-André Lureau,
	Markus Armbruster, Mauro Carvalho Chehab

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/2787831126

v2:
 - s/types_seen/objects_seen in patch 8
 - drop python3-devel from mappings.yml
 - add comments explaining contentnode vs content_node in #16
 - fix VM tests to use local QEMU build to support `-object
   qmp-monitor` in order to run tests (Thanks danpb)
 - fix FreeBSD vm test (Pre-existing breakage)
 - fix netBSD vm test (Pre-existing breakage)
 - Known issue: Haiku VM test is broken, but this series makes it
   worse. Existing problem is that tomli has gone missing; new problem
   is that our Haiku image still only offers Python 3.9. This VM test
   has not been meaningfully updated since its introduction in 2020,
   and the 2023 r4 build on vagrant's registry is still the most
   recent version, so... I think if we want Haiku to work, it's up to
   someone else to show it some love.

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 (16):
  tests: update vm tests to prefer locally-built QEMU
  tests: update FreeBSD dependencies
  tests: update netbsd dependencies
  tests: drop python3-devel mapping
  tests: re-add opencv2 and numpy dependencies
  tests: add Python3.12 to centos9.docker
  tests: update emsdk-wasm64-cross
  qapi: update type hint for objects_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/requirements.txt                         |   2 +-
 docs/sphinx/compat.py                         | 230 ------------------
 docs/sphinx/fakedbusdoc.py                    |  30 ---
 docs/sphinx/qapi_domain.py                    |  53 ++--
 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                      |  63 +----
 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                    |  32 ++-
 tests/lcitool/projects/qemu.yml               |   2 +
 tests/lcitool/targets/centos-stream-9.yml     |   4 +-
 tests/vm/Makefile.include                     |   2 +-
 tests/vm/generated/freebsd.json               |  14 +-
 tests/vm/netbsd                               |   1 +
 42 files changed, 178 insertions(+), 507 deletions(-)
 delete mode 100644 docs/sphinx/compat.py
 delete mode 100644 docs/sphinx/fakedbusdoc.py

-- 
2.55.0




^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2026-08-25 15:15 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-25  5:14 [PATCH v2 00/16] python: require python3.12+ John Snow
2026-08-25  5:14 ` [PATCH v2 01/16] tests: update vm tests to prefer locally-built QEMU John Snow
2026-08-25  6:41   ` Markus Armbruster
2026-08-25  8:30     ` Daniel P. Berrangé
2026-08-25 15:15       ` John Snow
2026-08-25 11:26   ` Daniel P. Berrangé
2026-08-25  5:14 ` [PATCH v2 02/16] tests: update FreeBSD dependencies John Snow
2026-08-25 11:08   ` Daniel P. Berrangé
2026-08-25 15:07     ` John Snow
2026-08-25  5:14 ` [PATCH v2 03/16] tests: update netbsd dependencies John Snow
2026-08-25  6:26   ` Marc-André Lureau
2026-08-25 11:09   ` Daniel P. Berrangé
2026-08-25 15:11     ` John Snow
2026-08-25  5:14 ` [PATCH v2 04/16] tests: drop python3-devel mapping John Snow
2026-08-25  8:32   ` Daniel P. Berrangé
2026-08-25  5:14 ` [PATCH v2 05/16] tests: re-add opencv2 and numpy dependencies John Snow
2026-08-25  5:14 ` [PATCH v2 06/16] tests: add Python3.12 to centos9.docker John Snow
2026-08-25 11:12   ` Daniel P. Berrangé
2026-08-25  5:14 ` [PATCH v2 07/16] tests: update emsdk-wasm64-cross John Snow
2026-08-25  5:14 ` [PATCH v2 08/16] qapi: update type hint for objects_seen John Snow
2026-08-25  5:14 ` [PATCH v2 09/16] python: upgrade to Python3.12+ John Snow
2026-08-25 11:14   ` Daniel P. Berrangé
2026-08-25  5:14 ` [PATCH v2 10/16] python: fix license configuration John Snow
2026-08-25  5:14 ` [PATCH v2 11/16] python: allow mypy to run as the current python version John Snow
2026-08-25  5:14 ` [PATCH v2 12/16] python: remove distutils workarounds John Snow
2026-08-25  5:14 ` [PATCH v2 13/16] python: remove stale setup.cfg options John Snow
2026-08-25  5:14 ` [PATCH v2 14/16] sphinx: require sphinx 7.2.6 John Snow
2026-08-25  5:14 ` [PATCH v2 15/16] sphinx: drop fakedbusdoc John Snow
2026-08-25  5:14 ` [PATCH v2 16/16] sphinx: drop qapidoc back-compat overboiled spaghetti dinner John Snow
2026-08-25  6:54   ` Markus Armbruster

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.