Skip to content

Conversation

@davidhewitt
Copy link
Member

Split from #5551

The PyMethodDefType enum had distinctions for classmethod and staticmethod which were redundant anyway due to flags stored within the method def, this PR simplifies the enum.

Not a user-facing change.

@davidhewitt davidhewitt added the CI-skip-changelog Skip checking changelog entry label Oct 31, 2025
Comment on lines 479 to 480
let (default_class_geitem, default_class_geitem_method) =
pyclass_class_geitem(&args.options, &syn::parse_quote!(#cls), ctx)?;
pyclass_class_getitem(&args.options, &syn::parse_quote!(#cls), ctx)?;
Copy link
Contributor

Choose a reason for hiding this comment

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

If we're fixing the pyclass_class_getitem typo, we might as well fix default_class_geitem and default_class_geitem_method here too (and lower in this function).

Copy link
Member Author

Choose a reason for hiding this comment

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

Fair point, 48dcd0a

Copy link
Contributor

@Icxolu Icxolu left a comment

Choose a reason for hiding this comment

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

Nice cleanup!

@Icxolu Icxolu added this pull request to the merge queue Oct 31, 2025
@davidhewitt davidhewitt removed this pull request from the merge queue due to a manual request Oct 31, 2025
@davidhewitt davidhewitt added this pull request to the merge queue Oct 31, 2025
@davidhewitt
Copy link
Member Author

(Looks like the build on windows arm runner hung in the codecov upload.)

Merged via the queue into PyO3:main with commit 1999aa9 Oct 31, 2025
42 of 43 checks passed
@davidhewitt davidhewitt deleted the simpler-method-def-type branch October 31, 2025 21:54
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