Skip to content

Commit 7768132

Browse files
committed
Drop support for EOL Python 3.9
1 parent bdabbfb commit 7768132

20 files changed

+38
-481
lines changed

ci-targets.yaml

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ darwin:
44
aarch64-apple-darwin:
55
arch: aarch64
66
python_versions:
7-
- "3.9"
87
- "3.10"
98
- "3.11"
109
- "3.12"
@@ -23,7 +22,6 @@ darwin:
2322
x86_64-apple-darwin:
2423
arch: x86_64
2524
python_versions:
26-
- "3.9"
2725
- "3.10"
2826
- "3.11"
2927
- "3.12"
@@ -44,7 +42,6 @@ linux:
4442
arch: aarch64
4543
libc: gnu
4644
python_versions:
47-
- "3.9"
4845
- "3.10"
4946
- "3.11"
5047
- "3.12"
@@ -64,7 +61,6 @@ linux:
6461
arch: armv7
6562
libc: gnu
6663
python_versions:
67-
- "3.9"
6864
- "3.10"
6965
- "3.11"
7066
- "3.12"
@@ -86,7 +82,6 @@ linux:
8682
arch: armv7
8783
libc: gnu
8884
python_versions:
89-
- "3.9"
9085
- "3.10"
9186
- "3.11"
9287
- "3.12"
@@ -108,7 +103,6 @@ linux:
108103
arch: s390x
109104
libc: gnu
110105
python_versions:
111-
- "3.9"
112106
- "3.10"
113107
- "3.11"
114108
- "3.12"
@@ -130,7 +124,6 @@ linux:
130124
arch: ppc64le
131125
libc: gnu
132126
python_versions:
133-
- "3.9"
134127
- "3.10"
135128
- "3.11"
136129
- "3.12"
@@ -152,7 +145,6 @@ linux:
152145
arch: riscv64
153146
libc: gnu
154147
python_versions:
155-
- "3.9"
156148
- "3.10"
157149
- "3.11"
158150
- "3.12"
@@ -174,7 +166,6 @@ linux:
174166
arch: x86_64
175167
libc: gnu
176168
python_versions:
177-
- "3.9"
178169
- "3.10"
179170
- "3.11"
180171
- "3.12"
@@ -196,7 +187,6 @@ linux:
196187
arch_variant: v2
197188
libc: gnu
198189
python_versions:
199-
- "3.9"
200190
- "3.10"
201191
- "3.11"
202192
- "3.12"
@@ -218,7 +208,6 @@ linux:
218208
arch_variant: v3
219209
libc: gnu
220210
python_versions:
221-
- "3.9"
222211
- "3.10"
223212
- "3.11"
224213
- "3.12"
@@ -240,7 +229,6 @@ linux:
240229
arch_variant: v4
241230
libc: gnu
242231
python_versions:
243-
- "3.9"
244232
- "3.10"
245233
- "3.11"
246234
- "3.12"
@@ -261,7 +249,6 @@ linux:
261249
arch: x86_64
262250
libc: musl
263251
python_versions:
264-
- "3.9"
265252
- "3.10"
266253
- "3.11"
267254
- "3.12"
@@ -288,7 +275,6 @@ linux:
288275
arch_variant: v2
289276
libc: musl
290277
python_versions:
291-
- "3.9"
292278
- "3.10"
293279
- "3.11"
294280
- "3.12"
@@ -315,7 +301,6 @@ linux:
315301
arch_variant: v3
316302
libc: musl
317303
python_versions:
318-
- "3.9"
319304
- "3.10"
320305
- "3.11"
321306
- "3.12"
@@ -342,7 +327,6 @@ linux:
342327
arch_variant: v4
343328
libc: musl
344329
python_versions:
345-
- "3.9"
346330
- "3.10"
347331
- "3.11"
348332
- "3.12"
@@ -368,7 +352,6 @@ linux:
368352
arch: aarch64
369353
libc: musl
370354
python_versions:
371-
- "3.9"
372355
- "3.10"
373356
- "3.11"
374357
- "3.12"
@@ -396,7 +379,6 @@ windows:
396379
arch: x86
397380
vcvars: vcvars32.bat
398381
python_versions:
399-
- "3.9"
400382
- "3.10"
401383
- "3.11"
402384
- "3.12"
@@ -414,7 +396,6 @@ windows:
414396
arch: x86_64
415397
vcvars: vcvars64.bat
416398
python_versions:
417-
- "3.9"
418399
- "3.10"
419400
- "3.11"
420401
- "3.12"
@@ -432,8 +413,7 @@ windows:
432413
arch: aarch64
433414
vcvars: vcvarsamd64_arm64.bat
434415
python_versions:
435-
# On 3.9 / 3.10, `_tkinter` is failing to be included in the build
436-
# - "3.9"
416+
# On 3.10, `_tkinter` is failing to be included in the build
437417
# - "3.10"
438418
- "3.11"
439419
- "3.12"

