]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-91243: Add typing.Required and NotRequired (PEP 655) (GH-32419)
authorJelle Zijlstra <jelle.zijlstra@gmail.com>
Tue, 12 Apr 2022 19:31:02 +0000 (12:31 -0700)
committerGitHub <noreply@github.com>
Tue, 12 Apr 2022 19:31:02 +0000 (12:31 -0700)
commitac6c3de03c5bb06a9a463701fb297148f5a5746f
tree25b1ec6488f3200156cfea2704179d2a0e90c0c2
parent474fdbe9e4a2ff90ef39e8748da644c86a200981
gh-91243: Add typing.Required and NotRequired (PEP 655) (GH-32419)

I talked to @davidfstr and I offered to implement the runtime part of PEP 655
to make sure we can get it in before the feature freeze. We're going to defer
the documentation to a separate PR, because it can wait until after the feature
freeze.

The runtime implementation conveniently already exists in typing-extensions,
so I largely copied that.

Co-authored-by: David Foster <david@dafoster.net>
Lib/test/_typed_dict_helper.py
Lib/test/test_typing.py
Lib/typing.py
Misc/NEWS.d/next/Library/2022-04-08-08-55-36.bpo-47087.Q5C3EI.rst [new file with mode: 0644]