Skip to content

Clarify when typing.Unpack added support for typing.TypedDict#152552

Open
ekohilas wants to merge 1 commit into
python:mainfrom
ekohilas:patch-2
Open

Clarify when typing.Unpack added support for typing.TypedDict#152552
ekohilas wants to merge 1 commit into
python:mainfrom
ekohilas:patch-2

Conversation

@ekohilas

Copy link
Copy Markdown
Contributor

typing.Unpack was added in version 3.11, but the ability to use it with TypedDict for **kwargs was added in 3.12.

Currently, the positioning makes it look like using typing.Unpack with TypedDict was added in 3.11

typing.Unpack was added in version 3.11, but the ability to use it with TypedDict for `**kwargs` was added in 3.12.

Currently, the positioning makes it look like using typing.Unpack with TypedDict was added in 3.11
@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #33350593 | 📁 Comparing 5f38127 against main (2670cb0)

  🔍 Preview build  

1 file changed
± library/typing.html

Comment thread Doc/library/typing.rst
tup: tuple[*Ts] # Syntax error on Python <= 3.10!
tup: tuple[Unpack[Ts]] # Semantically equivalent, and backwards-compatible

.. versionadded:: 3.11

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We usually put the version added at the end of the text unless there is a clear separation. Instead, I would suggest adding the following line:

.. versionadded:: 3.11

.. versionchanged:: 3.12
   Added support for :class:`typing.TypedDict`.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, sounds good to me!

@picnixz picnixz changed the title Add clarity for version added for typing.Unpack Clarify when typing.Unpack added support for typing.TypedDict Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants