]> granicus.if.org Git - python/commit
bpo-38006: Avoid closure in weakref.WeakValueDictionary (GH-15641)
authorVictor Stinner <vstinner@redhat.com>
Mon, 9 Sep 2019 14:55:58 +0000 (16:55 +0200)
committerGitHub <noreply@github.com>
Mon, 9 Sep 2019 14:55:58 +0000 (16:55 +0200)
commita2af05a0d3f0da06b8d432f52efa3ecf29038532
tree3cdd6eee59dc6568efd7abe1b15fe1a863d86329
parentb3b48c81f09d1472010937f1331c5a208a2a2d48
bpo-38006: Avoid closure in weakref.WeakValueDictionary (GH-15641)

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.
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]