Skip to content
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

bpo-46491: Allow Annotated on outside of Final/ClassVar #30864

Merged
merged 6 commits into from Jan 25, 2022

Conversation

GBeauregard
Copy link
Contributor

@GBeauregard GBeauregard commented Jan 24, 2022

We treat Annotated type arg as class-level annotation. This exempts it from checks against Final and ClassVar in order to allow using them in any nesting order.

https://bugs.python.org/issue46491

Automerge-Triggered-By: GH:gvanrossum

This exempts it from checks against Final and ClassVar in order to allow
using them in any nesting order.
Copy link
Member

@JelleZijlstra JelleZijlstra left a comment

Thanks for your contribution! A few comments.

Lib/typing.py Outdated Show resolved Hide resolved
@gvanrossum
Copy link
Member

@gvanrossum gvanrossum commented Jan 25, 2022

Please add me back once this is ready to merge.

@GBeauregard GBeauregard requested a review from JelleZijlstra Jan 25, 2022
Copy link
Member

@JelleZijlstra JelleZijlstra left a comment

@gvanrossum I think this is ready now.

@gvanrossum gvanrossum added the 🤖 automerge label Jan 25, 2022
@gvanrossum
Copy link
Member

@gvanrossum gvanrossum commented Jan 25, 2022

Maybe this should be backported?

@JelleZijlstra
Copy link
Member

@JelleZijlstra JelleZijlstra commented Jan 25, 2022

Agree, I added the labels

@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Jan 25, 2022

@GBeauregard: Status check is done, and it's a success .

@miss-islington miss-islington merged commit e1abffc into python:main Jan 25, 2022
12 checks passed
@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Jan 25, 2022

Thanks @GBeauregard for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10.
🐍🍒🤖

@bedevere-bot
Copy link

@bedevere-bot bedevere-bot commented Jan 25, 2022

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

miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jan 25, 2022
We treat Annotated type arg as class-level annotation. This exempts it from checks against Final and ClassVar in order to allow using them in any nesting order.

Automerge-Triggered-By: GH:gvanrossum
(cherry picked from commit e1abffc)

Co-authored-by: Gregory Beauregard <greg@greg.red>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jan 25, 2022
We treat Annotated type arg as class-level annotation. This exempts it from checks against Final and ClassVar in order to allow using them in any nesting order.

Automerge-Triggered-By: GH:gvanrossum
(cherry picked from commit e1abffc)

Co-authored-by: Gregory Beauregard <greg@greg.red>
@bedevere-bot
Copy link

@bedevere-bot bedevere-bot commented Jan 25, 2022

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

miss-islington added a commit that referenced this issue Jan 25, 2022
We treat Annotated type arg as class-level annotation. This exempts it from checks against Final and ClassVar in order to allow using them in any nesting order.

Automerge-Triggered-By: GH:gvanrossum
(cherry picked from commit e1abffc)

Co-authored-by: Gregory Beauregard <greg@greg.red>
miss-islington added a commit that referenced this issue Jan 25, 2022
We treat Annotated type arg as class-level annotation. This exempts it from checks against Final and ClassVar in order to allow using them in any nesting order.

Automerge-Triggered-By: GH:gvanrossum
(cherry picked from commit e1abffc)

Co-authored-by: Gregory Beauregard <greg@greg.red>
@GBeauregard GBeauregard deleted the fix-issue-46491 branch Feb 6, 2022
erlend-aasland pushed a commit to erlend-aasland/cpython that referenced this issue Feb 11, 2022
We treat Annotated type arg as class-level annotation. This exempts it from checks against Final and ClassVar in order to allow using them in any nesting order.

Automerge-Triggered-By: GH:gvanrossum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA signed 🤖 automerge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants