-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
gh-108240: _PyCapsule_SetTraverse() rejects NULL callbacks #108417
Conversation
vstinner
commented
Aug 24, 2023
•
edited by bedevere-bot
Loading
edited by bedevere-bot
- Issue: _socket extension C capsule cannot be visited by the GC and so _socket.socket type may stay alive longer than expected #108240
9941183
to
832454c
Compare
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 don't think that it makes sense to call _PyCapsule_SetTraverse() with NULL traverse function. If a traverse function is defined, it would look suspicious that there is no associated clear function. So yeah, I think that it's a better API to require both callbacks to be non-NULL. |
Thanks for your post-merge review :-) |
|