-
Notifications
You must be signed in to change notification settings - Fork 787
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
Add support for from_py_with
on struct tuples and enums
#2181
Conversation
from_py_with
on struct tuples and enums
Concerning the failing test, isnt't the obj.get_refcnt(unsafe { Python::assume_gil_acquired() }) part directly after releasing the GIL indeed not well-defined as it races with other test threads acquiring the GIL? |
This is obviously unrelated to this PR, I just wanted to bring it up so people more acquainted with that part of the code can shed some light on this. |
Yes, this test should probably be rewritten. I'll do that in a bit. |
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.
Thank you, very grateful to see this implemented! It could be worth checking the guide to see if any documentation there would benefit from updating.
@davidhewitt thanks for pointing out the documentation. Currently the |
bac033c
to
ed698c4
Compare
Fixes #1441 by introducing
from_py_with
for tuple structs and enum.