Issue38979
Created on 2019-12-05 13:04 by asvetlov, last changed 2019-12-08 12:49 by asvetlov. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 17497 | merged | Amir, 2019-12-07 13:10 | |
| PR 17505 | closed | miss-islington, 2019-12-08 11:36 | |
| PR 17506 | merged | miss-islington, 2019-12-08 11:36 | |
| PR 17507 | merged | miss-islington, 2019-12-08 12:25 | |
| Messages (8) | |||
|---|---|---|---|
| msg357850 - (view) | Author: Andrew Svetlov (asvetlov) * | Date: 2019-12-05 13:04 | |
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. |
|||
| msg357877 - (view) | Author: Yury Selivanov (yselivanov) * | Date: 2019-12-05 18:18 | |
> 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. |
|||
| msg357887 - (view) | Author: Florian Dahlitz (DahlitzFlorian) * | Date: 2019-12-05 20:02 | |
I'd be happy to work on this! |
|||
| msg357963 - (view) | Author: Amir Mohamadi (Amir) * | Date: 2019-12-07 09:07 | |
@asvetlov I have a question! Should "contextvar_cls_getitem" function be changed? And can you please help me figure out how to change it? |
|||
| msg357964 - (view) | Author: Andrew Svetlov (asvetlov) * | Date: 2019-12-07 10:28 | |
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. |
|||
| msg357997 - (view) | Author: miss-islington (miss-islington) | Date: 2019-12-08 11:36 | |
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 |
|||
| msg357998 - (view) | Author: miss-islington (miss-islington) | Date: 2019-12-08 11:53 | |
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 |
|||
| msg358001 - (view) | Author: miss-islington (miss-islington) | Date: 2019-12-08 12:49 | |
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 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2019-12-08 12:49:21 | asvetlov | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2019-12-08 12:49:11 | miss-islington | set | messages: + msg358001 |
| 2019-12-08 12:25:10 | miss-islington | set | pull_requests: + pull_request16984 |
| 2019-12-08 11:53:11 | miss-islington | set | messages: + msg357998 |
| 2019-12-08 11:36:40 | miss-islington | set | pull_requests: + pull_request16983 |
| 2019-12-08 11:36:33 | miss-islington | set | pull_requests: + pull_request16982 |
| 2019-12-08 11:36:06 | miss-islington | set | nosy:
+ miss-islington messages: + msg357997 |
| 2019-12-07 13:10:38 | Amir | set | keywords:
+ patch stage: patch review pull_requests: + pull_request16975 |
| 2019-12-07 10:28:55 | asvetlov | set | messages: + msg357964 |
| 2019-12-07 09:07:51 | Amir | set | nosy:
+ Amir, - gvanrossum, yselivanov, levkivskyi, DahlitzFlorian messages: + msg357963 |
| 2019-12-05 20:02:04 | DahlitzFlorian | set | nosy:
+ DahlitzFlorian messages: + msg357887 |
| 2019-12-05 18:33:32 | levkivskyi | set | keywords: + easy (C) |
| 2019-12-05 18:19:20 | serhiy.storchaka | set | nosy:
+ gvanrossum, levkivskyi |
| 2019-12-05 18:18:11 | yselivanov | set | messages: + msg357877 |
| 2019-12-05 13:04:29 | asvetlov | set | type: behavior |
| 2019-12-05 13:04:18 | asvetlov | create | |