René's URL Explorer Experiment


Title: Prepend bases on first subscription by ilevkivskyi · Pull Request #386 · python/typing · GitHub

Open Graph Title: Prepend bases on first subscription by ilevkivskyi · Pull Request #386 · python/typing

X Title: Prepend bases on first subscription by ilevkivskyi · Pull Request #386 · python/typing

Description: Fixes #385 Fixes #384 In previous versions of typing, __bases__ on subscription where prepend with __origin__, so that MRO of, e.g., Mapping[int, T][str] was: [Mapping[int, str], Mapping[int, T], Mapping, collections.abc.Mapping, ...] This was removed for several reasons. However, now it looks like complete removal of such prepending was too radical, since now e.g. issublcass(Node[int], Node) returns False. I believe such runtime check should be equivalent to issublcass(Node, Node), i.e., True. Here I propose to fix this by only prepending __bases__ on first subscription, so that, e.g, Mapping[int, T][str].__mro__ will be: [Mapping[int, str], Mapping, collections.abc.Mapping, ...] This PR also fixes an ambiguity when using typing ABCs with singledispatch().

Open Graph Description: Fixes #385 Fixes #384 In previous versions of typing, __bases__ on subscription where prepend with __origin__, so that MRO of, e.g., Mapping[int, T][str] was: [Mapping[int, str], Mapping[int, T], M...

