Run tests with macros and without experimental inspect#5913
Run tests with macros and without experimental inspect#5913
Conversation
a4a7225 to
dcdd176
Compare
We are currently not testing pyo3 with the `macros` feature enabled but without `full` enabled
dcdd176 to
8089ba8
Compare
| features += ",nightly" | ||
|
|
||
| return (None, "abi3", features, f"abi3,{features}") | ||
| return (None, "abi3", "macros", "abi3,macros", features, f"abi3,{features}") |
There was a problem hiding this comment.
There's a trade-off that doing this will make CI more expensive. @davidhewitt do you happen to have context for why you excluded testing just the "macros" feature here?
There was a problem hiding this comment.
I think the assumption is that the full feature set is purely additive on top of the base "macros" feature.
Strictly speaking, that's true for everywhere except two cases:
- The UI tests emit different output depending on the types involved
- The
multiple-pymethodsfeature replaces some of the default functionality.
Looks like this adds ~2 minutes to each CI job. Comparing ubuntu x64 stable jobs:
This PR:
Thu, 26 Mar 2026 09:02:08 GMT Run nox -s test-rust
Thu, 26 Mar 2026 09:02:08 GMT nox > Running session test-rust
Thu, 26 Mar 2026 09:02:08 GMT nox > cargo test --no-fail-fast --package=pyo3-build-config
Thu, 26 Mar 2026 09:02:09 GMT nox > cargo test --no-fail-fast --package=pyo3-macros-backend
Thu, 26 Mar 2026 09:02:15 GMT nox > cargo test --no-fail-fast --package=pyo3-macros
Thu, 26 Mar 2026 09:02:20 GMT nox > cargo test --no-fail-fast --package=pyo3-ffi
Thu, 26 Mar 2026 09:02:22 GMT nox > cargo test --no-fail-fast --no-default-features --all-targets
Thu, 26 Mar 2026 09:02:47 GMT nox > cargo test --no-fail-fast --features=abi3 --no-default-features --all-targets
Thu, 26 Mar 2026 09:02:58 GMT nox > cargo test --no-fail-fast --features=macros --no-default-features --all-targets
Thu, 26 Mar 2026 09:04:06 GMT nox > cargo test --no-fail-fast --features=abi3,macros --no-default-features --all-targets
Thu, 26 Mar 2026 09:04:42 GMT nox > cargo test --no-fail-fast --features=full,multiple-pymethods --no-default-features
Thu, 26 Mar 2026 09:06:30 GMT nox > cargo test --no-fail-fast --features=abi3,full,multiple-pymethods --no-default-features
Thu, 26 Mar 2026 09:07:50 GMT nox > cargo test --no-fail-fast --features=abi3-py37,full,multiple-pymethods --no-default-features
Thu, 26 Mar 2026 09:09:09 GMT nox > Session test-rust was successful in 7 minutes.
Recent main:
Tue, 31 Mar 2026 09:30:38 GMT Run nox -s test-rust
Tue, 31 Mar 2026 09:30:38 GMT nox > Running session test-rust
Tue, 31 Mar 2026 09:30:38 GMT nox > cargo test --no-fail-fast --package=pyo3-build-config
Tue, 31 Mar 2026 09:30:39 GMT nox > cargo test --no-fail-fast --package=pyo3-macros-backend
Tue, 31 Mar 2026 09:30:45 GMT nox > cargo test --no-fail-fast --package=pyo3-macros
Tue, 31 Mar 2026 09:30:50 GMT nox > cargo test --no-fail-fast --package=pyo3-ffi
Tue, 31 Mar 2026 09:30:51 GMT nox > cargo test --no-fail-fast --no-default-features --all-targets
Tue, 31 Mar 2026 09:31:16 GMT nox > cargo test --no-fail-fast --features=abi3 --no-default-features --all-targets
Tue, 31 Mar 2026 09:31:26 GMT nox > cargo test --no-fail-fast --features=full,multiple-pymethods --no-default-features
Tue, 31 Mar 2026 09:33:31 GMT nox > cargo test --no-fail-fast --features=abi3,full,multiple-pymethods --no-default-features
Tue, 31 Mar 2026 09:34:51 GMT nox > cargo test --no-fail-fast --features=abi3-py38,full,multiple-pymethods --no-default-features
Tue, 31 Mar 2026 09:36:08 GMT nox > Session test-rust was successful in 5 minutes.
I am unsure what the right call is here. I am generally pro-coverage however the value add diminishes with each corner case and the CI cost here is quite high.
I have #5862 and #5863 which both should provide positive impacts to CI performance, maybe we can re-evaluate what to do here once those have landed?
There was a problem hiding this comment.
Maybe for now we split off the fixes in this PR into a new PR separate from the CI changes?
We are currently not testing pyo3 with the
macrosfeature enabled but withoutfullenabled, i.e. with the default set of pyo3 featuresFixes Issue #5910