{"record":{"id":"cddd0ffe47923554","repo":"PyO3/pyo3","slug":"abi3t-builds-are-not-supported-on-cpython-targets","errorCode":null,"errorMessage":"Abi3t builds are not supported on CPython targets before Python 3.15","messagePattern":"Abi3t builds are not supported on CPython targets before Python 3\\.15","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pyo3-ffi/build.rs","lineNumber":151,"sourceCode":"                interpreter_config.target_abi().version() >= versions.min,\n                \"the configured GraalPy interpreter version ({}) is lower than PyO3's minimum supported version ({})\",\n                interpreter_config.target_abi().version(),\n                versions.min,\n            );\n            // GraalPy does not support abi3, so we cannot offer forward compatibility\n            if interpreter_config.target_abi().version() > versions.max {\n                let error = MaximumVersionExceeded::new(interpreter_config, versions.max);\n                return Err(error.finish().into());\n            }\n        }\n        PythonImplementation::RustPython => {}\n    }\n\n    if let PythonAbiKind::Stable(abi) = interpreter_config.target_abi().kind() {\n        match interpreter_config.target_abi().implementation() {\n            PythonImplementation::CPython => match abi {\n                StableAbi::Abi3t => {\n                    ensure!(\n                        interpreter_config.target_abi().version() >= PY_3_15,\n                        \"Abi3t builds are not supported on CPython targets before Python 3.15\"\n                    )\n                }\n                StableAbi::Abi3 => {}\n            },\n            PythonImplementation::PyPy => warn!(\n                \"PyPy does not yet support {abi} so the build artifacts will be version-specific. \\\n                 See https://github.com/pypy/pypy/issues/3397 for more information.\"\n            ),\n            PythonImplementation::GraalPy => warn!(\n                \"GraalPy does not support {abi} so the build artifacts will be version-specific.\"\n            ),\n            PythonImplementation::RustPython => {}\n        }\n    }\n\n    Ok(())","sourceCodeStart":133,"sourceCodeEnd":169,"githubUrl":"https://github.com/PyO3/pyo3/blob/ac9b6899d348be4d54614d060dea53a645a12e36/pyo3-ffi/build.rs#L133-L169","documentation":"abi3t is the free-threaded stable ABI introduced for CPython 3.15+. PyO3's build script rejects abi3t targets on older CPython because the ABI simply does not exist there. Abi3 (non-t) remains allowed on older versions.","triggerScenarios":"Building with a stable-abi config of StableAbi::Abi3t while the configured interpreter's version is below PY_3_15 (e.g. setting PYO3_USE_ABI3_FORWARD_COMPATIBILITY-style abi3t flags or pyo3 abi3-t features against Python 3.13/3.14).","commonSituations":"Enabling free-threaded abi3 feature flags in Cargo.toml while compiling against a pre-3.15 interpreter; attempting forward-compatible free-threaded wheels prematurely.","solutions":["Build against CPython 3.15+ if abi3t is required","Use plain abi3 (not abi3t) for pre-3.15 targets","Remove the abi3t feature/flag from Cargo.toml or the PYO3 abi config","Check the resolved abi via pyo3-build-config output before building"],"exampleFix":"// before (Cargo.toml)\npyo3 = { version = \"0.23\", features = [\"abi3-t\"] }  # with python3.13\n// after\npyo3 = { version = \"0.23\", features = [\"abi3\"] }","handlingStrategy":"validation","validationCode":"import sys\nusing_abi3t = \"abi3-t\" in open(\"Cargo.toml\").read()  # or track your feature flags\nif using_abi3t:\n    assert sys.version_info[:2] >= (3, 15), \"abi3t requires CPython 3.15+\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only enable abi3t features when building against 3.15+ interpreters","Use plain abi3 for broad wheel compatibility","Gate abi3t features behind cargo feature flags enabled only in new-interpreter CI jobs"],"tags":["rust","abi3","free-threaded","version-compatibility"],"backgroundTag":"unsupported-python-version","analyzedSha":"ac9b6899d348be4d54614d060dea53a645a12e36","analyzedAt":"2026-09-05T09:20:35.319Z","contentChangedAt":"2026-09-05T09:20:35.319Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}