René's URL Explorer Experiment


Title: Use contravariant type variable rather than `object` in `Container` by randolf-scholz · Pull Request #15320 · python/typeshed · GitHub

Open Graph Title: Use contravariant type variable rather than `object` in `Container` by randolf-scholz · Pull Request #15320 · python/typeshed

X Title: Use contravariant type variable rather than `object` in `Container` by randolf-scholz · Pull Request #15320 · python/typeshed

Description: Collection of library stubs for Python, with static types - Use contravariant type variable rather than `object` in `Container` by randolf-scholz · Pull Request #15320 · python/typeshed

Open Graph Description: Fixes #15307 See Also: #15319 This PR changes the generic type of collections.abc.Container from covariant to contravariant and lets the key be of this type rather than object. The current definiti...

X Description: Fixes #15307 See Also: #15319 This PR changes the generic type of collections.abc.Container from covariant to contravariant and lets the key be of this type rather than object. The current definiti...

Opengraph URL: https://github.com/python/typeshed/pull/15320

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/_view_fragments/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format)
route-controllervoltron_pull_requests_fragments
route-actionpull_request_layout
fetch-noncev2:37f6817a-c7c6-5d13-8a46-d6eda20cbb86
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE60E:33DDEF:1F2011A:2A9134B:6B002339
html-safe-nonce2e17b02695f517635f254a82e1fa3b1546f77100a846f0ec1640e786a9448329
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNjBFOjMzRERFRjoxRjIwMTFBOjJBOTEzNEI6NkIwMDIzMzkiLCJ2aXNpdG9yX2lkIjoiNDM2OTYwNjM2MDQ1MTUyMzM4NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacd719004aa4597ba956c1710014e86f39f10174a378f969d38eaaead07fd7ed4a
hovercard-subject-tagpull_request:3206768543
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///voltron/pull_requests_fragments/pull_request_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/python/typeshed/15320/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/379f1e99adeeebae7cfff0275248d2a1782b57e7640f3f7176ff6ff03662d165/python/typeshed/pull/15320
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/379f1e99adeeebae7cfff0275248d2a1782b57e7640f3f7176ff6ff03662d165/python/typeshed/pull/15320
og:image:altFixes #15307 See Also: #15319 This PR changes the generic type of collections.abc.Container from covariant to contravariant and lets the key be of this type rather than object. The current definiti...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamerandolf-scholz
hostnamegithub.com
expected-hostnamegithub.com
None4eb4cba0d69f045374ac15de9666d22b0961e1d555cc3824f36b7734c00c78e0
turbo-cache-controlno-cache
go-importgithub.com/python/typeshed git https://github.com/python/typeshed.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id31696383
octolytics-dimension-repository_nwopython/typeshed
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id31696383
octolytics-dimension-repository_network_root_nwopython/typeshed
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release44c658b24abf00491fb7ae5f56d42c9f38cbeab2
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-namepull-requests

Links:

