Skip to content

Commit 927da99

Browse files
[3.13] gh-133823: update "Pending Removal in 3.15" notes about TypedDict (GH-133864) (#133871)
gh-133823: update "Pending Removal in 3.15" notes about `TypedDict` (GH-133864) (cherry picked from commit f91127a) Co-authored-by: Bénédikt Tran <[email protected]>
1 parent f0a88e2 commit 927da99

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Doc/deprecations/pending-removal-in-3.15.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,13 @@ Pending Removal in Python 3.15
8585
has been deprecated since Python 3.13.
8686
Use the class-based syntax or the functional syntax instead.
8787

88+
* When using the functional syntax of :class:`~typing.TypedDict`\s, failing
89+
to pass a value to the *fields* parameter (``TD = TypedDict("TD")``) or
90+
passing ``None`` (``TD = TypedDict("TD", None)``) has been deprecated
91+
since Python 3.13.
92+
Use ``class TD(TypedDict): pass`` or ``TD = TypedDict("TD", {})``
93+
to create a TypedDict with zero field.
94+
8895
* The :func:`typing.no_type_check_decorator` decorator function
8996
has been deprecated since Python 3.13.
9097
After eight years in the :mod:`typing` module,

0 commit comments

Comments
 (0)