Skip to content

Commit ec1269a

Browse files
committed
fix noxfile and ban abi3t builds on 3.14 and older
1 parent 22a5332 commit ec1269a

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

noxfile.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def test_rust(session: nox.Session):
142142

143143
if (
144144
feature_set
145-
and "abi3" in feature_set
145+
and "abi3t" in feature_set
146146
and "full" in feature_set
147147
and sys.version_info >= (3, 16)
148148
):
@@ -1545,7 +1545,9 @@ def _get_feature_sets() -> Tuple[Optional[str], ...]:
15451545
return (None, features)
15461546

15471547
# do fewer abi3t builds?
1548-
return (None, "abi3", "abi3t", features, f"abi3,{features}", f"abi3t,{features}")
1548+
if sys.version_info >= (3, 15):
1549+
return (None, "abi3", "abi3t", features, f"abi3,{features}", f"abi3t,{features}")
1550+
return (None, "abi3", features, f"abi3,{features}")
15491551

15501552

15511553
_RELEASE_LINE_START = "release: "

pyo3-build-config/src/impl_.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,13 @@ print("gil_disabled", get_config_var("Py_GIL_DISABLED"))
371371

372372
let stable_abi = CPythonABI::from_build_env()?;
373373

374+
if let CPythonABI::ABI3t = stable_abi {
375+
ensure!(
376+
version.minor > 14,
377+
"abi3t is supported on Python 3.15 and newer but build is for Python {version}"
378+
);
379+
}
380+
374381
let implementation = map["implementation"].parse()?;
375382

376383
let gil_disabled = match map["gil_disabled"].as_str() {

0 commit comments

Comments
 (0)