Skip to content

Commit 4012f5b

Browse files
authored
Update to CPython 3.15.0a2 (#860)
Update the cpython-3.15 target from 3.15.0a1 -> 3.15.0a2
1 parent ad2b817 commit 4012f5b

File tree

6 files changed

+56
-14
lines changed

6 files changed

+56
-14
lines changed

cpython-unix/build-cpython.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,11 @@ if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_12}" ]; then
260260
patch -p1 -i ${ROOT}/patch-configure-bolt-icf-safe.patch
261261

262262
# Tweak --skip-funcs to work with our toolchain.
263-
patch -p1 -i ${ROOT}/patch-configure-bolt-skip-funcs.patch
263+
if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_15}" ]; then
264+
patch -p1 -i ${ROOT}/patch-configure-bolt-skip-funcs-3.15.patch
265+
else
266+
patch -p1 -i ${ROOT}/patch-configure-bolt-skip-funcs.patch
267+
fi
264268
fi
265269

266270
# The optimization make targets are both phony and non-phony. This leads

cpython-unix/extension-modules.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,11 @@ _lzma:
362362
links:
363363
- lzma
364364

365+
_math_integer:
366+
minimum-python-version: "3.15"
367+
sources:
368+
- mathintegermodule.c
369+
365370
_md5:
366371
sources:
367372
- md5module.c
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
diff --git a/configure.ac b/configure.ac
2+
index a059a07bec2..92a7ff8d54c 100644
3+
--- a/configure.ac
4+
+++ b/configure.ac
5+
@@ -2167,11 +2167,8 @@ then
6+
[m4_normalize("
7+
[-update-debug-sections]
8+
9+
- dnl At least LLVM 19.x doesn't support computed gotos in PIC compiled code.
10+
- dnl Exclude functions containing computed gotos.
11+
- dnl TODO this may be fixed in LLVM 20.x via https://github.com/llvm/llvm-project/pull/120267.
12+
- dnl GCC's LTO creates .lto_priv.0 clones of these functions.
13+
- [-skip-funcs=_PyEval_EvalFrameDefault,sre_ucs1_match/1,sre_ucs2_match/1,sre_ucs4_match/1,sre_ucs1_match.lto_priv.0/1,sre_ucs2_match.lto_priv.0/1,sre_ucs4_match.lto_priv.0/1]
14+
+ dnl LLVM on at least 20.1.0 crashes on this symbol. Work around.
15+
+ [-skip-funcs=RC4_options/1]
16+
")]
17+
)
18+
fi

cpython-unix/patch-jit-llvm-version-3.15.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ diff --git a/Tools/jit/_llvm.py b/Tools/jit/_llvm.py
55
import _targets
66

77

8-
-_LLVM_VERSION = "19"
8+
-_LLVM_VERSION = "21"
99
+_LLVM_VERSION = "21"
10-
_EXTERNALS_LLVM_TAG = "llvm-19.1.7.0"
10+
_EXTERNALS_LLVM_TAG = "llvm-21.1.4.0"
1111

1212

pythonbuild/downloads.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@
9393
"python_tag": "cp314",
9494
},
9595
"cpython-3.15": {
96-
"url": "https://www.python.org/ftp/python/3.15.0/Python-3.15.0a1.tar.xz",
97-
"size": 23646768,
98-
"sha256": "3194939d488eeaeefdcf990d35542d9ad1ce788789c4e2305a2060eb7058e5a4",
99-
"version": "3.15.0a1",
96+
"url": "https://www.python.org/ftp/python/3.15.0/Python-3.15.0a2.tar.xz",
97+
"size": 23728836,
98+
"sha256": "d8a0a2f4a7f3d7090cf195e81814efe95f70554955557f40e149d8694a662751",
99+
"version": "3.15.0a2",
100100
"licenses": ["Python-2.0", "CNRI-Python"],
101101
"license_file": "LICENSE.cpython.txt",
102102
"python_tag": "cp315",

src/validation.rs

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -731,12 +731,8 @@ const GLOBAL_EXTENSIONS: &[&str] = &[
731731
// _xxinterpchannels added in 3.12.
732732
// audioop removed in 3.13.
733733

734-
const GLOBAL_EXTENSIONS_PYTHON_3_10: &[&str] = &[
735-
"audioop",
736-
"_sha256",
737-
"_sha512",
738-
"_xxsubinterpreters",
739-
];
734+
const GLOBAL_EXTENSIONS_PYTHON_3_10: &[&str] =
735+
&["audioop", "_sha256", "_sha512", "_xxsubinterpreters"];
740736

741737
const GLOBAL_EXTENSIONS_PYTHON_3_11: &[&str] = &[
742738
"audioop",
@@ -782,6 +778,22 @@ const GLOBAL_EXTENSIONS_PYTHON_3_14: &[&str] = &[
782778
"_zstd",
783779
];
784780

781+
const GLOBAL_EXTENSIONS_PYTHON_3_15: &[&str] = &[
782+
"_interpchannels",
783+
"_interpqueues",
784+
"_interpreters",
785+
"_math_integer",
786+
"_remote_debugging",
787+
"_sha2",
788+
"_suggestions",
789+
"_sysconfig",
790+
"_tokenize",
791+
"_typing",
792+
"_hmac",
793+
"_types",
794+
"_zstd",
795+
];
796+
785797
const GLOBAL_EXTENSIONS_MACOS: &[&str] = &["_scproxy"];
786798

787799
const GLOBAL_EXTENSIONS_POSIX: &[&str] = &[
@@ -1586,9 +1598,12 @@ fn validate_extension_modules(
15861598
"3.13" => {
15871599
wanted.extend(GLOBAL_EXTENSIONS_PYTHON_3_13);
15881600
}
1589-
"3.14" | "3.15" => {
1601+
"3.14" => {
15901602
wanted.extend(GLOBAL_EXTENSIONS_PYTHON_3_14);
15911603
}
1604+
"3.15" => {
1605+
wanted.extend(GLOBAL_EXTENSIONS_PYTHON_3_15);
1606+
}
15921607
_ => {
15931608
panic!("unhandled Python version: {python_major_minor}");
15941609
}

0 commit comments

Comments
 (0)