diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-08-21 09:33:14 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-21 09:33:14 (GMT) |
commit | 5bd27c3be5734e158f67ff86087a977a25d89161 (patch) | |
tree | e40cee6a6eb8de4fad898f582263766c7ee4e43e /Lib/test | |
parent | 838b0e975fc2c106508eb27d19a9548533ac1e55 (diff) | |
download | cpython-5bd27c3be5734e158f67ff86087a977a25d89161.zip cpython-5bd27c3be5734e158f67ff86087a977a25d89161.tar.gz cpython-5bd27c3be5734e158f67ff86087a977a25d89161.tar.bz2 |
bpo-44524: Do not set _name of _SpecialForm without need (GH-27861) (GH-27871)
Because setting non-empty _name affects behavior of other code.
In most cases __name__ can be derived from __origin__.__name__.
(cherry picked from commit 4ceec495598e78f0776dd46d511dcc612a434dc3)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'Lib/test')
-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 af7c343..b1cd547 100644 --- a/Lib/test/test_typing.py +++ b/Lib/test/test_typing.py @@ -4873,7 +4873,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) |