You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: CHANGELOG.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
13
13
14
14
### Added
15
15
- 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))
16
+
-Add feature flags `abi3-py*` to set the minimum Python version when using the limited API. [#1263]((https://github.com/PyO3/pyo3/pull/1263))
17
17
- Add argument names to `TypeError` messages generated by pymethod wrappers. [#1212](https://github.com/PyO3/pyo3/pull/1212)
18
18
- Add `PyEval_SetProfile` and `PyEval_SetTrace` to FFI. [#1255](https://github.com/PyO3/pyo3/pull/1255)
19
19
- Add context.h functions (`PyContext_New`, etc) to FFI. [#1259](https://github.com/PyO3/pyo3/pull/1259)
Copy file name to clipboardexpand all lines: guide/src/building_and_distribution.md
+4-6
Original file line number
Diff line number
Diff line change
@@ -60,11 +60,10 @@ pyo3 = { version = "...", features = ["abi3"]}
60
60
61
61
### Minimum Python version for `abi3`
62
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.
63
+
Because a single `abi3` wheel can be used with many different Python versions, PyO3 has feature flags `abi3-py36`, `abi3-py37`, `abi-py38` etc. to set the minimum required Python version for your `abi3` wheel.
64
+
For example, if you set the `abi3-py36` feature, your extension wheel can be used on all Python 3 versions from Python 3.6 and up. `maturin` and `setuptools-rust` will give the wheel a name like `my-extension-1.0-cp36-abi3-manylinux2020_x86_64.whl`.
65
+
If you set more that one of these api version feature flags the highest version always wins. For example, with both `abi3-py36` and `abi3-py38` set, PyO3 would build a wheel which supports Python 3.8 and up.
66
+
PyO3 is only able to link your extension module to api3 version up to and including your host Python version. E.g., if you set `abi3-py38` and try to compile the crate with a host of Python 3.6, the build will fail.
68
67
69
68
As an advanced feature, you can build PyO3 wheel without calling Python interpreter with
70
69
the environment variable `PYO3_NO_INTERPRETER` set, but this only works on *NIX.
@@ -118,4 +117,3 @@ For an example of how to build python extensions using Bazel, see https://github
0 commit comments