-
Notifications
You must be signed in to change notification settings - Fork 861
remove Deref
implementations for old "gil refs" types
#4593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
#[repr(transparent)] | ||
#[allow(clippy::upper_case_acronyms)] | ||
pub struct $name($crate::PyAny); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without adding the #[repr]
the types started raising dead code warnings for the contents never being read.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess an alternative would maybe be
#[non_exhaustive]
pub struct $name;
But I'm not sure if there are subtle semver differences between these.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it probably deserves a changelog entry. Targeting 0.24 seems fine to me. Do we want to add a milestone to track that? |
Good idea, milestone created, will leave this in draft until then I guess. |
Ok, CHANGELOG added, maybe we merge this just in time for 0.24? :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 💯
Follow-up on #4589 (comment)
I'm open to whether this needs a CHANGELOG entry... I guess it does because it can affect type bounds (e.g. as it does in this PR). Maybe that's a good reason to park this until 0.24 as a low-ish priority (breaking) change, that's easier the longer ago GIL Refs died.