Skip to contenthttps://github.com/python/typeshed/pull/15320#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftypeshed%2Fpull%2F15320
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%2Ftypeshed%2Fpull%2F15320
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=python%2Ftypeshed
Reloadhttps://github.com/python/typeshed/pull/15320
Reloadhttps://github.com/python/typeshed/pull/15320
Reloadhttps://github.com/python/typeshed/pull/15320
pythonhttps://github.com/python
typeshedhttps://github.com/python/typeshed
Codehttps://github.com/python/typeshed
Issues196 (196)https://github.com/python/typeshed/issues
Pull requests251 (251)https://github.com/python/typeshed/pulls
Actionshttps://github.com/python/typeshed/actions
Security and qualityhttps://github.com/python/typeshed/security
Insightshttps://github.com/python/typeshed/insights
https://github.com/python/typeshed
srittauhttps://github.com/srittau
python:mainhttps://github.com/python/typeshed/tree/main
randolf-scholz:proper_containerhttps://github.com/randolf-scholz/typeshed/tree/proper_container
Conversationhttps://github.com/python/typeshed/pull/15320
Commits5 (5)https://github.com/python/typeshed/pull/15320/commits
Checkshttps://github.com/python/typeshed/pull/15320/checks
Files changedhttps://github.com/python/typeshed/pull/15320/files
Use contravariant type variable rather than object in Containerhttps://github.com/python/typeshed/pull/15320#top
srittauhttps://github.com/srittau
python:mainhttps://github.com/python/typeshed/tree/main
randolf-scholz:proper_containerhttps://github.com/randolf-scholz/typeshed/tree/proper_container
https://github.com/randolf-scholz
randolf-scholzhttps://github.com/randolf-scholz
Jan 24, 2026https://github.com/python/typeshed/pull/15320#issue-3851366957
Please reload this pagehttps://github.com/python/typeshed/pull/15320
#15307https://github.com/python/typeshed/issues/15307
#15319https://github.com/python/typeshed/pull/15319
forces a lot ofpeople to resort to type: ignore[override]https://github.com/search?q=%2Fdef+__contains__%5C%28self%2C+%5Cw%2B%3A+%5Cw%2B%5C%29+-%3E+%5Cw%2B%3A%5Cx20%2B%5C%23+type%3A+ignore%2F+language%3APython+&type=code
Please reload this pagehttps://github.com/python/typeshed/pull/15320
randolf-scholzhttps://github.com/randolf-scholz
January 24, 2026 15:46https://github.com/python/typeshed/pull/15320#commits-pushed-53675b6
https://github.com/randolf-scholz
use 'Any' rather than object in Containerhttps://github.com/python/typeshed/pull/15320/commits/53675b6ba3e268258e1d31be5d077f090f7428f1
53675b6https://github.com/python/typeshed/pull/15320/commits/53675b6ba3e268258e1d31be5d077f090f7428f1
https://github.com/randolf-scholz
use contravariant typevarhttps://github.com/python/typeshed/pull/15320/commits/2602adcea6e986d46c9f1a4c36eb3ab06fb26a73
2602adchttps://github.com/python/typeshed/pull/15320/commits/2602adcea6e986d46c9f1a4c36eb3ab06fb26a73
https://github.com/randolf-scholz
randolf-scholzhttps://github.com/randolf-scholz
Jan 24, 2026 https://github.com/python/typeshed/pull/15320#ref-pullrequest-3851360673
Experiment: Use 'Any' rather than object in Container #15319 https://github.com/python/typeshed/pull/15319
https://github.com/apps/github-actions
Sign in to viewhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftypeshed%2Fpull%2F15320
https://github.com/randolf-scholz
randolf-scholzhttps://github.com/randolf-scholz
January 24, 2026 15:01https://github.com/python/typeshed/pull/15320#event-22264015129
https://github.com/randolf-scholz
randolf-scholzhttps://github.com/randolf-scholz
Jan 24, 2026 https://github.com/python/typeshed/pull/15320#ref-issue-3834740524
Should collections.abc.Container be generic? #15307 https://github.com/python/typeshed/issues/15307
https://github.com/randolf-scholz
randolf-scholzhttps://github.com/randolf-scholz
Jan 24, 2026https://github.com/python/typeshed/pull/15320#event-22264054910
https://github.com/randolf-scholz
randolf-scholzhttps://github.com/randolf-scholz
Jan 24, 2026https://github.com/python/typeshed/pull/15320#issuecomment-3794786825
@hauntsaninjahttps://github.com/hauntsaninja
@AlexWaygoodhttps://github.com/AlexWaygood
#8785https://github.com/python/typeshed/pull/8785
Please reload this pagehttps://github.com/python/typeshed/pull/15320
https://github.com/randolf-scholz
add comment for Container[Any] usage in Collectionhttps://github.com/python/typeshed/pull/15320/commits/09a0f41ea240944b6ff69531352c492a0e706a2c
09a0f41https://github.com/python/typeshed/pull/15320/commits/09a0f41ea240944b6ff69531352c492a0e706a2c
https://github.com/srittau
srittauhttps://github.com/srittau
Jan 24, 2026 https://github.com/python/typeshed/pull/15320#pullrequestreview-3701823411
View reviewed changes https://github.com/python/typeshed/pull/15320/files/09a0f41ea240944b6ff69531352c492a0e706a2c
stdlib/typing.pyihttps://github.com/python/typeshed/pull/15320/files/09a0f41ea240944b6ff69531352c492a0e706a2c#diff-b12c4be0f8e39f89957bbe7be6b6327185e18b69ea80a0f62c0746bb26f4a58e
Please reload this pagehttps://github.com/python/typeshed/pull/15320
https://github.com/randolf-scholz
randolf-scholzhttps://github.com/randolf-scholz
Jan 24, 2026https://github.com/python/typeshed/pull/15320#issuecomment-3794803445
Please reload this pagehttps://github.com/python/typeshed/pull/15320
https://github.com/randolf-scholz
make _T_contra default to Anyhttps://github.com/python/typeshed/pull/15320/commits/7201649f2fcdbd1ce3bb073ee72896f59f9b2743
7201649https://github.com/python/typeshed/pull/15320/commits/7201649f2fcdbd1ce3bb073ee72896f59f9b2743
https://github.com/apps/github-actions
Sign in to viewhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftypeshed%2Fpull%2F15320
https://github.com/AlexWaygood
AlexWaygoodhttps://github.com/AlexWaygood
Jan 24, 2026 https://github.com/python/typeshed/pull/15320#pullrequestreview-3701839081
View reviewed changes https://github.com/python/typeshed/pull/15320/files/7201649f2fcdbd1ce3bb073ee72896f59f9b2743
AlexWaygoodhttps://github.com/AlexWaygood
https://github.com/python/typeshed/pull/15320#pullrequestreview-3701839081
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/typeshed/pull/15320
stdlib/typing.pyihttps://github.com/python/typeshed/pull/15320/files/7201649f2fcdbd1ce3bb073ee72896f59f9b2743#diff-b12c4be0f8e39f89957bbe7be6b6327185e18b69ea80a0f62c0746bb26f4a58e
Please reload this pagehttps://github.com/python/typeshed/pull/15320
stdlib/typing.pyihttps://github.com/python/typeshed/pull/15320/files/7201649f2fcdbd1ce3bb073ee72896f59f9b2743#diff-b12c4be0f8e39f89957bbe7be6b6327185e18b69ea80a0f62c0746bb26f4a58e
Please reload this pagehttps://github.com/python/typeshed/pull/15320
https://github.com/randolf-scholz
renamed type var and restored crucial commenthttps://github.com/python/typeshed/pull/15320/commits/45ebd8a496bd33b238fbb636d5f7be0c85d68364
45ebd8ahttps://github.com/python/typeshed/pull/15320/commits/45ebd8a496bd33b238fbb636d5f7be0c85d68364
https://github.com/AlexWaygood
AlexWaygoodhttps://github.com/AlexWaygood
Jan 24, 2026 https://github.com/python/typeshed/pull/15320#pullrequestreview-3701893338
View reviewed changes https://github.com/python/typeshed/pull/15320/files/45ebd8a496bd33b238fbb636d5f7be0c85d68364
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
Jan 24, 2026https://github.com/python/typeshed/pull/15320#issuecomment-3794932692
mypy_primerhttps://github.com/hauntsaninja/mypy_primer
Please reload this pagehttps://github.com/python/typeshed/pull/15320
https://github.com/srittau
srittauhttps://github.com/srittau
Jan 24, 2026 https://github.com/python/typeshed/pull/15320#pullrequestreview-3701978337
View reviewed changes https://github.com/python/typeshed/pull/15320/files/45ebd8a496bd33b238fbb636d5f7be0c85d68364
https://github.com/srittau
srittauhttps://github.com/srittau
35b688ehttps://github.com/python/typeshed/commit/35b688e98e130cd98e26f7d25936b544d5d4c93e
Jan 24, 2026https://github.com/python/typeshed/pull/15320#event-22264809432
Please reload this pagehttps://github.com/python/typeshed/pull/15320
sharkdphttps://github.com/sharkdp
Feb 2, 2026 https://github.com/python/typeshed/pull/15320#ref-commit-45c4ba3
https://github.com/sharkdp
Update MROs involving Container, seehttps://github.com/astral-sh/ruff/commit/45c4ba3738770fb749f86ae3d0adf993d48eb9b9
python/typeshed#15320https://github.com/python/typeshed/pull/15320
45c4ba3https://github.com/astral-sh/ruff/commit/45c4ba3738770fb749f86ae3d0adf993d48eb9b9
https://github.com/cdce8p
cdce8phttps://github.com/cdce8p
Feb 3, 2026 https://github.com/python/typeshed/pull/15320#ref-pullrequest-3890686277
Sync typeshed python/mypy#20729 https://github.com/python/mypy/pull/20729
https://github.com/sharkdp
sharkdphttps://github.com/sharkdp
Feb 3, 2026 https://github.com/python/typeshed/pull/15320#ref-pullrequest-3880603708
[ty] Sync vendored typeshed stubs astral-sh/ruff#23006 https://github.com/astral-sh/ruff/pull/23006
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
Feb 23, 2026https://github.com/python/typeshed/pull/15320#issuecomment-3942787033
Please reload this pagehttps://github.com/python/typeshed/pull/15320
https://github.com/randolf-scholz
randolf-scholzhttps://github.com/randolf-scholz
Feb 23, 2026https://github.com/python/typeshed/pull/15320#issuecomment-3946351251
@hauntsaninjahttps://github.com/hauntsaninja
#15320 (comment)https://github.com/python/typeshed/pull/15320#discussion_r2724259028
#15320 (comment)https://github.com/python/typeshed/pull/15320#discussion_r2724280777
python/mypy#20729 (comment)https://github.com/python/mypy/pull/20729#issuecomment-3944158389
Please reload this pagehttps://github.com/python/typeshed/pull/15320
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
Feb 23, 2026https://github.com/python/typeshed/pull/15320#issuecomment-3947695643
Please reload this pagehttps://github.com/python/typeshed/pull/15320
https://github.co/hiddenchars
https://github.com/python/typeshed/pull/{{ revealButtonHref }}
Sign up for freehttps://github.com/join?source=comment-repo
Sign in to commenthttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftypeshed%2Fpull%2F15320
https://github.com/srittau
srittau https://github.com/srittau
https://github.com/python/typeshed/pull/15320/files/45ebd8a496bd33b238fbb636d5f7be0c85d68364
https://github.com/AlexWaygood
AlexWaygood https://github.com/AlexWaygood
https://github.com/python/typeshed/pull/15320/files/45ebd8a496bd33b238fbb636d5f7be0c85d68364
Please reload this pagehttps://github.com/python/typeshed/pull/15320
Should collections.abc.Container be generic? https://github.com/python/typeshed/issues/15307
Please reload this pagehttps://github.com/python/typeshed/pull/15320
https://github.com/randolf-scholz
https://github.com/hauntsaninja
https://github.com/srittau
https://github.com/AlexWaygood
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.