-
Notifications
You must be signed in to change notification settings - Fork 916
rename Python::with_gil to Python::attach
#5209
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
Conversation
davidhewitt
left a comment
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.
Thanks, I cannot think of a better name and with_gil needs to go, so I think it's time we commit to this 👍
I wonder if it's worth doing a documentation pass (and maybe mentioning this in the migration guide) as a follow up PR to make sure documentation reads well and concepts come across ok following the rename.
What about |
That would work too, but it also kind of reads backwards to me (or like something is missing "with what"). The advantages I see with
Yes, I think that would make sense, but probably after |
|
What examples can we think of from across the ecosystem? We couldn't use a RAII guard because the Is something like One drawback of |
|
Also looks like PEP 788's proposed API for |
|
There's |
|
Maybe it's also noteworthy that we already have some APIs that use this terminology like |
|
Yep I continue to feel |
|
Given the nature of this PR is going to be conflict-heavy and I feel that |
|
Sounds good to me. Should we also proceed with |
|
Ungh, I guess how soon do we expect that to get resolved? It hasn't been for years+ at this point, so while it would be nice to fix, we don't need to rush that. So renaming to Just as a last attempt to spitball and check we've tested out all options, what about Given we already have |
|
I'm fine with attach and detach. |
Part of #3987
This renames
Python::with_giltoPython::attachto detangle our naming from the GIL which is not always relevant anymore. The old name is deprecated. (Big diff, but pretty much just a mechanical change)