Skip to content

Commit 2fb9eb5

Browse files
authored
Drop support for EOL Python 3.8 (#385)
1 parent 927d80b commit 2fb9eb5

17 files changed

+29
-460
lines changed

cpython-unix/Makefile

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -255,9 +255,6 @@ PYTHON_HOST_DEPENDS := \
255255
$(OUTDIR)/m4-$(M4_VERSION)-$(PACKAGE_SUFFIX).tar \
256256
$(NULL)
257257

258-
$(OUTDIR)/cpython-3.8-$(CPYTHON_3.8_VERSION)-$(HOST_PLATFORM).tar: $(PYTHON_HOST_DEPENDS)
259-
$(RUN_BUILD) --docker-image $(DOCKER_IMAGE_BUILD) cpython-3.8-host
260-
261258
$(OUTDIR)/cpython-3.9-$(CPYTHON_3.9_VERSION)-$(HOST_PLATFORM).tar: $(PYTHON_HOST_DEPENDS)
262259
$(RUN_BUILD) --docker-image $(DOCKER_IMAGE_BUILD) cpython-3.9-host
263260

@@ -306,9 +303,6 @@ ALL_PYTHON_DEPENDS = \
306303
$(PYTHON_DEPENDS) \
307304
$(NULL)
308305

309-
$(OUTDIR)/cpython-$(CPYTHON_3.8_VERSION)-$(PACKAGE_SUFFIX).tar: $(ALL_PYTHON_DEPENDS)
310-
$(RUN_BUILD) --docker-image $(DOCKER_IMAGE_BUILD) cpython-3.8
311-
312306
$(OUTDIR)/cpython-$(CPYTHON_3.9_VERSION)-$(PACKAGE_SUFFIX).tar: $(ALL_PYTHON_DEPENDS)
313307
$(RUN_BUILD) --docker-image $(DOCKER_IMAGE_BUILD) cpython-3.9
314308

cpython-unix/build-cpython-host.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,8 @@ pushd "Python-${PYTHON_VERSION}"
4040
if [ "${CC}" = "clang" ]; then
4141
if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_13}" ]; then
4242
patch -p1 -i ${ROOT}/patch-disable-multiarch-13.patch
43-
elif [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_9}" ]; then
44-
patch -p1 -i ${ROOT}/patch-disable-multiarch.patch
4543
else
46-
patch -p1 -i ${ROOT}/patch-disable-multiarch-legacy.patch
44+
patch -p1 -i ${ROOT}/patch-disable-multiarch.patch
4745
fi
4846
elif [ "${CC}" = "musl-clang" ]; then
4947
# Similarly, this is a problem for musl Clang on Python 3.13+

cpython-unix/build-cpython.sh

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,8 @@ fi
111111
if [ "${CC}" = "clang" ]; then
112112
if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_13}" ]; then
113113
patch -p1 -i ${ROOT}/patch-disable-multiarch-13.patch
114-
elif [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_9}" ]; then
115-
patch -p1 -i ${ROOT}/patch-disable-multiarch.patch
116114
else
117-
patch -p1 -i ${ROOT}/patch-disable-multiarch-legacy.patch
115+
patch -p1 -i ${ROOT}/patch-disable-multiarch.patch
118116
fi
119117
elif [ "${CC}" = "musl-clang" ]; then
120118
# Similarly, this is a problem for musl Clang on Python 3.13+
@@ -164,9 +162,7 @@ fi
164162
# executable. This behavior is kinda suspect on all platforms, as it could be adding
165163
# library dependencies that shouldn't need to be there.
166164
if [ "${PYBUILD_PLATFORM}" = "macos" ]; then
167-
if [ "${PYTHON_MAJMIN_VERSION}" = "3.8" ]; then
168-
patch -p1 -i ${ROOT}/patch-python-link-modules-3.8.patch
169-
elif [ "${PYTHON_MAJMIN_VERSION}" = "3.9" ]; then
165+
if [ "${PYTHON_MAJMIN_VERSION}" = "3.9" ]; then
170166
patch -p1 -i ${ROOT}/patch-python-link-modules-3.9.patch
171167
elif [ "${PYTHON_MAJMIN_VERSION}" = "3.10" ]; then
172168
patch -p1 -i ${ROOT}/patch-python-link-modules-3.10.patch
@@ -210,7 +206,7 @@ fi
210206

