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.
Thanks @vstinner for the PR |
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 |
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