8000 bpo-46469: Make asyncio generic classes return GenericAlias by kumaraditya303 · Pull Request #30777 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-46469: Make asyncio generic classes return GenericAlias #30777

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 22, 2022

Conversation

kumaraditya303
Copy link
Contributor
@kumaraditya303 kumaraditya303 commented Jan 22, 2022

@JelleZijlstra
Copy link
Member

These methods have existed since 3.9, but apparently aren't documented. Should the fix be backported?

Copy link
Member
@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should probably also add these types to

generic_types = [type, tuple, list, dict, set, frozenset, enumerate,

@kumaraditya303
Copy link
Contributor Author

These methods have existed since 3.9, but apparently aren't documented. Should the fix be backported?

This should be backported.

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
@kumaraditya303
Copy link
Contributor Author

You should probably also add these types to

generic_types = [type, tuple, list, dict, set, frozenset, enumerate,

There isn't any need to test it more than once and in the asyncio it tests both the c and python implementation so no need.

@asvetlov asvetlov added needs backport to 3.9 only security fixes needs backport to 3.10 only security fixes labels Jan 22, 2022
@asvetlov asvetlov merged commit ea5b968 into python:main Jan 22, 2022
@miss-islington
Copy link
Contributor

Thanks @kumaraditya303 for the PR, and @asvetlov for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10.
🐍🍒⛏🤖

@kumaraditya303 kumaraditya303 deleted the issue46469 branch January 22, 2022 11:29
@miss-islington
Copy link
Contributor

Sorry, @kumaraditya303 and @asvetlov, I could not cleanly backport this to 3.9 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker ea5b96842e066623a53015d8b2492ed61a5baf96 3.9

@bedevere-bot
Copy link

GH-30784 is a backport of this pull request to the 3.10 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Jan 22, 2022
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 22, 2022
…-30777)

* bpo-46469: Make asyncio generic classes return GenericAlias

* 📜🤖 Added by blurb_it.

* Update Misc/NEWS.d/next/Library/2022-01-22-05-05-08.bpo-46469.plUab5.rst

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit ea5b968)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
@asvetlov
Copy link
Contributor

Thanks. I'm constantly forgetting to make this change.

@bedevere-bot
Copy link

GH-30785 is a backport of this pull request to the 3.9 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.9 only security fixes label Jan 22, 2022
kumaraditya303 added a commit to kumaraditya303/cpython that referenced this pull request Jan 22, 2022
asvetlov added a commit that referenced this pull request Jan 22, 2022
…H-30777) (#30784)

* bpo-46469: Make asyncio generic classes return GenericAlias (GH-30777)

* bpo-46469: Make asyncio generic classes return GenericAlias

* 📜🤖 Added by blurb_it.

* Update Misc/NEWS.d/next/Library/2022-01-22-05-05-08.bpo-46469.plUab5.rst

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit ea5b968)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>

* Fix tests

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
miss-islington pushed a commit that referenced this pull request Jan 22, 2022
hello-adam pushed a commit to hello-adam/cpython that referenced this pull request Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants
0