René's URL Explorer Experiment


Title: conformance: allow consistent treatment of kwargs: Unpack[TD] by carljm · Pull Request #2272 · python/typing · GitHub

Open Graph Title: conformance: allow consistent treatment of kwargs: Unpack[TD] by carljm · Pull Request #2272 · python/typing

X Title: conformance: allow consistent treatment of kwargs: Unpack[TD] by carljm · Pull Request #2272 · python/typing

Description: The conformance suite currently asserts this (simplified for clarity): class TD(TypedDict): v1: int def f(**kwargs: Unpack[TD]): ... f(v1=1, v2=2) # E: TD doesn't contain `v2` This implies that the signature of f de-sugars to f(*, v1: int). But the current conformance suite simultaneously also requires that callable assignability behave as if it de-sugars to f(*, v1: int, **kwargs: object). That addition to the conformance suite was justified by this call, which is allowed by pyright and pyrefly: class TD2(TD1): v2: int def _(td2: TD2): f(**td2) It seems reasonable to allow this call, because TD2 is a subtype of TD1 and assignable to it, so **td2 should therefore be acceptable for **kwargs: Unpack[TD1]. But if this call (which definitely provides a keyword argument v2) is allowed, then we should also allow the above call that explicitly provides v2. I think we could defensibly pick either of the interpretations of the signature of f (with or without **kwargs: object), but type checkers should be allowed to pick a consistent interpretation, not be required to implement an inconsistent hybrid behavior. The interpretation with **kwargs: object is IMO more consistent and better supported by the spec. The spec says that if TD has extra_items, then arbitrary additional keyword arguments of that type should be accepted. And it also says that a TypedDict without an explicit closed or extra_items parameter usually behaves as if it has extra_items of type ReadOnly[object]. The interpretation without **kwargs: object would effectively be saying that **kwargs: Unpack[TD] is one of these special cases (along with TypedDict constructor calls) where an unmarked TypedDict is (inconsistent with its "open" semantics) not treated as having extra_items of type ReadOnly[object]. We can have a discussion about which of these interpretations should be preferred, but given the lack of clarity about this in the spec, I think for now a conformant implementation should be allowed to choose either interpretation and implement it consistently.

Open Graph Description: The conformance suite currently asserts this (simplified for clarity): class TD(TypedDict): v1: int def f(**kwargs: Unpack[TD]): ... f(v1=1, v2=2) # E: TD doesn't contain `v2` This implies t...

X Description: The conformance suite currently asserts this (simplified for clarity): class TD(TypedDict): v1: int def f(**kwargs: Unpack[TD]): ... f(v1=1, v2=2) # E: TD doesn't contain `v2` This impli...