211207
# iOS doesn't have system(). Teach posixmodule.c about that.
212208
# Python 3.11 makes this a configure time check, so we don't need the patch there.
213-
if [[ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_9}" && -n "${PYTHON_MEETS_MAXIMUM_VERSION_3_10}" ]]; then
209+
if [[ -n "${PYTHON_MEETS_MAXIMUM_VERSION_3_10}" ]]; then
214210
patch -p1 -i ${ROOT}/patch-posixmodule-remove-system.patch
215211
fi
216212

@@ -393,11 +389,6 @@ if [ "${PYBUILD_PLATFORM}" = "macos" ]; then
393389
# However CPython lacks the runtime availability guards for most symbols.
394390
# This results in runtime failures when attempting to resolve/call the
395391
# symbol.
396-
#
397-
# Unfortunately, this means we need to ban weak symbols on CPython 3.8, to
398-
# the detriment of performance. However, we can actually use most symbols
399-
# on aarch64 because it targets macOS SDK 11.0, not 10.9. But more modern
400-
# symbols do need to be banned.
401392
if [ -n "${PYTHON_MEETS_MAXIMUM_VERSION_3_9}" ]; then
402393
if [ "${TARGET_TRIPLE}" != "aarch64-apple-darwin" ]; then
403394
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; do
@@ -907,7 +898,7 @@ done
907898
mkdir ${ROOT}/out/python/build/lib
908899
cp -av ${TOOLS_PATH}/deps/lib/*.a ${ROOT}/out/python/build/lib/
909900

910-
# On Apple, Python 3.9+ uses __builtin_available() to sniff for feature
901+
# On Apple, Python uses __builtin_available() to sniff for feature
911902
# availability. This symbol is defined by clang_rt, which isn't linked
912903
# by default. When building a static library, one must explicitly link
913904
# against clang_rt or you will get an undefined symbol error for

cpython-unix/build-main.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ def main():
6363
parser.add_argument(
6464
"--python",
6565
choices={
66-
"cpython-3.8",
6766
"cpython-3.9",
6867
"cpython-3.10",
6968
"cpython-3.11",

cpython-unix/build.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,6 @@ def build_cpython_host(
436436
"build-cpython-host.sh",
437437
"patch-disable-multiarch.patch",
438438
"patch-disable-multiarch-13.patch",
439-
"patch-disable-multiarch-legacy.patch",
440439
}
441440
for s in sorted(support):
442441
build_env.copy_file(SUPPORT / s)
@@ -456,7 +455,7 @@ def build_cpython_host(
456455

457456
# Set environment variables allowing convenient testing for Python
458457
# version ranges.
459-
for v in ("3.8", "3.9", "3.10", "3.11", "3.12", "3.13"):
458+
for v in ("3.9", "3.10", "3.11", "3.12", "3.13"):
460459
normal_version = v.replace(".", "_")
461460

462461
if meets_python_minimum_version(python_version, v):
@@ -785,7 +784,7 @@ def build_cpython(
785784

786785
# Set environment variables allowing convenient testing for Python
787786
# version ranges.
788-
for v in ("3.8", "3.9", "3.10", "3.11", "3.12", "3.13"):
787+
for v in ("3.9", "3.10", "3.11", "3.12", "3.13"):
789788
normal_version = v.replace(".", "_")
790789

791790
if meets_python_minimum_version(python_version, v):
@@ -1202,7 +1201,6 @@ def main():
12021201
)
12031202

12041203
elif action in (
1205-
"cpython-3.8",
12061204
"cpython-3.9",
12071205
"cpython-3.10",
12081206
"cpython-3.11",

cpython-unix/patch-disable-multiarch-legacy.patch

Lines changed: 0 additions & 15 deletions
This file was deleted.

cpython-unix/patch-python-link-modules-3.8.patch

Lines changed: 0 additions & 12 deletions
This file was deleted.

cpython-unix/targets.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ aarch64-apple-darwin:
5959
host_platforms:
6060
- macos
6161
pythons_supported:
62-
- '3.8'
6362
- '3.9'
6463
- '3.10'
6564
- '3.11'
@@ -149,7 +148,6 @@ aarch64-unknown-linux-gnu:
149148
host_platforms:
150149
- linux64
151150
pythons_supported:
152-
- '3.8'
153151
- '3.9'
154152
- '3.10'
155153
- '3.11'
@@ -307,7 +305,6 @@ i686-unknown-linux-gnu:
307305
host_platforms:
308306
- linux64
309307
pythons_supported:
310-
- '3.8'
311308
- '3.9'
312309
- '3.10'
313310
- '3.11'
@@ -552,7 +549,6 @@ x86_64-apple-darwin:
552549
host_platforms:
553550
- macos
554551
pythons_supported:
555-
- '3.8'
556552
- '3.9'
557553
- '3.10'
558554
- '3.11'
@@ -722,7 +718,6 @@ x86_64-unknown-linux-gnu:
722718
host_platforms:
723719
- linux64
724720
pythons_supported:
725-
- '3.8'
726721
- '3.9'
727722
- '3.10'
728723
- '3.11'
@@ -767,7 +762,6 @@ x86_64_v2-unknown-linux-gnu:
767762
host_platforms:
768763
- linux64
769764
pythons_supported:
770-
- '3.8'
771765
- '3.9'
772766
- '3.10'
773767
- '3.11'
@@ -813,7 +807,6 @@ x86_64_v3-unknown-linux-gnu:
813807
host_platforms:
814808
- linux64
815809
pythons_supported:
816-
- '3.8'
817810
- '3.9'
818811
- '3.10'
819812
- '3.11'
@@ -859,7 +852,6 @@ x86_64_v4-unknown-linux-gnu:
859852
host_platforms:
860853
- linux64
861854
pythons_supported:
862-
- '3.8'
863855
- '3.9'
864856
- '3.10'
865857
- '3.11'
@@ -905,7 +897,6 @@ x86_64-unknown-linux-musl:
905897
host_platforms:
906898
- linux64
907899
pythons_supported:
908-
- '3.8'
909900
- '3.9'
910901
- '3.10'
911902
- '3.11'
@@ -948,7 +939,6 @@ x86_64_v2-unknown-linux-musl:
948939
host_platforms:
949940
- linux64
950941
pythons_supported:
951-
- '3.8'
952942
- '3.9'
953943
- '3.10'
954944
- '3.11'
@@ -992,7 +982,6 @@ x86_64_v3-unknown-linux-musl:
992982
host_platforms:
993983
- linux64
994984
pythons_supported:
995-
- '3.8'
996985
- '3.9'
997986
- '3.10'
998987
- '3.11'
@@ -1036,7 +1025,6 @@ x86_64_v4-unknown-linux-musl:
10361025
host_platforms:
10371026
- linux64
10381027
pythons_supported:
1039-
- '3.8'
10401028
- '3.9'
10411029
- '3.10'
10421030
- '3.11'

0 commit comments

Comments
 (0)