]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-46539: Pass status of special typeforms to forward references (GH-30926)
authorGregory Beauregard <greg@greg.red>
Thu, 27 Jan 2022 03:11:51 +0000 (19:11 -0800)
committerGitHub <noreply@github.com>
Thu, 27 Jan 2022 03:11:51 +0000 (19:11 -0800)
commitced50051bb752a7c1e616f4b0c001f37f0354f32
tree4a7aa2eaba20f2da05fdff0d31d58f48544ab9d5
parent6b491b9dc0b0fdfd1f07ea4e2151236186d8e7e6
bpo-46539: Pass status of special typeforms to forward references (GH-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.
Lib/test/test_typing.py
Lib/typing.py
Misc/NEWS.d/next/Library/2022-01-26-20-36-30.bpo-46539.23iW1d.rst [new file with mode: 0644]