]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-79512: Fixed names and __module__ value of weakref classes (GH-93719)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 14 Jun 2022 19:12:51 +0000 (12:12 -0700)
committerGitHub <noreply@github.com>
Tue, 14 Jun 2022 19:12:51 +0000 (12:12 -0700)
commit29c7e815bc6087bfa0f34855d8313b16f236dd34
tree43f5d86415ed505ee379ec12431979c4665aa922
parent8dc5df4e21964ec746634cd19d4ffe60acf5e0f6
gh-79512: Fixed names and __module__ value of weakref classes (GH-93719)

Classes ReferenceType, ProxyType and CallableProxyType have now correct
atrtributes __module__, __name__ and __qualname__.
It makes them (types, not instances) pickleable.
(cherry picked from commit 8352e322e87ba39c71e578b65ad8ae156ca3e0c7)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/test/test_weakref.py
Misc/NEWS.d/next/Library/2022-06-11-13-32-17.gh-issue-79512.A1KTDr.rst [new file with mode: 0644]
Objects/weakrefobject.c