Skip to content

Commit 6f7a53e

Browse files
author
Michael Tokarev
committed
Revert "Drop support for Python 3.8"
This reverts commit 3d5b2f8. It should not be in 10.0.x branch, since we do support python 3.8 in 10.0. Signed-off-by: Michael Tokarev <[email protected]>
1 parent fd0b1a5 commit 6f7a53e

File tree

7 files changed

+19
-17
lines changed

7 files changed

+19
-17
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.9.
543+
# We require python >= 3.8.
544544
# NB: a True python conditional creates a non-zero return code (Failure)
545-
"$1" -c 'import sys; sys.exit(sys.version_info < (3,9))'
545+
"$1" -c 'import sys; sys.exit(sys.version_info < (3,8))'
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.13 python3.12 python3.11 \
553-
python3.10 python3.9 ; do
552+
for binary in python3 python python3.12 python3.11 \
553+
python3.10 python3.9 python3.8; 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.9 is required." \
936+
error_exit "Cannot use '$first_python', Python >= 3.8 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.9 is required." \
944+
error_exit "Cannot use '$python', Python >= 3.8 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: dnf install python3.12"
948+
" CentOS 8: dnf install python38"
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.9.
104+
As of QEMU |version|, the minimum supported version of Python is 3.8.
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.9"
13-
@echo " Hint (Fedora): 'sudo dnf install python3.9'"
12+
@echo " Requires: Python 3.8"
13+
@echo " Hint (Fedora): 'sudo dnf install python3.8'"
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.9 - 3.11, and tox."
18+
@echo " Requires: Python 3.8 - 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.9 -m venv $(QEMU_MINVENV_DIR)
62+
@python3.8 -m venv $(QEMU_MINVENV_DIR)
6363
@( \
6464
echo "ACTIVATE $(QEMU_MINVENV_DIR)"; \
6565
. $(QEMU_MINVENV_DIR)/bin/activate; \

python/setup.cfg

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

2425
[options]
25-
python_requires = >= 3.9
26+
python_requires = >= 3.8
2627
packages =
2728
qemu.qmp
2829
qemu.machine
@@ -77,7 +78,7 @@ exclude = __pycache__,
7778

7879
[mypy]
7980
strict = True
80-
python_version = 3.9
81+
python_version = 3.8
8182
warn_unused_configs = True
8283
namespace_packages = True
8384
warn_unused_ignores = False
@@ -185,7 +186,7 @@ multi_line_output=3
185186
# of python available on your system to run this test.
186187

187188
[tox:tox]
188-
envlist = py39, py310, py311, py312, py313
189+
envlist = py38, py39, py310, py311, py312, py313
189190
skip_missing_interpreters = true
190191

191192
[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.9***. It is used primarily
2+
# "make check" successfully under ***Python 3.8***. 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.9
4+
python_version = 3.8

tests/docker/dockerfiles/python.docker

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

2021
RUN dnf install -y $PACKAGES

0 commit comments

Comments
 (0)