bpo-38979: fix ContextVar "__class_getitem__" method#17497
Conversation
| @@ -0,0 +1,3 @@ | |||
| return class from __class_getitem__ to simplify subclassing. E.g. `clss = | |||
| contextvars.ContextVar[str]` returned `None` instead of `<class | |||
There was a problem hiding this comment.
IMHO there is no need for examples for this fix
|
cpython/Lib/test/test_context.py Lines 41 to 42 in 26ab478 You need to remove this test |
| @@ -0,0 +1,3 @@ | |||
| return class from __class_getitem__ to simplify subclassing. E.g. `clss = | |||
There was a problem hiding this comment.
You might want to use double backtick for __class_getitem__
There was a problem hiding this comment.
I agree with both @isidentical comments. @amiremohamadi please address them.
Otherwise, the PR looks awesome.
| @@ -0,0 +1,3 @@ | |||
| return class from __class_getitem__ to simplify subclassing. E.g. `clss = | |||
There was a problem hiding this comment.
I agree with both @isidentical comments. @amiremohamadi please address them.
Otherwise, the PR looks awesome.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
|
Since It cannot break any code. |
|
@asvetlov, @isidentical thanks for your help! :) |
|
Thanks for making the requested changes! @asvetlov: please review the changes made to this pull request. |
|
@amiremohamadi: Status check is done, and it's a success ✅ . |
|
Thanks @amiremohamadi for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7, 3.8. |
now contextvars.ContextVar "__class_getitem__" method returns ContextVar class, not None. https://bugs.python.org/issue38979 Automerge-Triggered-By: @asvetlov (cherry picked from commit 28c9163) Co-authored-by: AMIR <31338382+amiremohamadi@users.noreply.github.com>
|
GH-17505 is a backport of this pull request to the 3.8 branch. |
|
GH-17506 is a backport of this pull request to the 3.7 branch. |
now contextvars.ContextVar "__class_getitem__" method returns ContextVar class, not None. https://bugs.python.org/issue38979 Automerge-Triggered-By: @asvetlov (cherry picked from commit 28c9163) Co-authored-by: AMIR <31338382+amiremohamadi@users.noreply.github.com>
now contextvars.ContextVar "__class_getitem__" method returns ContextVar class, not None. https://bugs.python.org/issue38979 Automerge-Triggered-By: @asvetlov (cherry picked from commit 28c9163) Co-authored-by: AMIR <31338382+amiremohamadi@users.noreply.github.com>
|
Thanks @amiremohamadi for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8. |
|
GH-17507 is a backport of this pull request to the 3.8 branch. |
now contextvars.ContextVar "__class_getitem__" method returns ContextVar class, not None. https://bugs.python.org/issue38979 Automerge-Triggered-By: @asvetlov (cherry picked from commit 28c9163) Co-authored-by: AMIR <31338382+amiremohamadi@users.noreply.github.com>
now contextvars.ContextVar "__class_getitem__" method returns ContextVar class, not None. https://bugs.python.org/issue38979 Automerge-Triggered-By: @asvetlov (cherry picked from commit 28c9163) Co-authored-by: AMIR <31338382+amiremohamadi@users.noreply.github.com>
now contextvars.ContextVar "__class_getitem__" method returns ContextVar class, not None. https://bugs.python.org/issue38979 Automerge-Triggered-By: @asvetlov
now contextvars.ContextVar "class_getitem" method returns ContextVar class, not None.
https://bugs.python.org/issue38979
Automerge-Triggered-By: @asvetlov