diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2021-08-21 06:47:59 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-21 06:47:59 (GMT) |
commit | 4ceec495598e78f0776dd46d511dcc612a434dc3 (patch) | |
tree | 7263799719ceecf6cb70d72c5ee0d2bfbe112e49 /Lib/test/test_typing.py | |
parent | 16b9be4861e007ad483611ba0479feb2b90ea783 (diff) | |
download | cpython-4ceec495598e78f0776dd46d511dcc612a434dc3.zip cpython-4ceec495598e78f0776dd46d511dcc612a434dc3.tar.gz cpython-4ceec495598e78f0776dd46d511dcc612a434dc3.tar.bz2 |
bpo-44524: Do not set _name of _SpecialForm without need (GH-27861)
Because setting non-empty _name affects behavior of other code.
In most cases __name__ can be derived from __origin__.__name__.
Diffstat (limited to 'Lib/test/test_typing.py')
-rw-r--r-- | Lib/test/test_typing.py | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py index d090c5f..3bd5894 100644 --- a/Lib/test/test_typing.py +++ b/Lib/test/test_typing.py @@ -4929,7 +4929,6 @@ class SpecialAttrsTests(BaseTestCase): self.assertEqual(cls.__name__, name, str(cls)) self.assertEqual(cls.__qualname__, name, str(cls)) self.assertEqual(cls.__module__, 'typing', str(cls)) - self.assertEqual(getattr(cls, '_name', name), name, str(cls)) for proto in range(pickle.HIGHEST_PROTOCOL + 1): s = pickle.dumps(cls, proto) loaded = pickle.loads(s) |