{"record":{"id":"b1dea3b987c35b66","repo":"PyO3/pyo3","slug":"cannot-target-an-abi3t-version-below-minimum-supp","errorCode":null,"errorMessage":"Cannot target an abi3t version below {MINIMUM_SUPPORTED_VERSION_ABI3T}","messagePattern":"Cannot target an abi3t version below (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pyo3-build-config/src/impl_.rs","lineNumber":2334,"sourceCode":"/// Must be called from a PyO3 crate build script.\nfn default_stable_abi_config(\n    host: &Triple,\n    abi3_version: Option<PythonVersion>,\n    abi3t_version: Option<PythonVersion>,\n) -> Result<InterpreterConfig> {\n    if abi3_version.is_none() && abi3t_version.is_none() {\n        bail!(\"Neither abi3 or abi3t features are enabled\")\n    }\n    let (stable_abi, version) = if let Some(version) = abi3_version {\n        (StableAbi::Abi3, version)\n    } else if let Some(version) = abi3t_version {\n        (StableAbi::Abi3t, version)\n    } else {\n        unreachable!();\n    };\n\n    if stable_abi == StableAbi::Abi3t && version < MINIMUM_SUPPORTED_VERSION_ABI3T {\n        bail!(\"Cannot target an abi3t version below {MINIMUM_SUPPORTED_VERSION_ABI3T}\")\n    }\n\n    // FIXME: PyPy & GraalPy do not support the Stable ABI.\n    let target_abi = PythonAbiBuilder::new(PythonImplementation::CPython, version)\n        .stable_abi(stable_abi)\n        .finalize()?;\n    let builder = InterpreterConfigBuilder::new(PythonImplementation::CPython, version)\n        .target_abi(target_abi);\n    if host.operating_system == OperatingSystem::Windows {\n        builder.lib_name(default_lib_name_windows(target_abi, false, false)?)\n    } else {\n        builder\n    }\n    .finalize()\n}\n\n/// Detects the cross compilation target interpreter configuration from all\n/// available sources (PyO3 environment variables, Python sysconfigdata, etc.).","sourceCodeStart":2316,"sourceCodeEnd":2352,"githubUrl":"https://github.com/PyO3/pyo3/blob/ac9b6899d348be4d54614d060dea53a645a12e36/pyo3-build-config/src/impl_.rs#L2316-L2352","documentation":"When targeting the free-threaded stable ABI (abi3t), pyo3 enforces a minimum supported Python version constant MINIMUM_SUPPORTED_VERSION_ABI3T. Requesting an abi3t target older than that floor is unsupported because the free-threaded stable ABI did not exist or was not stable before that release, so the build script bails.","triggerScenarios":"Setting an abi3t minimum version (via feature/env/config such as an abi3t-py3XY-style selection or PYO3 config) whose PythonVersion compares less than MINIMUM_SUPPORTED_VERSION_ABI3T (the oldest free-threaded CPython pyo3 supports).","commonSituations":"Developers experimentally request abi3t with an older interpreter version pinned (e.g. py3.9) not realizing free-threading only exists from CPython 3.13; CI matrices pin old Python versions while the free-threaded feature is enabled.","solutions":["Raise the abi3t target version to at least MINIMUM_SUPPORTED_VERSION_ABI3T (currently the 3.13 free-threaded ABI)","If you need to support older Pythons, use plain `abi3` instead of `abi3t`","Check the pyo3 docs/changelog for the exact minimum free-threaded version supported by your pyo3 release"],"exampleFix":"// before\npyo3 = { version = \"0.23\", features = [\"extension-module\", \"abi3-py39\"] }  # too old for abi3t\n// after\npyo3 = { version = \"0.23\", features = [\"extension-module\"] }  # target free-threaded CPython 3.13t+ only","handlingStrategy":"validation","validationCode":"// shell\nPYO3_PYTHON=\"${PYO3_PYTHON:-python3}\"; VER=$($PYO3_PYTHON -c 'import sys; print(sys.version_info[:2])'); echo \"target=$VER — abi3t requires free-threaded CPython 3.13+\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only enable abi3t for CPython 3.13+ free-threaded builds","Check the pyo3 changelog for MINIMUM_SUPPORTED_VERSION_ABI3T when upgrading pyo3","Use plain abi3 when broad version support is needed"],"tags":["rust","pyo3","abi3","free-threaded","version-check","build-time"],"backgroundTag":"unsupported-version-target","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"}