deprecate gil-refs in "self" position#3943
Merged
davidhewitt merged 4 commits intoPyO3:mainfrom Mar 9, 2024
Merged
Conversation
63 tasks
davidhewitt
approved these changes
Mar 9, 2024
Member
davidhewitt
left a comment
There was a problem hiding this comment.
Looks great, thanks! Just one tiny nit, l'll apply it then merge...
Comment on lines
+635
to
+637
| let (call, self_arg_span) = rust_call(args, &self_e, &mut holders); | ||
| let extract_gil_ref = | ||
| quote_spanned! { self_arg_span => #self_e.extract_gil_ref(); }; |
Member
There was a problem hiding this comment.
It'll be nice to refactor this all again a bit later to reduce duplication. I haven't got an obvious idea how though, so I'm happy to move ahead like this in time for beta / final release 👍
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.
Following #3936 / #3847
This deprecates the use of gil-ref types in "self" argument position. This includes
#[pyfunction]withpass_module, theclsargument of#[classmethod]and&PyCell<Self>for normal#[pymethods]. (It seems like#[getter]and#[setter]use a different mechanism)