cpython-unix/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ BUILD := $(HERE)/build.py
66
NULL :=
77
SPACE := $(subst ,, )
88

9-
ALL_PYTHON_VERSIONS := 3.9 3.10 3.11 3.12 3.13 3.14 3.15
9+
ALL_PYTHON_VERSIONS := 3.10 3.11 3.12 3.13 3.14 3.15
1010

1111
ifndef PYBUILD_TARGET_TRIPLE
1212
$(error PYBUILD_TARGET_TRIPLE not defined)

cpython-unix/build-cpython.sh

Lines changed: 2 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ fi
7272
# configure doesn't support cross-compiling on LoongArch. Teach it.
7373
if [ "${PYBUILD_PLATFORM}" != "macos" ]; then
7474
case "${PYTHON_MAJMIN_VERSION}" in
75-
3.9|3.10|3.11)
75+
3.10|3.11)
7676
patch -p1 -i ${ROOT}/patch-configure-add-loongarch-triplet.patch
7777
;;
7878
esac
@@ -175,9 +175,7 @@ fi
175175
# executable. This behavior is kinda suspect on all platforms, as it could be adding
176176
# library dependencies that shouldn't need to be there.
177177
if [[ "${PYBUILD_PLATFORM}" = macos* ]]; then
178-
if [ "${PYTHON_MAJMIN_VERSION}" = "3.9" ]; then
179-
patch -p1 -i ${ROOT}/patch-python-link-modules-3.9.patch
180-
elif [ "${PYTHON_MAJMIN_VERSION}" = "3.10" ]; then
178+
if [ "${PYTHON_MAJMIN_VERSION}" = "3.10" ]; then
181179
patch -p1 -i ${ROOT}/patch-python-link-modules-3.10.patch
182180
else
183181
patch -p1 -i ${ROOT}/patch-python-link-modules-3.11.patch
@@ -205,43 +203,19 @@ elif [ "${PYTHON_MAJMIN_VERSION}" = "3.11" ]; then
205203
patch -p1 -i ${ROOT}/patch-tkinter-3.11.patch
206204
elif [ "${PYTHON_MAJMIN_VERSION}" = "3.10" ]; then
207205
patch -p1 -i ${ROOT}/patch-tkinter-3.10.patch
208-
else
209-
patch -p1 -i ${ROOT}/patch-tkinter-3.9.patch
210206
fi
211207

212208
# Code that runs at ctypes module import time does not work with
213209
# non-dynamic binaries. Patch Python to work around this.
214210
# See https://bugs.python.org/issue37060.
215211
patch -p1 -i ${ROOT}/patch-ctypes-static-binary.patch
216212

