Skip to content

Conversation

@miss-islington
Copy link
Contributor

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

Previously this didn't matter because there weren't any valid code paths
that could trigger a type check with a special form, but after the bug
fix for Annotated wrapping special forms it's now possible to annotate
something like Annotated['ClassVar[int]', (3, 4)]. This change would
also be needed for proposed future changes, such as allowing ClassVar
and Final to nest each other in dataclasses.
(cherry picked from commit ced5005)

Co-authored-by: Gregory Beauregard greg@greg.red

https://bugs.python.org/issue46539

…thonGH-30926)

Previously this didn't matter because there weren't any valid code paths
that could trigger a type check with a special form, but after the bug
fix for `Annotated` wrapping special forms it's now possible to annotate
something like `Annotated['ClassVar[int]', (3, 4)]`. This change would
also be needed for proposed future changes, such as allowing `ClassVar`
and `Final` to nest each other in dataclasses.
(cherry picked from commit ced5005)

Co-authored-by: Gregory Beauregard <greg@greg.red>
@miss-islington
Copy link
Contributor Author

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

1 similar comment
@miss-islington
Copy link
Contributor Author

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

@miss-islington
Copy link
Contributor Author

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

@miss-islington miss-islington merged commit bfcb414 into python:3.10 Jan 27, 2022
@miss-islington miss-islington deleted the backport-ced5005-3.10 branch January 27, 2022 16:48
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.

6 participants