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

2019-09-12 Thread Ivan Levkivskyi


Change by Ivan Levkivskyi :


--
components: +Library (Lib)
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions:  -Python 2.7, Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2019-09-12 Thread miss-islington


miss-islington  added the comment:


New changeset 52baf90a74f3a4573f4266bb4ca8569534db42a9 by Miss Islington (bot) 
in branch '3.8':
bpo-38008: Move builtin protocol whitelist to mapping instead of list (GH-15647)
https://github.com/python/cpython/commit/52baf90a74f3a4573f4266bb4ca8569534db42a9


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2019-09-12 Thread Ivan Levkivskyi


Ivan Levkivskyi  added the comment:


New changeset 692a0dc91597b7fb350383b633dc4d044cbd360e by Ivan Levkivskyi 
(Divij Rajkumar) in branch 'master':
bpo-38008: Move builtin protocol whitelist to mapping instead of list (GH-15647)
https://github.com/python/cpython/commit/692a0dc91597b7fb350383b633dc4d044cbd360e


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2019-09-12 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15644
pull_request: https://github.com/python/cpython/pull/16021

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2019-09-02 Thread Ivan Levkivskyi


Ivan Levkivskyi  added the comment:

> I'd like to take a stab at putting up a patch for this

Great, thanks! Go ahead and try it.

--
nosy: +levkivskyi

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com