Skip to content

Remove deprecated implicit empty sequence argument for typing.TypedDict #133823

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
picnixz opened this issue May 10, 2025 · 7 comments
Closed

Remove deprecated implicit empty sequence argument for typing.TypedDict #133823

picnixz opened this issue May 10, 2025 · 7 comments
Assignees
Labels
stdlib Python modules in the Lib dir topic-typing type-feature A feature request or enhancement

Comments

@picnixz
Copy link
Member

picnixz commented May 10, 2025

Feature or enhancement

Proposal:

It was deprecated in 3.13 but there was no removal notice in the docs: see #105570 and #105780. I don't know whether it's better to delay it a bit more just to have a deprecation notice or to first add a deprecation notice for 3.13 and 3.14, but still remove it in 3.15.

cc @AlexWaygood

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

@picnixz picnixz added type-feature A feature request or enhancement stdlib Python modules in the Lib dir topic-typing labels May 10, 2025
@AlexWaygood
Copy link
Member

there was no removal notice in the docs

What do you mean exactly? #105780 added detailed deprecation notes to the API reference for typing.TypedDict and to "What's new in Python 3.13". It also included a NEWS entry noting the deprecation, and added DeprecationWarnings at runtime.

@picnixz
Copy link
Member Author

picnixz commented May 10, 2025

I meant in the pending deprecation section (which had the other removal notices)

@AlexWaygood
Copy link
Member

I see. Personally I think we've given enough notice for this removal in enough places, but I also don't mind if you want to add some notes there too and extend the deprecation period. It's not a huge maintenance burden for that code to hang around for a bit longer.

@picnixz
Copy link
Member Author

picnixz commented May 10, 2025

How about this:

  • Add entries in the "pending deprecation" section for 3.13 and 3.14
  • Go with the removal for 3.15.

I just wanted to be sure it was fine on your side as you're a codeowner of typing.py. I also feel it's a bit weird that we don't remove the TypedDict kw syntax but remove the NamedTuple kw syntax so I'm all for the removal in 3.15 (it simplifies the code quite a lot)

@AlexWaygood
Copy link
Member

Yeah that plan sounds fine by me! I don't think the syntax that was deprecated was widely used at all, and I think the pending removal was pretty well signalled

@picnixz picnixz self-assigned this May 10, 2025
@JelleZijlstra
Copy link
Member

I'm also fine with getting rid of this (and the NamedTuple equivalent) now.

@picnixz
Copy link
Member Author

picnixz commented May 10, 2025

See #133822 for the NamedTuple equivalent. I'll do the TypedDict one tomorrow.

@picnixz picnixz changed the title Remove deprecated keyword argument syntax for typing.TypedDict Remove deprecated implicit empty sequence argument for typing.TypedDict May 11, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this issue May 11, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this issue May 11, 2025
picnixz added a commit that referenced this issue May 11, 2025
…Dict` (GH-133864) (#133870)

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]>
picnixz added a commit that referenced this issue May 11, 2025
…Dict` (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]>
@picnixz picnixz closed this as completed May 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir topic-typing type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

3 participants