New submission from Divij Rajkumar <drajku...@gmail.com>:
Reported this initially on github - https://github.com/python/typing/pull/650 The problem is in the typing code that checks if any of the parent classes for a Protocol are builtin protocols. The code today maintains a whitelist of builtin protocols that are okay to be subclassed, but expects them all to live within the 'collections.abc' module. This means 'typing.ContextManager' and 'typing.AsyncContextManager' cannot be subclassed, even though those protocols are listing in the whitelist. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38008> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com