Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion cpython-unix/build-cpython.sh
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,11 @@ if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_12}" ]; then
patch -p1 -i ${ROOT}/patch-configure-bolt-icf-safe.patch

# Tweak --skip-funcs to work with our toolchain.
patch -p1 -i ${ROOT}/patch-configure-bolt-skip-funcs.patch
if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_15}" ]; then
patch -p1 -i ${ROOT}/patch-configure-bolt-skip-funcs-3.15.patch
else
patch -p1 -i ${ROOT}/patch-configure-bolt-skip-funcs.patch
fi
fi

# The optimization make targets are both phony and non-phony. This leads
Expand Down
5 changes: 5 additions & 0 deletions cpython-unix/extension-modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,11 @@ _lzma:
links:
- lzma

_math_integer:
minimum-python-version: "3.15"
sources:
- mathintegermodule.c

_md5:
sources:
- md5module.c
Expand Down
18 changes: 18 additions & 0 deletions cpython-unix/patch-configure-bolt-skip-funcs-3.15.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/configure.ac b/configure.ac
index a059a07bec2..92a7ff8d54c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2167,11 +2167,8 @@ then
[m4_normalize("
[-update-debug-sections]

- dnl At least LLVM 19.x doesn't support computed gotos in PIC compiled code.
- dnl Exclude functions containing computed gotos.
- dnl TODO this may be fixed in LLVM 20.x via https://github.com/llvm/llvm-project/pull/120267.
- dnl GCC's LTO creates .lto_priv.0 clones of these functions.
- [-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]
+ dnl LLVM on at least 20.1.0 crashes on this symbol. Work around.
+ [-skip-funcs=RC4_options/1]
")]
)
fi
4 changes: 2 additions & 2 deletions cpython-unix/patch-jit-llvm-version-3.15.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ diff --git a/Tools/jit/_llvm.py b/Tools/jit/_llvm.py
import _targets


-_LLVM_VERSION = "19"
-_LLVM_VERSION = "21"
+_LLVM_VERSION = "21"
_EXTERNALS_LLVM_TAG = "llvm-19.1.7.0"
_EXTERNALS_LLVM_TAG = "llvm-21.1.4.0"


8 changes: 4 additions & 4 deletions pythonbuild/downloads.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@
"python_tag": "cp314",
},
"cpython-3.15": {
"url": "https://www.python.org/ftp/python/3.15.0/Python-3.15.0a1.tar.xz",
"size": 23646768,
"sha256": "3194939d488eeaeefdcf990d35542d9ad1ce788789c4e2305a2060eb7058e5a4",
"version": "3.15.0a1",
"url": "https://www.python.org/ftp/python/3.15.0/Python-3.15.0a2.tar.xz",
"size": 23728836,
"sha256": "d8a0a2f4a7f3d7090cf195e81814efe95f70554955557f40e149d8694a662751",
"version": "3.15.0a2",
"licenses": ["Python-2.0", "CNRI-Python"],
"license_file": "LICENSE.cpython.txt",
"python_tag": "cp315",
Expand Down
29 changes: 22 additions & 7 deletions src/validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -731,12 +731,8 @@ const GLOBAL_EXTENSIONS: &[&str] = &[
// _xxinterpchannels added in 3.12.
// audioop removed in 3.13.

const GLOBAL_EXTENSIONS_PYTHON_3_10: &[&str] = &[
"audioop",
"_sha256",
"_sha512",
"_xxsubinterpreters",
];
const GLOBAL_EXTENSIONS_PYTHON_3_10: &[&str] =
&["audioop", "_sha256", "_sha512", "_xxsubinterpreters"];

const GLOBAL_EXTENSIONS_PYTHON_3_11: &[&str] = &[
"audioop",
Expand Down Expand Up @@ -782,6 +778,22 @@ const GLOBAL_EXTENSIONS_PYTHON_3_14: &[&str] = &[
"_zstd",
];

const GLOBAL_EXTENSIONS_PYTHON_3_15: &[&str] = &[
"_interpchannels",
"_interpqueues",
"_interpreters",
"_math_integer",
"_remote_debugging",
"_sha2",
"_suggestions",
"_sysconfig",
"_tokenize",
"_typing",
"_hmac",
"_types",
"_zstd",
];

const GLOBAL_EXTENSIONS_MACOS: &[&str] = &["_scproxy"];

const GLOBAL_EXTENSIONS_POSIX: &[&str] = &[
Expand Down Expand Up @@ -1586,9 +1598,12 @@ fn validate_extension_modules(
"3.13" => {
wanted.extend(GLOBAL_EXTENSIONS_PYTHON_3_13);
}
"3.14" | "3.15" => {
"3.14" => {
wanted.extend(GLOBAL_EXTENSIONS_PYTHON_3_14);
}
"3.15" => {
wanted.extend(GLOBAL_EXTENSIONS_PYTHON_3_15);
}
_ => {
panic!("unhandled Python version: {python_major_minor}");
}
Expand Down