-
Notifications
You must be signed in to change notification settings - Fork 763
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 GILPool
#3947
deprecate GILPool
#3947
Conversation
src/gil.rs
Outdated
not(feature = "gil-refs"), | ||
deprecated( | ||
since = "0.21.0", | ||
note = "`GILPool` will have no function after PyO3's GIL Refs API is removed" |
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 would make this into something that is actionable in 0.21.0, i.e. GILPool
does have no function if the GIL Refs API is not used.
|
||
let obj = py.eval_bound("object()", None, None).unwrap(); | ||
obj.to_object(py) | ||
py.eval_bound("object()", None, None).unwrap().unbind() |
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.
Ah, we can finally have nice things!
pub unsafe fn new_pool(self) -> GILPool { | ||
GILPool::new() | ||
} | ||
} | ||
|
||
impl Python<'_> { | ||
/// Creates a scope using a new pool for managing PyO3's owned references. | ||
/// Creates a scope using a new pool for managing PyO3's GIL Refs. This has no functional |
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.
Partially editing text left?
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.
Some nits on the wording.
Definitely. Or even a sentence in the migration guide? And in the section where I think the advice would be along the lines of "the coarse-grained memory management using |
Thanks for the review! I will aim to fixup tomorrow evening 👍 |
Sickness in the family again has left me wiped out, I am hoping to get to this tomorrow evening now... |
Ok; that's done. As it was just wording changes I'll proceed to merge and then see what else can be tidied up ahead of the final 0.21 release. |
CodSpeed Performance ReportMerging #3947 will improve performances by 10.03%Comparing Summary
Benchmarks breakdown
|
I realised this is part of the GIL Refs API yet to be deprecated!
... this one might be worth adding a CHANGELOG entry for?