Skip to content
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

deprecate gil-refs in from_py_with (Part 2) #3972

Merged
merged 2 commits into from
Mar 20, 2024

Conversation

Icxolu
Copy link
Contributor

@Icxolu Icxolu commented Mar 19, 2024

This follows up on #3967 in deprecating the use of gil-refs in from_py_with.
This PR adds the implementation for #[derive(FromPyObject)].

@Icxolu Icxolu added the CI-skip-changelog Skip checking changelog entry label Mar 19, 2024
Copy link
Member

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

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

Brilliant, thanks!

I think the last remaining thing is #3847, which I'm trying to rebase now. Then perhaps, apart from another read of the docs, it's time for 0.21 final...

&self,
struct_fields: &[NamedStructField<'_>],
ctx: &Ctx,
) -> (TokenStream, TokenStream) {
Copy link
Member

Choose a reason for hiding this comment

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

I sort of wondered whether it would be nicer to have a struct DeriveOutput { ... } just to name the two TokenStream elements, but as this is all quite temporary and the pattern is quite consistent I can live without that.

@davidhewitt davidhewitt added this pull request to the merge queue Mar 20, 2024
Merged via the queue into PyO3:main with commit 2736cf6 Mar 20, 2024
41 of 43 checks passed
@Icxolu Icxolu deleted the deprecate-from-py-with branch March 20, 2024 17:16
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.

2 participants