Opengraph URL: https://github.com/python/typing/pull/2272

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:d5b8af6a-5a1f-4d53-d08a-8c2034347172
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idED9C:37E442:1BFB9F:244084:6AFF93A2
html-safe-nonce4c3ccdad899c471f35d1d715e98cfc9c1dd0ad39d8c502189d21cca7855389c0
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFRDlDOjM3RTQ0MjoxQkZCOUY6MjQ0MDg0OjZBRkY5M0EyIiwidmlzaXRvcl9pZCI6IjM1NTEyMDcyMjcwMzEyNjIxMTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac0685a3017eae7dfbc835a37cffe98cc43b26d26557eedd498717ec800b3b00a2
hovercard-subject-tagpull_request:3570277611
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/typing/pull/2272/files
twitter:imagehttps://avatars.githubusercontent.com/u/61586?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/61586?s=400&v=4
og:image:altThe conformance suite currently asserts this (simplified for clarity): class TD(TypedDict): v1: int def f(**kwargs: Unpack[TD]): ... f(v1=1, v2=2) # E: TD doesn't contain `v2` This implies t...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None2c75d045e8c84b51e2ac680086a6dd1eeaf2bc15b82137d22ee5106835d6256c
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python/typing git https://github.com/python/typing.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id24604008
octolytics-dimension-repository_nwopython/typing
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id24604008
octolytics-dimension-repository_network_root_nwopython/typing
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseaa486b0389431f870c0adf9d4758aaff807c2d97
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/typing/pull/2272/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftyping%2Fpull%2F2272%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftyping%2Fpull%2F2272%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python%2Ftyping
Reloadhttps://github.com/python/typing/pull/2272/files
Reloadhttps://github.com/python/typing/pull/2272/files
Reloadhttps://github.com/python/typing/pull/2272/files
pythonhttps://github.com/python
typinghttps://github.com/python/typing
Codehttps://github.com/python/typing
Issues206 (206)https://github.com/python/typing/issues
Pull requests27 (27)https://github.com/python/typing/pulls
Discussionshttps://github.com/python/typing/discussions
Actionshttps://github.com/python/typing/actions
Security and qualityhttps://github.com/python/typing/security
Insightshttps://github.com/python/typing/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Ftyping%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Ftyping%2Fissues%2Fnew%2Fchoose
carljmhttps://github.com/carljm
python:mainhttps://github.com/python/typing/tree/main
carljm:unpacktdhttps://github.com/carljm/typing/tree/unpacktd
Conversation 5 https://github.com/python/typing/pull/2272
Commits 1 https://github.com/python/typing/pull/2272/commits
Checks 3 https://github.com/python/typing/pull/2272/checks
Files changed https://github.com/python/typing/pull/2272/files
Please reload this pagehttps://github.com/python/typing/pull/2272/files
conformance: allow consistent treatment of kwargs: Unpack[TD] https://github.com/python/typing/pull/2272/files#top
Show all changes 1 commit https://github.com/python/typing/pull/2272/files
66f9517 allow consistent treatment of kwargs: Unpack[TD] carljm Apr 23, 2026 https://github.com/python/typing/pull/2272/commits/66f95170aea7faf64ab88a912646442da34a98af
Clear filters https://github.com/python/typing/pull/2272/files
Please reload this pagehttps://github.com/python/typing/pull/2272/files
Please reload this pagehttps://github.com/python/typing/pull/2272/files
callables_kwargs.toml https://github.com/python/typing/pull/2272/files#diff-10ea6f3299b7fef54e510b72a48e3bada4095332b757efcf950cdbe0e8cf8d21
callables_kwargs.py https://github.com/python/typing/pull/2272/files#diff-ba0f1bbddc55c509d76124c5014a7bad92e83071cb7c0b7fa0a4b03b7b3d672f
conformance/results/ty/callables_kwargs.tomlhttps://github.com/python/typing/pull/2272/files#diff-10ea6f3299b7fef54e510b72a48e3bada4095332b757efcf950cdbe0e8cf8d21
View file https://github.com/carljm/typing/blob/66f95170aea7faf64ab88a912646442da34a98af/conformance/results/ty/callables_kwargs.toml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/typing/pull/2272/{{ revealButtonHref }}
https://github.com/python/typing/pull/2272/files#diff-10ea6f3299b7fef54e510b72a48e3bada4095332b757efcf950cdbe0e8cf8d21
https://github.com/python/typing/pull/2272/files#diff-10ea6f3299b7fef54e510b72a48e3bada4095332b757efcf950cdbe0e8cf8d21
conformance/tests/callables_kwargs.pyhttps://github.com/python/typing/pull/2272/files#diff-ba0f1bbddc55c509d76124c5014a7bad92e83071cb7c0b7fa0a4b03b7b3d672f
View file https://github.com/carljm/typing/blob/66f95170aea7faf64ab88a912646442da34a98af/conformance/tests/callables_kwargs.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/typing/pull/2272/{{ revealButtonHref }}
https://github.com/python/typing/pull/2272/files#diff-ba0f1bbddc55c509d76124c5014a7bad92e83071cb7c0b7fa0a4b03b7b3d672f
https://github.com/python/typing/pull/2272/files#diff-ba0f1bbddc55c509d76124c5014a7bad92e83071cb7c0b7fa0a4b03b7b3d672f
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.