Skip to content

Update TypedDictType.__init__ signature to preserve backward compat#21590

Merged
JukkaL merged 2 commits into
masterfrom
typeddict-init-sig
Jun 4, 2026
Merged

Update TypedDictType.__init__ signature to preserve backward compat#21590
JukkaL merged 2 commits into
masterfrom
typeddict-init-sig

Conversation

@JukkaL
Copy link
Copy Markdown
Collaborator

@JukkaL JukkaL commented Jun 4, 2026

The new signature added a new parameter in the middle of the signature,
which may break plugins. Add the new parameter to the end of the parameter
list with a default value so that existing calls will continue to work. This looks
a bit ugly, but backward compatibility is the priority here.

JukkaL added 2 commits June 4, 2026 13:32
The new signature added a new parameter in the middle of the signature,
which may break plugins that use positional arguments. Add the
new parameter to the end of the parameter list so that existing
calls will continue to work. This looks a bit ugly, but backward
compatibility is the priority here.
@JukkaL JukkaL requested a review from ilevkivskyi June 4, 2026 13:52
Copy link
Copy Markdown
Member

@ilevkivskyi ilevkivskyi left a comment

Choose a reason for hiding this comment

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

Good idea!

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 4, 2026

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@JukkaL JukkaL merged commit 7c9097b into master Jun 4, 2026
25 checks passed
@JukkaL JukkaL deleted the typeddict-init-sig branch June 4, 2026 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants