diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b58c9c1c85..94c84460752 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Added - Add support for building for CPython limited API. This required a few minor changes to runtime behaviour of of pyo3 `#[pyclass]` types. See the migration guide for full details. [#1152](https://github.com/PyO3/pyo3/pull/1152) + - Relatedly, `abi3-py*` feature flags are added. [#1263]((https://github.com/PyO3/pyo3/pull/1263)) - Add argument names to `TypeError` messages generated by pymethod wrappers. [#1212](https://github.com/PyO3/pyo3/pull/1212) - Add `PyEval_SetProfile` and `PyEval_SetTrace` to FFI. [#1255](https://github.com/PyO3/pyo3/pull/1255) - Add context.h functions (`PyContext_New`, etc) to FFI. [#1259](https://github.com/PyO3/pyo3/pull/1259) diff --git a/guide/src/building_and_distribution.md b/guide/src/building_and_distribution.md index b0ed67c13cc..49c857db551 100644 --- a/guide/src/building_and_distribution.md +++ b/guide/src/building_and_distribution.md @@ -58,6 +58,14 @@ pyo3 = { version = "...", features = ["abi3"]} 3. Ensure that the `.whl` is correctly marked as `abi3`. For projects using `setuptools`, this is accomplished by passing `--py-limited-api=cp3x` (where `x` is the minimum Python version supported by the wheel, e.g. `--py-limited-api=cp35` for Python 3.5) to `setup.py bdist_wheel`. +### Minimum Python version for `abi3` + +We provide `abi3-py36`/`abi3-py37`/... features to set the minimum required Python version for abi3 wheel. +E.g., if you set `abi3-py36` feature, you can build `cp36-abi3-manylinux2020_x86_64.whl` using Python 3.8. + +To ensure ABI compatibility, we don't allow setting a minimum version higher than the system Python version. +E.g., if you set `abi3-py38` and try to compile the crate with Python 3.6, it just fails. + ## Cross Compiling Cross compiling PyO3 modules is relatively straightforward and requires a few pieces of software: