diff options
| author | Ivan Levkivskyi <levkivskyi@gmail.com> | 2017-02-24 18:28:26 +0100 |
|---|---|---|
| committer | Mariatta <Mariatta@users.noreply.github.com> | 2017-02-24 09:28:26 -0800 |
| commit | 365cb5bb9069273e6970c9d5d17ee2fe5003e7ac (patch) | |
| tree | ac9bb9c622396060ccb9ee1d9d36ef344c98f506 /Lib/typing.py | |
| parent | 6059ce45aa96f52fa0150e68ea655fbfdc25609a (diff) | |
| download | cpython-git-365cb5bb9069273e6970c9d5d17ee2fe5003e7ac.tar.gz | |
bpo-28556: Fix regression that sneaked into recent typing updates (GH-270)
Diffstat (limited to 'Lib/typing.py')
| -rw-r--r-- | Lib/typing.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/typing.py b/Lib/typing.py index fc2ed94cff..9a0f49099a 100644 --- a/Lib/typing.py +++ b/Lib/typing.py @@ -1160,7 +1160,10 @@ class GenericMeta(TypingMeta, abc.ABCMeta): def __setattr__(self, attr, value): # We consider all the subscripted genrics as proxies for original class - if attr.startswith('__') and attr.endswith('__'): + if ( + attr.startswith('__') and attr.endswith('__') or + attr.startswith('_abc_') + ): super(GenericMeta, self).__setattr__(attr, value) else: super(GenericMeta, _gorg(self)).__setattr__(attr, value) |
