Bump minimum version of python to 3.9

This was announced in fd8c620751 and every
still-supported distributo release provides at least 3.9, as tracked by #38608.
This commit is contained in:
Jörg Behrmann
2026-02-18 18:47:15 +09:00
committed by Yu Watanabe
parent 582d499e32
commit 761f1ef2f3
5 changed files with 8 additions and 13 deletions
+1 -1
View File
@@ -47,7 +47,7 @@ jobs:
# older glibc
- env: { COMPILER: "gcc", COMPILER_VERSION: "12", LINKER: "bfd", CUSTOM_PYTHON: "1" }
runner: [ ubuntu-22.04 ]
python-version: '3.7'
python-version: '3.9'
env: ${{ matrix.env }}
steps:
- name: Repository checkout
+1 -1
View File
@@ -247,7 +247,7 @@ REQUIREMENTS:
gperf
docbook-xsl (optional, required for documentation)
xsltproc (optional, required for documentation)
python >= 3.7 (required by meson too, >= 3.9 is required for ukify)
python >= 3.9
python-jinja2
python-pefile (optional, required for ukify)
python-lxml (optional, required to build the indices)
+4 -4
View File
@@ -1695,7 +1695,9 @@ conf.set10('SYSTEMD_SLOW_TESTS_DEFAULT', want_slow_tests)
pymod = import('python')
python = pymod.find_installation('python3', required : true, modules : ['jinja2'])
python_39 = python.language_version().version_compare('>=3.9')
if not python.language_version().version_compare('>=3.9')
error('Python >= 3.9 is required')
endif
#####################################################################
@@ -1896,9 +1898,7 @@ if have and efi_arch == 'x64' and cc.links('''
efi_cpu_family_alt = 'x86'
endif
pefile = pymod.find_installation('python3', required: false, modules : ['pefile'])
want_ukify = get_option('ukify').require(python_39 and pefile.found(), error_message : 'Python >= 3.9 and pefile required').allowed()
want_ukify = pymod.find_installation('python3', required: get_option('ukify'), modules : ['pefile']).found()
conf.set10('ENABLE_UKIFY', want_ukify)
#####################################################################
+1 -6
View File
@@ -1,11 +1,6 @@
target-version = "py37"
target-version = "py39"
line-length = 109
lint.select = ["E", "F", "I", "UP"]
[format]
quote-style = "single"
[per-file-target-version]
"src/ukify/*.py" = "py39"
"test/**/integration-test-wrapper.py" = "py39"
"test/test-udev.py" = "py39"
+1 -1
View File
@@ -17,6 +17,7 @@
# removes the device node. After creation and removal the result is checked
# against the expected value and the result is printed.
import dataclasses
import functools
import os
import pwd, grp
@@ -30,7 +31,6 @@ from pathlib import Path
from typing import Callable, Optional
try:
import dataclasses # requires Python >= 3.7
import pytest
except ImportError as e:
print(str(e), file=sys.stderr)