bpo-35701: Added __weakref__ slot to uuid.UUID (GH-11570)

Added test for weakreferencing a uuid.UUID object.
This commit is contained in:
David H 2019-01-17 13:16:51 +01:00 committed by Victor Stinner
parent 89669ffe10
commit f1d8e7cf17
2 changed files with 7 additions and 1 deletions

View file

@ -118,7 +118,7 @@ class UUID:
uuid_generate_time_safe(3).
"""
__slots__ = ('int', 'is_safe')
__slots__ = ('int', 'is_safe', '__weakref__')
def __init__(self, hex=None, bytes=None, bytes_le=None, fields=None,
int=None, version=None,