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: Contributing.md
+20-2
Original file line number
Diff line number
Diff line change
@@ -109,7 +109,22 @@ You can run these checks yourself with `nox`. Use `nox -l` to list the full set
109
109
`nox -s clippy-all`
110
110
111
111
#### Tests
112
-
`nox -s test` or `cargo test` for Rust tests only, `nox -f pytests/noxfile.py -s test` for Python tests only
112
+
`nox -s test` or `cargo test` or `cargo nextest` for Rust tests only, `nox -f pytests/noxfile.py -s test` for
113
+
Python tests only.
114
+
115
+
Configuring the python interpreter version (`Py_*` cfg options) when running `cargo test` is the same as for regular packages which is explained in [the docs](https://pyo3.rs/v0.22.5/building-and-distribution).
116
+
The easiest way to configure the python version is to install with the system package manager or
117
+
[pyenv](https://github.com/pyenv/pyenv) then set `PYO3_PYTHON`.
118
+
[uv python install](https://docs.astral.sh/uv/concepts/python-versions/) cannot currently be used as it sets some
`Py_LIMITED_API` can be controlled with the `abi3` feature of the `pyo3` crate:
122
+
123
+
```
124
+
PYO3_PYTHON=/path/to/python cargo nextest run --package pyo3 --features abi3 ...
125
+
```
126
+
127
+
use the `PYO3_PRINT_CONFIG=1` to check the identified configuration.
113
128
114
129
#### Check all conditional compilation
115
130
`nox -s check-feature-powerset`
@@ -183,7 +198,10 @@ PyO3 supports all officially supported Python versions, as well as the latest Py
183
198
184
199
PyO3 aims to make use of up-to-date Rust language features to keep the implementation as efficient as possible.
185
200
186
-
The minimum Rust version supported will be decided when the release which bumps Python and Rust versions is made. At the time, the minimum Rust version will be set no higher than the lowest Rust version shipped in the current Debian, RHEL and Alpine Linux distributions.
201
+
The minimum Rust version supported will be decided when the release which bumps Python and Rust versions is made. At the time, the minimum Rust version will be set no higher than the lowest Rust version shipped in the current
CI tests both the most recent stable Rust version and the minimum supported Rust version. Because of Rust's stability guarantees this is sufficient to confirm support for all Rust versions in between.
0 commit comments