Guido van Rossum added the comment: Actually, I just found an embarrassingly simple fix:
diff --git a/src/typing.py b/src/typing.py index d900036..49c4a06 100644 --- a/src/typing.py +++ b/src/typing.py @@ -981,7 +981,7 @@ class GenericMeta(TypingMeta, abc.ABCMeta): "Cannot substitute %s for %s in %s" % (_type_repr(new), _type_repr(old), self)) - return self.__class__(self.__name__, self.__bases__, + return self.__class__(self.__name__, (self,) + self.__bases__, dict(self.__dict__), parameters=params, origin=self, I'll go check this in now, together with a test. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25472> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com