X Description: Fixes #385 Fixes #384 In previous versions of typing, __bases__ on subscription where prepend with __origin__, so that MRO of, e.g., Mapping[int, T][str] was: [Mapping[int, str], Mapping[int, T], M...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/commits/:range(.:format)
route-controllerpull_requests
route-actioncommits
fetch-noncev2:0a3c8983-e989-f629-d744-7e1b4129d433
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idAA14:29889E:788106:9CB651:69965DEA
html-safe-nonce58e7ca06bcaaa1407e9fa63a1db1233d606582c803061fef4c215375f1da9378
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQTE0OjI5ODg5RTo3ODgxMDY6OUNCNjUxOjY5OTY1REVBIiwidmlzaXRvcl9pZCI6IjEyMDQzNTk3NDQxMTIxODg5MDYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac74336cf9687f867035dd9b41ea0fc3fdf813d451b6c5d479065fcb8c6251da65
hovercard-subject-tagpull_request:104498073
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/commits
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/typing/pull/386/commits/2f7b03bac7419f325fc0766e09f347cf3320bca4
twitter:imagehttps://avatars.githubusercontent.com/u/12005495?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/12005495?s=400&v=4
og:image:altFixes #385 Fixes #384 In previous versions of typing, __bases__ on subscription where prepend with __origin__, so that MRO of, e.g., Mapping[int, T][str] was: [Mapping[int, str], Mapping[int, T], M...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonebb5fc598983958d677e5179b50e71c2bfa2a8ac1568110d429775cd645bbe799
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-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasedb215ff24c4b7248f8b34cafbe2f845e4cbbeb37
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/typing/pull/386/commits/2f7b03bac7419f325fc0766e09f347cf3320bca4#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftyping%2Fpull%2F386%2Fcommits%2F2f7b03bac7419f325fc0766e09f347cf3320bca4
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftyping%2Fpull%2F386%2Fcommits%2F2f7b03bac7419f325fc0766e09f347cf3320bca4
Sign up https://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%2Fcommits&source=header-repo&source_repo=python%2Ftyping
Reloadhttps://github.com/python/typing/pull/386/commits/2f7b03bac7419f325fc0766e09f347cf3320bca4
Reloadhttps://github.com/python/typing/pull/386/commits/2f7b03bac7419f325fc0766e09f347cf3320bca4
Reloadhttps://github.com/python/typing/pull/386/commits/2f7b03bac7419f325fc0766e09f347cf3320bca4
python https://github.com/python
typinghttps://github.com/python/typing
Notifications https://github.com/login?return_to=%2Fpython%2Ftyping
Fork 288 https://github.com/login?return_to=%2Fpython%2Ftyping
Star 1.7k https://github.com/login?return_to=%2Fpython%2Ftyping
Code https://github.com/python/typing
Issues 192 https://github.com/python/typing/issues
Pull requests 15 https://github.com/python/typing/pulls
Discussions https://github.com/python/typing/discussions
Actions https://github.com/python/typing/actions
Security 0 https://github.com/python/typing/security
Insights https://github.com/python/typing/pulse
Code https://github.com/python/typing
Issues https://github.com/python/typing/issues
Pull requests https://github.com/python/typing/pulls
Discussions https://github.com/python/typing/discussions
Actions https://github.com/python/typing/actions
Security https://github.com/python/typing/security
Insights https://github.com/python/typing/pulse
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
ilevkivskyihttps://github.com/ilevkivskyi
python:masterhttps://github.com/python/typing/tree/master
ilevkivskyi:prepend-baseshttps://github.com/ilevkivskyi/typehinting/tree/prepend-bases
Conversation 1 https://github.com/python/typing/pull/386
Commits 2 https://github.com/python/typing/pull/386/commits
Checks 0 https://github.com/python/typing/pull/386/checks
Files changed https://github.com/python/typing/pull/386/files
Please reload this pagehttps://github.com/python/typing/pull/386/commits/2f7b03bac7419f325fc0766e09f347cf3320bca4
Prepend bases on first subscription https://github.com/python/typing/pull/386/commits/2f7b03bac7419f325fc0766e09f347cf3320bca4#top
Show all changes 2 commits https://github.com/python/typing/pull/386/files
2f7b03b Prepend bases with _gorg on subscription ilevkivskyi Feb 3, 2017 https://github.com/python/typing/pull/386/commits/2f7b03bac7419f325fc0766e09f347cf3320bca4
d1b2baf Simplify code ilevkivskyi Feb 3, 2017 https://github.com/python/typing/pull/386/commits/d1b2baf4e70772c737c7126e8f404c80953d21f4
Clear filters https://github.com/python/typing/pull/386/commits/2f7b03bac7419f325fc0766e09f347cf3320bca4
Please reload this pagehttps://github.com/python/typing/pull/386/commits/2f7b03bac7419f325fc0766e09f347cf3320bca4
Please reload this pagehttps://github.com/python/typing/pull/386/commits/2f7b03bac7419f325fc0766e09f347cf3320bca4
test_typing.py https://github.com/python/typing/pull/386/commits/2f7b03bac7419f325fc0766e09f347cf3320bca4#diff-f23c53e6fa002cdeac74b9499d744b9492bfd34a58ce281c2b5076e628d0083a
typing.py https://github.com/python/typing/pull/386/commits/2f7b03bac7419f325fc0766e09f347cf3320bca4#diff-cbea31cd6366bdaf7805202979325ba4b14a29613bb7aeaecf9a18e94ea93619
test_typing.py https://github.com/python/typing/pull/386/commits/2f7b03bac7419f325fc0766e09f347cf3320bca4#diff-e618ee6a4894a62d9269e41c4dc836e31e8224cfb66b5be3b325f4798ec245e3
typing.py https://github.com/python/typing/pull/386/commits/2f7b03bac7419f325fc0766e09f347cf3320bca4#diff-ad6da8dfad5c336100410e57073641a0266b69e1801476d2b1e593b2c04f81f5
Next https://github.com/python/typing/pull/386/commits/d1b2baf4e70772c737c7126e8f404c80953d21f4
Please reload this pagehttps://github.com/python/typing/pull/386/commits/2f7b03bac7419f325fc0766e09f347cf3320bca4
https://github.com/ilevkivskyi
ilevkivskyihttps://github.com/python/typing/commits?author=ilevkivskyi
python2/test_typing.pyhttps://github.com/python/typing/pull/386/commits/2f7b03bac7419f325fc0766e09f347cf3320bca4#diff-f23c53e6fa002cdeac74b9499d744b9492bfd34a58ce281c2b5076e628d0083a
View file https://github.com/ilevkivskyi/typehinting/blob/2f7b03bac7419f325fc0766e09f347cf3320bca4/python2/test_typing.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/typing/pull/386/commits/{{ revealButtonHref }}
https://github.com/python/typing/pull/386/commits/2f7b03bac7419f325fc0766e09f347cf3320bca4#diff-f23c53e6fa002cdeac74b9499d744b9492bfd34a58ce281c2b5076e628d0083a
https://github.com/python/typing/pull/386/commits/2f7b03bac7419f325fc0766e09f347cf3320bca4#diff-f23c53e6fa002cdeac74b9499d744b9492bfd34a58ce281c2b5076e628d0083a
python2/typing.pyhttps://github.com/python/typing/pull/386/commits/2f7b03bac7419f325fc0766e09f347cf3320bca4#diff-cbea31cd6366bdaf7805202979325ba4b14a29613bb7aeaecf9a18e94ea93619
View file https://github.com/ilevkivskyi/typehinting/blob/2f7b03bac7419f325fc0766e09f347cf3320bca4/python2/typing.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/typing/pull/386/commits/{{ revealButtonHref }}
https://github.com/python/typing/pull/386/commits/2f7b03bac7419f325fc0766e09f347cf3320bca4#diff-cbea31cd6366bdaf7805202979325ba4b14a29613bb7aeaecf9a18e94ea93619
https://github.com/python/typing/pull/386/commits/2f7b03bac7419f325fc0766e09f347cf3320bca4#diff-cbea31cd6366bdaf7805202979325ba4b14a29613bb7aeaecf9a18e94ea93619
src/test_typing.pyhttps://github.com/python/typing/pull/386/commits/2f7b03bac7419f325fc0766e09f347cf3320bca4#diff-e618ee6a4894a62d9269e41c4dc836e31e8224cfb66b5be3b325f4798ec245e3
View file https://github.com/ilevkivskyi/typehinting/blob/2f7b03bac7419f325fc0766e09f347cf3320bca4/src/test_typing.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/typing/pull/386/commits/{{ revealButtonHref }}
https://github.com/python/typing/pull/386/commits/2f7b03bac7419f325fc0766e09f347cf3320bca4#diff-e618ee6a4894a62d9269e41c4dc836e31e8224cfb66b5be3b325f4798ec245e3
https://github.com/python/typing/pull/386/commits/2f7b03bac7419f325fc0766e09f347cf3320bca4#diff-e618ee6a4894a62d9269e41c4dc836e31e8224cfb66b5be3b325f4798ec245e3
src/typing.pyhttps://github.com/python/typing/pull/386/commits/2f7b03bac7419f325fc0766e09f347cf3320bca4#diff-ad6da8dfad5c336100410e57073641a0266b69e1801476d2b1e593b2c04f81f5
View file https://github.com/ilevkivskyi/typehinting/blob/2f7b03bac7419f325fc0766e09f347cf3320bca4/src/typing.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/typing/pull/386/commits/{{ revealButtonHref }}
https://github.com/python/typing/pull/386/commits/2f7b03bac7419f325fc0766e09f347cf3320bca4#diff-ad6da8dfad5c336100410e57073641a0266b69e1801476d2b1e593b2c04f81f5
https://github.com/python/typing/pull/386/commits/2f7b03bac7419f325fc0766e09f347cf3320bca4#diff-ad6da8dfad5c336100410e57073641a0266b69e1801476d2b1e593b2c04f81f5
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.