]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-105570: Deprecate unusual ways of creating empty TypedDicts (#105780)
authorAlex Waygood <Alex.Waygood@Gmail.com>
Wed, 14 Jun 2023 14:58:41 +0000 (15:58 +0100)
committerGitHub <noreply@github.com>
Wed, 14 Jun 2023 14:58:41 +0000 (14:58 +0000)
commit7b1f0f204a785485de1daf9d26828a81953537e4
tree6f11456f04444190aa5b2e3bf1cc5ff41f915575
parentd32e8d6070057eb7ad0eb2f9d9f1efab38b2cff4
gh-105570: Deprecate unusual ways of creating empty TypedDicts (#105780)

Deprecate two methods of creating typing.TypedDict classes with 0 fields using the functional syntax: `TD = TypedDict("TD")` and `TD = TypedDict("TD", None)`. Both will be disallowed in Python 3.15. To create a TypedDict class with 0 fields, either use `class TD(TypedDict): pass` or `TD = TypedDict("TD", {})`.
Doc/library/typing.rst
Doc/whatsnew/3.13.rst
Lib/test/test_typing.py
Lib/typing.py
Misc/NEWS.d/next/Library/2023-06-14-14-32-31.gh-issue-105570.sFTtQU.rst [new file with mode: 0644]