Skip to content

Commit 3d5b2f8

Browse files
huthMichael Tokarev
authored andcommitted
Drop support for Python 3.8
Python 3.8 went "end of life" in October 2024 and Fedora 42 dropped this version already, so the "python" CI job is currently failing. Thus it's time to drop support for this Python version in QEMU, too. While we're at it, also look for "python3.13" in the configure script. Message-ID: <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Reviewed-by: Daniel P. Berrangé <[email protected]> Signed-off-by: Thomas Huth <[email protected]> (cherry picked from commit d64db83) Signed-off-by: Michael Tokarev <[email protected]>
1 parent 6966e0b commit 3d5b2f8

File tree

7 files changed

+17
-19
lines changed

7 files changed

+17
-19
lines changed

configure

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -540,17 +540,17 @@ if test -n "$linux_arch" && ! test -d "$source_path/linux-headers/asm-$linux_arc
540540
fi
541541

542542
check_py_version() {
543-
# We require python >= 3.8.
543+
# We require python >= 3.9.
544544
# NB: a True python conditional creates a non-zero return code (Failure)
545-
"$1" -c 'import sys; sys.exit(sys.version_info < (3,8))'
545+
"$1" -c 'import sys; sys.exit(sys.version_info < (3,9))'
546546
}
547547

548548
first_python=
549549
if test -z "${PYTHON}"; then
550550
# A bare 'python' is traditionally python 2.x, but some distros
551551
# have it as python 3.x, so check in both places.
552-
for binary in python3 python python3.12 python3.11 \
553-
python3.10 python3.9 python3.8; do
552+
for binary in python3 python python3.13 python3.12 python3.11 \
553+
python3.10 python3.9 ; do
554554
if has "$binary"; then
555555
python=$(command -v "$binary")
556556
if check_py_version "$python"; then
@@ -933,19 +933,19 @@ then
933933
# If first_python is set, there was a binary somewhere even though
934934
# it was not suitable. Use it for the error message.
935935
if test -n "$first_python"; then
936-
error_exit "Cannot use '$first_python', Python >= 3.8 is required." \
936+
error_exit "Cannot use '$first_python', Python >= 3.9 is required." \
937937
"Use --python=/path/to/python to specify a supported Python."
938938
else
939939
error_exit "Python not found. Use --python=/path/to/python"
940940
fi
941941
fi
942942

943943
if ! check_py_version "$python"; then
944-
error_exit "Cannot use '$python', Python >= 3.8 is required." \
944+
error_exit "Cannot use '$python', Python >= 3.9 is required." \
945945
"Use --python=/path/to/python to specify a supported Python." \
946946
"Maybe try:" \
947947
" openSUSE Leap 15.3+: zypper install python39" \
948-
" CentOS 8: dnf install python38"
948+
" CentOS: dnf install python3.12"
949949
fi
950950

951951
# Resolve PATH

docs/about/build-platforms.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ Python runtime
101101
option of the ``configure`` script to point QEMU to a supported
102102
version of the Python runtime.
103103

104-
As of QEMU |version|, the minimum supported version of Python is 3.8.
104+
As of QEMU |version|, the minimum supported version of Python is 3.9.
105105

106106
Python build dependencies
107107
Some of QEMU's build dependencies are written in Python. Usually these

python/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ help:
99
@echo "make check-minreqs:"
1010
@echo " Run tests in the minreqs virtual environment."
1111
@echo " These tests use the oldest dependencies."
12-
@echo " Requires: Python 3.8"
13-
@echo " Hint (Fedora): 'sudo dnf install python3.8'"
12+
@echo " Requires: Python 3.9"
13+
@echo " Hint (Fedora): 'sudo dnf install python3.9'"
1414
@echo ""
1515
@echo "make check-tox:"
1616
@echo " Run tests against multiple python versions."
1717
@echo " These tests use the newest dependencies."
18-
@echo " Requires: Python 3.8 - 3.11, and tox."
18+
@echo " Requires: Python 3.9 - 3.11, and tox."
1919
@echo " Hint (Fedora): 'sudo dnf install python3-tox python3.11'"
2020
@echo " The variable QEMU_TOX_EXTRA_ARGS can be use to pass extra"
2121
@echo " arguments to tox".
@@ -59,7 +59,7 @@ PIP_INSTALL = pip install --disable-pip-version-check
5959
min-venv: $(QEMU_MINVENV_DIR) $(QEMU_MINVENV_DIR)/bin/activate
6060
$(QEMU_MINVENV_DIR) $(QEMU_MINVENV_DIR)/bin/activate: setup.cfg tests/minreqs.txt
6161
@echo "VENV $(QEMU_MINVENV_DIR)"
62-
@python3.8 -m venv $(QEMU_MINVENV_DIR)
62+
@python3.9 -m venv $(QEMU_MINVENV_DIR)
6363
@( \
6464
echo "ACTIVATE $(QEMU_MINVENV_DIR)"; \
6565
. $(QEMU_MINVENV_DIR)/bin/activate; \

python/setup.cfg

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ classifiers =
1414
Natural Language :: English
1515
Operating System :: OS Independent
1616
Programming Language :: Python :: 3 :: Only
17-
Programming Language :: Python :: 3.8
1817
Programming Language :: Python :: 3.9
1918
Programming Language :: Python :: 3.10
2019
Programming Language :: Python :: 3.11
@@ -23,7 +22,7 @@ classifiers =
2322
Typing :: Typed
2423

2524
[options]
26-
python_requires = >= 3.8
25+
python_requires = >= 3.9
2726
packages =
2827
qemu.qmp
2928
qemu.machine
@@ -78,7 +77,7 @@ exclude = __pycache__,
7877

7978
[mypy]
8079
strict = True
81-
python_version = 3.8
80+
python_version = 3.9
8281
warn_unused_configs = True
8382
namespace_packages = True
8483
warn_unused_ignores = False
@@ -186,7 +185,7 @@ multi_line_output=3
186185
# of python available on your system to run this test.
187186

188187
[tox:tox]
189-
envlist = py38, py39, py310, py311, py312, py313
188+
envlist = py39, py310, py311, py312, py313
190189
skip_missing_interpreters = true
191190

192191
[testenv]

python/tests/minreqs.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This file lists the ***oldest possible dependencies*** needed to run
2-
# "make check" successfully under ***Python 3.8***. It is used primarily
2+
# "make check" successfully under ***Python 3.9***. It is used primarily
33
# by GitLab CI to ensure that our stated minimum versions in setup.cfg
44
# are truthful and regularly validated.
55
#

scripts/qapi/mypy.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[mypy]
22
strict = True
33
disallow_untyped_calls = False
4-
python_version = 3.8
4+
python_version = 3.9

tests/docker/dockerfiles/python.docker

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ ENV PACKAGES \
1515
python3.11 \
1616
python3.12 \
1717
python3.13 \
18-
python3.8 \
1918
python3.9
2019

2120
RUN dnf install -y $PACKAGES

0 commit comments

Comments
 (0)