[issue38979] ContextVar[str] should return ContextVar class, not None

2019-12-08 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue38979] ContextVar[str] should return ContextVar class, not None

2019-12-08 Thread miss-islington


miss-islington  added the comment:


New changeset 960fca1a5887a277fd6031cf4c4b6fb31b08ebf5 by Miss Islington (bot) 
in branch '3.8':
bpo-38979: fix ContextVar "__class_getitem__" method (GH-17497)
https://github.com/python/cpython/commit/960fca1a5887a277fd6031cf4c4b6fb31b08ebf5


--

___
Python tracker 

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



[issue38979] ContextVar[str] should return ContextVar class, not None

2019-12-08 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16984
pull_request: https://github.com/python/cpython/pull/17507

___
Python tracker 

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



[issue38979] ContextVar[str] should return ContextVar class, not None

2019-12-08 Thread miss-islington


miss-islington  added the comment:


New changeset 9baa870c27b54c26f9dd292c26936b70bdb64a06 by Miss Islington (bot) 
in branch '3.7':
bpo-38979: fix ContextVar "__class_getitem__" method (GH-17497)
https://github.com/python/cpython/commit/9baa870c27b54c26f9dd292c26936b70bdb64a06


--

___
Python tracker 

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



[issue38979] ContextVar[str] should return ContextVar class, not None

2019-12-08 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16982
pull_request: https://github.com/python/cpython/pull/17505

___
Python tracker 

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



[issue38979] ContextVar[str] should return ContextVar class, not None

2019-12-08 Thread miss-islington


miss-islington  added the comment:


New changeset 28c91631c24e53713ad0e8a2bbae716373f5e53d by Miss Islington (bot) 
(AMIR) in branch 'master':
bpo-38979: fix ContextVar "__class_getitem__" method (GH-17497)
https://github.com/python/cpython/commit/28c91631c24e53713ad0e8a2bbae716373f5e53d


--
nosy: +miss-islington

___
Python tracker 

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



[issue38979] ContextVar[str] should return ContextVar class, not None

2019-12-08 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16983
pull_request: https://github.com/python/cpython/pull/17506

___
Python tracker 

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



[issue38979] ContextVar[str] should return ContextVar class, not None

2019-12-07 Thread Amir Mohamadi


Change by Amir Mohamadi :


--
keywords: +patch
pull_requests: +16975
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/17497

___
Python tracker 

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



[issue38979] ContextVar[str] should return ContextVar class, not None

2019-12-07 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

I think it should look like the corresponding function from multidict: 
https://github.com/aio-libs/multidict/blob/master/multidict/_multidict.c#L803-L808

Please note, the method definition also should be updated, see 
https://github.com/aio-libs/multidict/blob/master/multidict/_multidict.c#L923-L928
 for inspiration.

--

___
Python tracker 

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



[issue38979] ContextVar[str] should return ContextVar class, not None

2019-12-07 Thread Amir Mohamadi


Amir Mohamadi  added the comment:

@asvetlov I have a question! Should "contextvar_cls_getitem" function be 
changed? And can you please help me figure out how to change it?

--
nosy: +Amir -DahlitzFlorian, gvanrossum, levkivskyi, yselivanov

___
Python tracker 

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



[issue38979] ContextVar[str] should return ContextVar class, not None

2019-12-05 Thread Florian Dahlitz


Florian Dahlitz  added the comment:

I'd be happy to work on this!

--
nosy: +DahlitzFlorian

___
Python tracker 

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



[issue38979] ContextVar[str] should return ContextVar class, not None

2019-12-05 Thread Ivan Levkivskyi


Change by Ivan Levkivskyi :


--
keywords: +easy (C)

___
Python tracker 

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



[issue38979] ContextVar[str] should return ContextVar class, not None

2019-12-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
nosy: +gvanrossum, levkivskyi

___
Python tracker 

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



[issue38979] ContextVar[str] should return ContextVar class, not None

2019-12-05 Thread Yury Selivanov


Yury Selivanov  added the comment:

> The issue is minor, I suspect nobody wants to derive from ContextVar class.

I don't think that's allowed, actually.

> The generic implementation for __class_getitem__ is returning unmodified self 
> argument. Yuri, is there a reason to behave differently in the case of 
> ContextVar?

No, just an oversight, probably.

--

___
Python tracker 

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



[issue38979] ContextVar[str] should return ContextVar class, not None

2019-12-05 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
type:  -> behavior

___
Python tracker 

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



[issue38979] ContextVar[str] should return ContextVar class, not None

2019-12-05 Thread Andrew Svetlov


New submission from Andrew Svetlov :

The issue is minor, I suspect nobody wants to derive from ContextVar class.

The generic implementation for __class_getitem__ is returning unmodified self 
argument. Yuri, is there a reason to behave differently in the case of 
ContextVar?

If no, we can mark the issue as easy(C) and wait for a volunteer, the fix seems 
trivial.

--
components: Extension Modules
messages: 357850
nosy: asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: ContextVar[str] should return ContextVar class, not None
versions: 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