summaryrefslogtreecommitdiffstats
path: root/Lib/typing.py
diff options
context:
space:
mode:
authorIvan Levkivskyi <levkivskyi@gmail.com>2017-02-24 17:28:26 (GMT)
committerMariatta <Mariatta@users.noreply.github.com>2017-02-24 17:28:26 (GMT)
commit365cb5bb9069273e6970c9d5d17ee2fe5003e7ac (patch)
treeac9bb9c622396060ccb9ee1d9d36ef344c98f506 /Lib/typing.py
parent6059ce45aa96f52fa0150e68ea655fbfdc25609a (diff)
downloadcpython-365cb5bb9069273e6970c9d5d17ee2fe5003e7ac.zip
cpython-365cb5bb9069273e6970c9d5d17ee2fe5003e7ac.tar.gz
cpython-365cb5bb9069273e6970c9d5d17ee2fe5003e7ac.tar.bz2
bpo-28556: Fix regression that sneaked into recent typing updates (GH-270)
Diffstat (limited to 'Lib/typing.py')
-rw-r--r--Lib/typing.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/typing.py b/Lib/typing.py
index fc2ed94..9a0f490 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)