Skip to content

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

Merged
davidhewitt merged 2 commits intoPyO3:mainfrom
Icxolu:deprecate-from-py-with
Mar 20, 2024
Merged

deprecate gil-refs in from_py_with (Part 2)#3972
davidhewitt merged 2 commits intoPyO3:mainfrom
Icxolu:deprecate-from-py-with

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
@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