[issue38008] ContextManager and AsyncContextManager protocols can't be subclassed

2019-09-02 Thread Divij Rajkumar
Change by Divij Rajkumar : -- nosy: divijrajkumar priority: normal severity: normal status: open title: ContextManager and AsyncContextManager protocols can't be subclassed type: behavior versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Pytho

[issue38008] ContextManager and AsyncContextManager protocols can't be subclassed

2019-09-02 Thread Divij Rajkumar
New submission from Divij Rajkumar : 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

[issue38008] ContextManager and AsyncContextManager protocols can't be subclassed

2019-09-02 Thread Divij Rajkumar
Divij Rajkumar added the comment: I'd like to take a stab at putting up a patch for this but I've never contributed anything to Python before, so I'll have a read through the contribution docs and put up a PR. -- ___ Python

[issue38008] ContextManager and AsyncContextManager protocols can't be subclassed

2019-09-02 Thread Divij Rajkumar
Change by Divij Rajkumar : -- keywords: +patch pull_requests: +15313 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15647 ___ Python tracker <https://bugs.python.org/issu