René's URL Explorer Experiment


Title: Backport performance improvements to runtime-checkable protocols by AlexWaygood · Pull Request #137 · python/typing_extensions · GitHub

Open Graph Title: Backport performance improvements to runtime-checkable protocols by AlexWaygood · Pull Request #137 · python/typing_extensions

X Title: Backport performance improvements to runtime-checkable protocols by AlexWaygood · Pull Request #137 · python/typing_extensions

Description: This PR backports the following CPython PRs (all by me), which, taken together, substantially improve the performance of isinstance() checks against runtime-checkable protocols on Python 3.12 compa...

Open Graph Description: This PR backports the following CPython PRs (all by me), which, taken together, substantially improve the performance of isinstance() checks against runtime-checkable protocols on Python 3.12 compa...

X Description: This PR backports the following CPython PRs (all by me), which, taken together, substantially improve the performance of isinstance() checks against runtime-checkable protocols on Python 3.12 compa...

Opengraph URL: https://github.com/python/typing_extensions/pull/137

X: @github

direct link

Domain: github.com

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:c95181e5-daad-77c3-d107-a9c66243782f
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8CDE:557D6:5C9366:7BE0C0:6969B55D
html-safe-noncee5c936ebc3ec8baab023c94ec3c05a0f472872af86f0b7e6f4df03e514ba0f7a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4Q0RFOjU1N0Q2OjVDOTM2Njo3QkUwQzA6Njk2OUI1NUQiLCJ2aXNpdG9yX2lkIjoiMTU5NDgwOTIzMzgwNDIxMTU0OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac5a7439ac31ca9f7eb0d1be6a076f63f409e64c60939f0014906497866b1cd5d8
hovercard-subject-tagpull_request:1310710944
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/typing_extensions/137/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/fd7d0840740687983ceb1bf58264acf801a8883ce906dc0dc414e6ecc96fdbda/python/typing_extensions/pull/137
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/fd7d0840740687983ceb1bf58264acf801a8883ce906dc0dc414e6ecc96fdbda/python/typing_extensions/pull/137
og:image:altThis PR backports the following CPython PRs (all by me), which, taken together, substantially improve the performance of isinstance() checks against runtime-checkable protocols on Python 3.12 compa...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameAlexWaygood
hostnamegithub.com
expected-hostnamegithub.com
Noneb23b8fcc855cd29bb04d6c94aafa62d336bf44eefa8229444eecc968cad03aee
turbo-cache-controlno-preview
go-importgithub.com/python/typing_extensions git https://github.com/python/typing_extensions.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id494077289
octolytics-dimension-repository_nwopython/typing_extensions
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id494077289
octolytics-dimension-repository_network_root_nwopython/typing_extensions
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
release0672399d88424758731ec07fe24509e23bb17fb5
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/typing_extensions/pull/137#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftyping_extensions%2Fpull%2F137
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_extensions%2Fpull%2F137
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%2Fvoltron%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=python%2Ftyping_extensions
Reloadhttps://github.com/python/typing_extensions/pull/137
Reloadhttps://github.com/python/typing_extensions/pull/137
Reloadhttps://github.com/python/typing_extensions/pull/137
python https://github.com/python
typing_extensionshttps://github.com/python/typing_extensions
Please reload this pagehttps://github.com/python/typing_extensions/pull/137
Notifications https://github.com/login?return_to=%2Fpython%2Ftyping_extensions
Fork 133 https://github.com/login?return_to=%2Fpython%2Ftyping_extensions
Star 544 https://github.com/login?return_to=%2Fpython%2Ftyping_extensions
Code https://github.com/python/typing_extensions
Issues 18 https://github.com/python/typing_extensions/issues
Pull requests 10 https://github.com/python/typing_extensions/pulls
Actions https://github.com/python/typing_extensions/actions
Projects 0 https://github.com/python/typing_extensions/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/python/typing_extensions/security
Please reload this pagehttps://github.com/python/typing_extensions/pull/137
Insights https://github.com/python/typing_extensions/pulse
Code https://github.com/python/typing_extensions
Issues https://github.com/python/typing_extensions/issues
Pull requests https://github.com/python/typing_extensions/pulls
Actions https://github.com/python/typing_extensions/actions
Projects https://github.com/python/typing_extensions/projects
Security https://github.com/python/typing_extensions/security
Insights https://github.com/python/typing_extensions/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Ftyping_extensions%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_extensions%2Fissues%2Fnew%2Fchoose
Jump to bottomhttps://github.com/python/typing_extensions/pull/137#issue-comment-box
JelleZijlstrahttps://github.com/JelleZijlstra
python:mainhttps://github.com/python/typing_extensions/tree/main
AlexWaygood:improve-protocol-perfhttps://github.com/AlexWaygood/typing_extensions/tree/improve-protocol-perf
Backport performance improvements to runtime-checkable protocols https://github.com/python/typing_extensions/pull/137#top
JelleZijlstrahttps://github.com/JelleZijlstra
python:mainhttps://github.com/python/typing_extensions/tree/main
AlexWaygood:improve-protocol-perfhttps://github.com/AlexWaygood/typing_extensions/tree/improve-protocol-perf
Conversation 6 https://github.com/python/typing_extensions/pull/137
Commits 4 https://github.com/python/typing_extensions/pull/137/commits
Checks 0 https://github.com/python/typing_extensions/pull/137/checks
Files changed https://github.com/python/typing_extensions/pull/137/files
Please reload this pagehttps://github.com/python/typing_extensions/pull/137
https://github.co/hiddenchars
https://github.com/python/typing_extensions/pull/{{ revealButtonHref }}
https://github.com/AlexWaygood
AlexWaygoodhttps://github.com/AlexWaygood
Apr 12, 2023https://github.com/python/typing_extensions/pull/137#issue-1664378642
Please reload this pagehttps://github.com/python/typing_extensions/pull/137
gh-74690: typing: Don't unnecessarily call _get_protocol_attrs twice in _ProtocolMeta.__instancecheck__ cpython#103141https://github.com/python/cpython/pull/103141
gh-74690: Micro-optimise typing._get_protocol_attrs cpython#103152https://github.com/python/cpython/pull/103152
gh-74690: typing: Simplify and optimise _ProtocolMeta.__instancecheck__ cpython#103159https://github.com/python/cpython/pull/103159
gh-74690: typing: Call _get_protocol_attrs and _callable_members_only at protocol class creation time, not during isinstance() checks cpython#103160https://github.com/python/cpython/pull/103160
gh-74690: Further optimise typing._ProtocolMeta.__instancecheck__ cpython#103280https://github.com/python/cpython/pull/103280
python/cpython#103034https://github.com/python/cpython/pull/103034
Please reload this pagehttps://github.com/python/typing_extensions/pull/137
AlexWaygoodhttps://github.com/AlexWaygood
April 12, 2023 12:01https://github.com/python/typing_extensions/pull/137#commits-pushed-6221efd
https://github.com/AlexWaygood
Backport several performance improvements for runtime-checkable proto…https://github.com/python/typing_extensions/pull/137/commits/6221efda149d86328aa5066117f1d314196ca5a6
6221efdhttps://github.com/python/typing_extensions/pull/137/commits/6221efda149d86328aa5066117f1d314196ca5a6
https://github.com/AlexWaygood
Fix tests on Python 3.11https://github.com/python/typing_extensions/pull/137/commits/c6097b9c362e62d6f41665b5149cb6362e4ae359
c6097b9https://github.com/python/typing_extensions/pull/137/commits/c6097b9c362e62d6f41665b5149cb6362e4ae359
https://github.com/AlexWaygood
Docshttps://github.com/python/typing_extensions/pull/137/commits/9318af0f4cea91d2209d61b2ae9d69fda950625a
9318af0https://github.com/python/typing_extensions/pull/137/commits/9318af0f4cea91d2209d61b2ae9d69fda950625a
https://github.com/AlexWaygood
AlexWaygoodhttps://github.com/AlexWaygood
April 12, 2023 11:34https://github.com/python/typing_extensions/pull/137#event-8984579636
https://github.com/AlexWaygood
AlexWaygoodhttps://github.com/AlexWaygood
Apr 12, 2023 https://github.com/python/typing_extensions/pull/137#pullrequestreview-1381133847
View reviewed changes https://github.com/python/typing_extensions/pull/137/files/9318af0f4cea91d2209d61b2ae9d69fda950625a
src/typing_extensions.pyhttps://github.com/python/typing_extensions/pull/137/files/9318af0f4cea91d2209d61b2ae9d69fda950625a#diff-2e398129239518dc82985bc023ce5fb83df781e9f84098cfe1415bdd6d7ac59f
AlexWaygoodhttps://github.com/AlexWaygood
Apr 12, 2023https://github.com/python/typing_extensions/pull/137#discussion_r1164017024
Please reload this pagehttps://github.com/python/typing_extensions/pull/137
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/typing_extensions/pull/137
src/typing_extensions.pyhttps://github.com/python/typing_extensions/pull/137/files/9318af0f4cea91d2209d61b2ae9d69fda950625a#diff-2e398129239518dc82985bc023ce5fb83df781e9f84098cfe1415bdd6d7ac59f
AlexWaygoodhttps://github.com/AlexWaygood
Apr 12, 2023https://github.com/python/typing_extensions/pull/137#discussion_r1164018967
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/typing_extensions/pull/137
https://github.com/AlexWaygood
Merge branch 'main' into improve-protocol-perfhttps://github.com/python/typing_extensions/pull/137/commits/fa12f432acf5399d213f699a68a7a5a265eb836a
fa12f43https://github.com/python/typing_extensions/pull/137/commits/fa12f432acf5399d213f699a68a7a5a265eb836a
https://github.com/AlexWaygood
AlexWaygoodhttps://github.com/AlexWaygood
Apr 12, 2023 https://github.com/python/typing_extensions/pull/137#ref-pullrequest-1664438747
Remove flake8-noqa from test-requirements.txt #138 https://github.com/python/typing_extensions/pull/138
https://github.com/AlexWaygood
AlexWaygoodhttps://github.com/AlexWaygood
Apr 12, 2023https://github.com/python/typing_extensions/pull/137#issuecomment-1505175031
Please reload this pagehttps://github.com/python/typing_extensions/pull/137
https://docs.python.org/3/library/typing.html#protocolshttps://docs.python.org/3/library/typing.html#protocols
Please reload this pagehttps://github.com/python/typing_extensions/pull/137
https://github.com/JelleZijlstra
JelleZijlstrahttps://github.com/JelleZijlstra
Apr 12, 2023 https://github.com/python/typing_extensions/pull/137#pullrequestreview-1381748515
View reviewed changes https://github.com/python/typing_extensions/pull/137/files/fa12f432acf5399d213f699a68a7a5a265eb836a
https://github.com/JelleZijlstra
JelleZijlstrahttps://github.com/JelleZijlstra
6c93956https://github.com/python/typing_extensions/commit/6c9395698bb31650ad3d53348379f483ebef496d
Apr 12, 2023https://github.com/python/typing_extensions/pull/137#event-8987982185
https://github.com/AlexWaygood
AlexWaygoodhttps://github.com/AlexWaygood
April 12, 2023 17:07https://github.com/python/typing_extensions/pull/137#event-8987985532
https://github.com/Tenzer
Tenzerhttps://github.com/Tenzer
May 23, 2023https://github.com/python/typing_extensions/pull/137#issuecomment-1558823709
pydashhttps://github.com/dgilland/pydash
dgilland/pydash#197https://github.com/dgilland/pydash/issues/197
https://github.com/dgilland/pydash/blob/051fe69c3e523f903a0a0ea6ca6a5c2d4b83a3e7/src/pydash/utilities.py#L577-L638https://github.com/dgilland/pydash/blob/051fe69c3e523f903a0a0ea6ca6a5c2d4b83a3e7/src/pydash/utilities.py#L577-L638
Please reload this pagehttps://github.com/python/typing_extensions/pull/137
https://github.com/Tenzer
Tenzerhttps://github.com/Tenzer
May 23, 2023 https://github.com/python/typing_extensions/pull/137#ref-issue-1721045666
Incompatible with typing-extensions 4.6 dgilland/pydash#197 https://github.com/dgilland/pydash/issues/197
https://github.com/AlexWaygood
AlexWaygoodhttps://github.com/AlexWaygood
May 23, 2023 https://github.com/python/typing_extensions/pull/137#ref-issue-1721551533
Cannot parameterise typing_extensions.Protocol with a ParamSpec or TypeVarTuple on py310+ #181 https://github.com/python/typing_extensions/issues/181
https://github.com/AlexWaygood
AlexWaygoodhttps://github.com/AlexWaygood
May 23, 2023https://github.com/python/typing_extensions/pull/137#issuecomment-1558836720
@Tenzerhttps://github.com/Tenzer
#181https://github.com/python/typing_extensions/issues/181
Please reload this pagehttps://github.com/python/typing_extensions/pull/137
https://github.com/Tenzer
Tenzerhttps://github.com/Tenzer
May 23, 2023https://github.com/python/typing_extensions/pull/137#issuecomment-1558837592
Please reload this pagehttps://github.com/python/typing_extensions/pull/137
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%2Ftyping_extensions%2Fpull%2F137
https://github.com/JelleZijlstra
JelleZijlstra https://github.com/JelleZijlstra
https://github.com/python/typing_extensions/pull/137/files/fa12f432acf5399d213f699a68a7a5a265eb836a
Please reload this pagehttps://github.com/python/typing_extensions/pull/137
https://github.com/AlexWaygood
https://github.com/Tenzer
https://github.com/JelleZijlstra
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.