217-
# Older versions of Python need patching to work with modern mpdecimal.
218-
if [ -n "${PYTHON_MEETS_MAXIMUM_VERSION_3_9}" ]; then
219-
patch -p1 -i ${ROOT}/patch-decimal-modern-mpdecimal.patch
220-
fi
221-
222213
# We build against libedit instead of readline in all environments.
223214
#
224215
# On macOS, we use the system/SDK libedit, which is likely somewhat old.
225216
#
226217
# On Linux, we use our own libedit, which should be modern.
227218
#
228-
# CPython 3.10 added proper support for building against libedit outside of
229-
# macOS. On older versions, we need to hack up readline.c to build against
230-
# libedit. This patch breaks older libedit (as seen on macOS) so don't apply
231-
# on macOS.
232-
if [[ -n "${PYTHON_MEETS_MAXIMUM_VERSION_3_9}" && "${PYBUILD_PLATFORM}" != macos* ]]; then
233-
# readline.c assumes that a modern readline API version has a free_history_entry().
234-
# but libedit does not. Change the #ifdef accordingly.
235-
#
236-
# Similarly, we invoke configure using readline, which sets
237-
# HAVE_RL_COMPLETION_SUPPRESS_APPEND improperly. So hack that. This is a bug
238-
# in our build system, as we should probably be invoking configure again when
239-
# using libedit.
240-
#
241-
# Similar workaround for on_completion_display_matches_hook.
242-
patch -p1 -i ${ROOT}/patch-readline-libedit.patch
243-
fi
244-
245219
if [ "${PYTHON_MAJMIN_VERSION}" = "3.10" ]; then
246220
# Even though 3.10 is libedit aware, it isn't compatible with newer
247221
# versions of libedit. We need to backport a 3.11 patch to teach the
@@ -546,25 +520,6 @@ if [[ "${PYBUILD_PLATFORM}" = macos* ]]; then
546520
# as Homebrew or MacPorts. So nerf the check to prevent this.
547521
CONFIGURE_FLAGS="${CONFIGURE_FLAGS} ac_cv_lib_intl_textdomain=no"
548522

549-
# CPython 3.9+ have proper support for weakly referenced symbols and
550-
# runtime availability guards. CPython 3.8 will emit weak symbol references
551-
# (this happens automatically when linking due to SDK version targeting).
552-
# However CPython lacks the runtime availability guards for most symbols.
553-
# This results in runtime failures when attempting to resolve/call the
554-
# symbol.
555-
if [ -n "${PYTHON_MEETS_MAXIMUM_VERSION_3_9}" ]; then
556-
if [ "${TARGET_TRIPLE}" != "aarch64-apple-darwin" ]; then
557-
for symbol in clock_getres clock_gettime clock_settime faccessat fchmodat fchownat fdopendir fstatat futimens getentropy linkat mkdirat openat preadv pwritev readlinkat renameat symlinkat unlinkat utimensat uttype; do
558-
CONFIGURE_FLAGS="${CONFIGURE_FLAGS} ac_cv_func_${symbol}=no"
559-
done
560-
fi
561-
562-
# mkfifoat, mknodat introduced in SDK 13.0.
563-
for symbol in mkfifoat mknodat; do
564-
CONFIGURE_FLAGS="${CONFIGURE_FLAGS} ac_cv_func_${symbol}=no"
565-
done
566-
fi
567-
568523
if [ -n "${CROSS_COMPILING}" ]; then
569524
# Python's configure doesn't support cross-compiling on macOS. So we need
570525
# to explicitly set MACHDEP to avoid busted checks. The code for setting

cpython-unix/build-main.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ def main():
5555
parser.add_argument(
5656
"--python",
5757
choices={
58-
"cpython-3.9",
5958
"cpython-3.10",
6059
"cpython-3.11",
6160
"cpython-3.12",

cpython-unix/build.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ def build_cpython_host(
444444

445445
# Set environment variables allowing convenient testing for Python
446446
# version ranges.
447-
for v in ("3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.15"):
447+
for v in ("3.10", "3.11", "3.12", "3.13", "3.14", "3.15"):
448448
normal_version = v.replace(".", "_")
449449

450450
if meets_python_minimum_version(python_version, v):
@@ -761,7 +761,7 @@ def build_cpython(
761761
static="static" in build_options,
762762
)
763763

764-
packages = target_needs(TARGETS_CONFIG, target_triple, python_version)
764+
packages = target_needs(TARGETS_CONFIG, target_triple)
765765
# Toolchain packages are handled specially.
766766
packages.discard("binutils")
767767
packages.discard("musl")
@@ -817,7 +817,7 @@ def build_cpython(
817817

818818
# Set environment variables allowing convenient testing for Python
819819
# version ranges.
820-
for v in ("3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.15"):
820+
for v in ("3.10", "3.11", "3.12", "3.13", "3.14", "3.15"):
821821
normal_version = v.replace(".", "_")
822822

823823
if meets_python_minimum_version(python_version, v):
@@ -1272,7 +1272,6 @@ def main():
12721272
)
12731273

12741274
elif action in (
1275-
"cpython-3.9",
12761275
"cpython-3.10",
12771276
"cpython-3.11",
12781277
"cpython-3.12",

cpython-unix/extension-modules.yml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -407,11 +407,6 @@ _opcode:
407407
_operator:
408408
setup-enabled: true
409409

410-
_peg_parser:
411-
minimum-python-version: "3.9"
412-
maximum-python-version: "3.9"
413-
setup-enabled: true
414-
415410
_pickle:
416411
sources:
417412
- _pickle.c
@@ -549,8 +544,6 @@ _sqlite3:
549544
- define: SQLITE_OMIT_LOAD_EXTENSION=1
550545
targets:
551546
- .*-ios
552-
- define: "MODULE_NAME=\\\"sqlite3\\\""
553-
maximum-python-version: "3.9"
554547
links:
555548
- sqlite3
556549

@@ -608,7 +601,7 @@ _sysconfig:
608601
- _sysconfig.c
609602

610603
_testbuffer:
611-
minimum-python-version: '3.9'
604+
minimum-python-version: '3.10'
612605
sources:
613606
- _testbuffer.c
614607

@@ -628,7 +621,7 @@ _testexternalinspection:
628621
- _testexternalinspection.c
629622

630623
_testimportmultiple:
631-
minimum-python-version: '3.9'
624+
minimum-python-version: '3.10'
632625
sources:
633626
- _testimportmultiple.c
634627

@@ -656,7 +649,7 @@ _testinternalcapi:
656649
minimum-python-version: "3.14"
657650

658651
_testmultiphase:
659-
minimum-python-version: '3.9'
652+
minimum-python-version: '3.10'
660653
sources:
661654
- _testmultiphase.c
662655

@@ -749,13 +742,13 @@ _xxinterpchannels:
749742
- _xxinterpchannelsmodule.c
750743

751744
_xxsubinterpreters:
752-
minimum-python-version: '3.9'
745+
minimum-python-version: '3.10'
753746
maximum-python-version: '3.12'
754747
sources:
755748
- _xxsubinterpretersmodule.c
756749

757750
_xxtestfuzz:
758-
minimum-python-version: '3.9'
751+
minimum-python-version: '3.10'
759752
sources:
760753
- _xxtestfuzz/_xxtestfuzz.c
761754
- _xxtestfuzz/fuzzer.c
@@ -771,7 +764,7 @@ _zstd:
771764
- zstd
772765

773766
_zoneinfo:
774-
minimum-python-version: "3.9"
767+
minimum-python-version: "3.10"
775768
sources:
776769
- _zoneinfo.c
777770

@@ -878,7 +871,7 @@ ossaudiodev:
878871
- ossaudiodev.c
879872

880873
parser:
881-
maximum-python-version: "3.9"
874+
maximum-python-version: "3.10"
882875
sources:
883876
- parsermodule.c
884877

0 commit comments

Comments
 (0)