-
-
Notifications
You must be signed in to change notification settings - Fork 31.1k
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
bpo-38006: Avoid closure in weakref.WeakValueDictionary #15641
Conversation
weakref.WeakValueDictionary defines a local remove() function used as callback for weak references. This function was created with a closure. Modify the implementation to avoid the closure.
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.
The refactorization solves my segfault issue.
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8. |
weakref.WeakValueDictionary defines a local remove() function used as callback for weak references. This function was created with a closure. Modify the implementation to avoid the closure. (cherry picked from commit a2af05a) Co-authored-by: Victor Stinner <vstinner@redhat.com>
GH-15787 is a backport of this pull request to the 3.8 branch. |
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7. |
Sorry, @vstinner, I could not cleanly backport this to |
GH-15789 is a backport of this pull request to the 3.7 branch. |
weakref.WeakValueDictionary defines a local remove() function used as callback for weak references. This function was created with a closure. Modify the implementation to avoid the closure. (cherry picked from commit a2af05a) Co-authored-by: Victor Stinner <vstinner@redhat.com>
weakref.WeakValueDictionary defines a local remove() function used as callback for weak references. This function was created with a closure. Modify the implementation to avoid the closure.
weakref.WeakValueDictionary defines a local remove() function used as
callback for weak references. This function was created with a
closure. Modify the implementation to avoid the closure.
https://bugs.python.org/issue38006