]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-38006: Avoid closure in weakref.WeakValueDictionary (GH-15641) (GH-15789)
authorVictor Stinner <vstinner@python.org>
Mon, 9 Sep 2019 22:31:20 +0000 (00:31 +0200)
committerGitHub <noreply@github.com>
Mon, 9 Sep 2019 22:31:20 +0000 (00:31 +0200)
commit23669330b7d0d5ad1a9aac40315ba4c2e765f9dd
tree18bdbb2c3127e2e867a4a312da2abd99959995a5
parent12228ce41de1b8fcfb3f1ba0a86d98a232815e85
bpo-38006: Avoid closure in weakref.WeakValueDictionary (GH-15641) (GH-15789)

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 a2af05a0d3f0da06b8d432f52efa3ecf29038532)
Lib/test/test_weakref.py
Lib/weakref.py
Misc/NEWS.d/next/Library/2019-09-02-13-37-27.bpo-38006.Y7vA0Q.rst [new file with mode: 0644]