Skip to content

Run tests with macros and without experimental inspect#5913

Open
Tpt wants to merge 1 commit intoPyO3:mainfrom
Tpt:tpt/tests-without-experimental-inspect
Open

Run tests with macros and without experimental inspect#5913
Tpt wants to merge 1 commit intoPyO3:mainfrom
Tpt:tpt/tests-without-experimental-inspect

Conversation

@Tpt
Copy link
Copy Markdown
Contributor

@Tpt Tpt commented Mar 25, 2026

We are currently not testing pyo3 with the macros feature enabled but without full enabled, i.e. with the default set of pyo3 features

Fixes Issue #5910

@Tpt Tpt added the CI-skip-changelog Skip checking changelog entry label Mar 25, 2026
@Tpt Tpt force-pushed the tpt/tests-without-experimental-inspect branch from a4a7225 to dcdd176 Compare March 25, 2026 19:06
We are currently not testing pyo3 with the `macros` feature enabled but without `full` enabled
@Tpt Tpt force-pushed the tpt/tests-without-experimental-inspect branch from dcdd176 to 8089ba8 Compare March 26, 2026 09:00
@Tpt Tpt marked this pull request as ready for review March 26, 2026 09:19
features += ",nightly"

return (None, "abi3", features, f"abi3,{features}")
return (None, "abi3", "macros", "abi3,macros", features, f"abi3,{features}")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-pymethods feature 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?

Copy link
Copy Markdown
Contributor

@ngoldbaum ngoldbaum Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe for now we split off the fixes in this PR into a new PR separate from the CI changes?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done #5931

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI-skip-changelog Skip checking changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants