Skip to content

Commit 93282e9

Browse files
committed
Note abi3-py* features in the guide and Add CHANGELOG
1 parent 597119d commit 93282e9

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1313

1414
### Added
1515
- 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)
16+
- Relatedly, `abi3-py*` feature flags are added. [#1263]((https://github.com/PyO3/pyo3/pull/1263))
1617
- Add argument names to `TypeError` messages generated by pymethod wrappers. [#1212](https://github.com/PyO3/pyo3/pull/1212)
1718
- Add `PyEval_SetProfile` and `PyEval_SetTrace` to FFI. [#1255](https://github.com/PyO3/pyo3/pull/1255)
1819
- Add context.h functions (`PyContext_New`, etc) to FFI. [#1259](https://github.com/PyO3/pyo3/pull/1259)

guide/src/building_and_distribution.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,14 @@ pyo3 = { version = "...", features = ["abi3"]}
5858

5959
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`.
6060

61+
### Minimum Python version for `abi3`
62+
63+
We provide `abi3-py36`/`abi3-py37`/... features to set the minimum required Python version for abi3 wheel.
64+
E.g., if you set `abi3-py36` feature, you can build `cp36-abi3-manylinux2020_x86_64.whl` using Python 3.8.
65+
66+
To ensure ABI compatibility, we don't allow setting a minimum version higher than the system Python version.
67+
E.g., if you set `abi3-py38` and try to compile the crate with Python 3.6, it just fails.
68+
6169
## Cross Compiling
6270

6371
Cross compiling PyO3 modules is relatively straightforward and requires a few pieces of software:

0 commit comments

Comments
 (0)