Merged
Conversation
bschoenmaeckers
approved these changes
Apr 13, 2026
Member
bschoenmaeckers
left a comment
There was a problem hiding this comment.
Great to see you back!
davidhewitt
reviewed
Apr 14, 2026
Member
davidhewitt
left a comment
There was a problem hiding this comment.
Thanks for the cleanups & welcome back :)
| message = "pyclass `{Self}` cannot be subclassed", | ||
| label = "required for `#[pyclass(extends={Self})]`", | ||
| note = "`{Self}` must have `#[pyclass(subclass)]` to be eligible for subclassing", | ||
| note = "with the `abi3` feature enabled, PyO3 does not support subclassing native types", |
Member
There was a problem hiding this comment.
Actually since #5733 we do support on 3.12+ 🎉
Suggested change
| note = "with the `abi3` feature enabled, PyO3 does not support subclassing native types", | |
| note = "subclassing native types requires Python >= 3.12 when using the `abi3` feature", |
(suggested phrasing matches some similar messages in src/impl_/pyclass/assertions.rs)
davidhewitt
approved these changes
Apr 14, 2026
Member
Author
|
FWIW I haven't blessed the ui tests, so if CI succeeds then something went wrong. |
Member
Author
|
Trying again; this one should fail as well. |
mejrs
commented
Apr 14, 2026
| #[cfg(not(any(Py_LIMITED_API, feature = "experimental-inspect")))] | ||
| t.pass("tests/ui/forbid_unsafe.rs"); | ||
| #[cfg(all(Py_LIMITED_API, not(Py_3_12), not(feature = "experimental-async")))] | ||
| #[cfg(all(Py_LIMITED_API, not(Py_3_12), feature = "experimental-async"))] |
Member
Author
There was a problem hiding this comment.
Seems like this used to be never true? I've inverted the predicate and now it seems to run again.
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've been re-familiarizing myself with pyo3 a bit :) While doing so I found some cleanups here and there.