René's URL Explorer Experiment


Title: gh-118013: Use weakrefs for the cache key in `inspect._shadowed_dict` by AlexWaygood · Pull Request #118202 · python/cpython · GitHub

Open Graph Title: gh-118013: Use weakrefs for the cache key in `inspect._shadowed_dict` by AlexWaygood · Pull Request #118202 · python/cpython

X Title: gh-118013: Use weakrefs for the cache key in `inspect._shadowed_dict` by AlexWaygood · Pull Request #118202 · python/cpython

Description: Slower than main, but significantly faster than a straight revert of #104267. Issue: gh-118013

Open Graph Description: Slower than main, but significantly faster than a straight revert of #104267. Issue: gh-118013

X Description: Slower than main, but significantly faster than a straight revert of #104267. Issue: gh-118013

Opengraph URL: https://github.com/python/cpython/pull/118202

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:0acb7211-2692-ca46-91a3-d16ff06d7fc4
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idDAC6:28AE23:1CD1821:278FABB:696AB93F
html-safe-nonce0d028c64cf6ae6939fa9c2776f8987bae1c86f23202edede9a42fe2c498b29ee
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQUM2OjI4QUUyMzoxQ0QxODIxOjI3OEZBQkI6Njk2QUI5M0YiLCJ2aXNpdG9yX2lkIjoiOTA2MDY4NzM2MTg3NDc3MDIzOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac2f717dc117d7b5501b6bdcb1258c7f813ea95a84163a46bfb47db0d51b380a0b
hovercard-subject-tagpull_request:1837634743
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/cpython/pull/118202/files
twitter:imagehttps://avatars.githubusercontent.com/u/66076021?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/66076021?s=400&v=4
og:image:altSlower than main, but significantly faster than a straight revert of #104267. Issue: gh-118013
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None46ce962e0e18113ea447391b6ace8b02d4d2861e57b4fbab3658698f73d8855b
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
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
release30300f30bb3949de255e84a146706a3bdb5c19c9
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/118202/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F118202%2Ffiles
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%2Fcpython%2Fpull%2F118202%2Ffiles
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%2Ffiles&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/118202/files
Reloadhttps://github.com/python/cpython/pull/118202/files
Reloadhttps://github.com/python/cpython/pull/118202/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/118202/files
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 33.9k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 71.1k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.1k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects 31 https://github.com/python/cpython/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/python/cpython/security
Please reload this pagehttps://github.com/python/cpython/pull/118202/files
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
AlexWaygoodhttps://github.com/AlexWaygood
python:mainhttps://github.com/python/cpython/tree/main
AlexWaygood:inspect-weakref-cache-keyhttps://github.com/AlexWaygood/cpython/tree/inspect-weakref-cache-key
Conversation 14 https://github.com/python/cpython/pull/118202
Commits 9 https://github.com/python/cpython/pull/118202/commits
Checks 0 https://github.com/python/cpython/pull/118202/checks
Files changed 5 https://github.com/python/cpython/pull/118202/files
gh-118013: Use weakrefs for the cache key in inspect._shadowed_dict https://github.com/python/cpython/pull/118202/files#top
Show all changes 9 commits https://github.com/python/cpython/pull/118202/files
c314217 wip AlexWaygood Apr 23, 2024 https://github.com/python/cpython/pull/118202/commits/c314217f90ce5ba586b815cf9a4a7b4c82d31896
e4b2989 wip AlexWaygood Apr 23, 2024 https://github.com/python/cpython/pull/118202/commits/e4b29893e611f0bd2b36dadcc5ce808e76d61d34
57da345 wip AlexWaygood Apr 23, 2024 https://github.com/python/cpython/pull/118202/commits/57da345a8d904705e82b141ef8a69f28cf60c634
4df5d08 wip AlexWaygood Apr 23, 2024 https://github.com/python/cpython/pull/118202/commits/4df5d081be32e718a7fc72614ef8d16141a1fb0b
fd9b22b Merge branch 'main' into inspect-weakref-cache-key AlexWaygood Apr 23, 2024 https://github.com/python/cpython/pull/118202/commits/fd9b22b0c6c6e68a5b63afe6656140d376599c1b
5847027 Tests and comments AlexWaygood Apr 24, 2024 https://github.com/python/cpython/pull/118202/commits/5847027b18817905987ba3ab807d30be4ab4feb5
677577e Clear the cache anyway after running `test_inspect`, for extra safety AlexWaygood Apr 24, 2024 https://github.com/python/cpython/pull/118202/commits/677577e07067e49ed03e61225ab98ea2c53bb9cd
6891c70 docs AlexWaygood Apr 24, 2024 https://github.com/python/cpython/pull/118202/commits/6891c70cebf41b77300a6814adb9976305a9acf2
4791b4b Merge branch 'main' into inspect-weakref-cache-key AlexWaygood Apr 24, 2024 https://github.com/python/cpython/pull/118202/commits/4791b4be82a2b67c8f016af32c42072e6c84f207
Clear filters https://github.com/python/cpython/pull/118202/files
Please reload this pagehttps://github.com/python/cpython/pull/118202/files
Please reload this pagehttps://github.com/python/cpython/pull/118202/files
3.12.rst https://github.com/python/cpython/pull/118202/files#diff-0f2c1763c64530268325a0ee2dfaa4f5d555c4ac27deb78bd77102c8ce1b886b
inspect.py https://github.com/python/cpython/pull/118202/files#diff-b89cd06e4637abacb73f2500301ff979a67ad7ecbfa7cf151c7243715898d7ea
utils.py https://github.com/python/cpython/pull/118202/files#diff-8e9a29443bf1ce629c10cc3b9e8cd9c3db85e3db313859d0a645f7736a845491
test_inspect.py https://github.com/python/cpython/pull/118202/files#diff-92d8ecc68ed9e7ce3b31a764d5b0368db1514365c2a6433bbe3bad5c3210cea0
2024-04-24-12-20-48.gh-issue-118013.TKn_kZ.rst https://github.com/python/cpython/pull/118202/files#diff-1575251cd7fe584fca9558483676f5a171b50dbbff09724b0330647bdb6c112b
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L114
Doc/whatsnew/3.12.rsthttps://github.com/python/cpython/pull/118202/files#diff-0f2c1763c64530268325a0ee2dfaa4f5d555c4ac27deb78bd77102c8ce1b886b
View file https://github.com/AlexWaygood/cpython/blob/4791b4be82a2b67c8f016af32c42072e6c84f207/Doc/whatsnew/3.12.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/118202/{{ revealButtonHref }}
https://github.com/python/cpython/pull/118202/files#diff-0f2c1763c64530268325a0ee2dfaa4f5d555c4ac27deb78bd77102c8ce1b886b
https://github.com/python/cpython/pull/118202/files#diff-0f2c1763c64530268325a0ee2dfaa4f5d555c4ac27deb78bd77102c8ce1b886b
https://github.com/python/cpython/pull/118202/files#diff-0f2c1763c64530268325a0ee2dfaa4f5d555c4ac27deb78bd77102c8ce1b886b
https://github.com/python/cpython/pull/118202/files#diff-0f2c1763c64530268325a0ee2dfaa4f5d555c4ac27deb78bd77102c8ce1b886b
Lib/inspect.pyhttps://github.com/python/cpython/pull/118202/files#diff-b89cd06e4637abacb73f2500301ff979a67ad7ecbfa7cf151c7243715898d7ea
View file https://github.com/AlexWaygood/cpython/blob/4791b4be82a2b67c8f016af32c42072e6c84f207/Lib/inspect.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/118202/{{ revealButtonHref }}
https://github.com/python/cpython/pull/118202/files#diff-b89cd06e4637abacb73f2500301ff979a67ad7ecbfa7cf151c7243715898d7ea
https://github.com/python/cpython/pull/118202/files#diff-b89cd06e4637abacb73f2500301ff979a67ad7ecbfa7cf151c7243715898d7ea
https://github.com/python/cpython/pull/118202/files#diff-b89cd06e4637abacb73f2500301ff979a67ad7ecbfa7cf151c7243715898d7ea
Please reload this pagehttps://github.com/python/cpython/pull/118202/files
https://github.com/python/cpython/pull/118202/files#diff-b89cd06e4637abacb73f2500301ff979a67ad7ecbfa7cf151c7243715898d7ea
Please reload this pagehttps://github.com/python/cpython/pull/118202/files
https://github.com/python/cpython/pull/118202/files#diff-b89cd06e4637abacb73f2500301ff979a67ad7ecbfa7cf151c7243715898d7ea
Lib/test/libregrtest/utils.pyhttps://github.com/python/cpython/pull/118202/files#diff-8e9a29443bf1ce629c10cc3b9e8cd9c3db85e3db313859d0a645f7736a845491
View file https://github.com/AlexWaygood/cpython/blob/4791b4be82a2b67c8f016af32c42072e6c84f207/Lib/test/libregrtest/utils.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/118202/{{ revealButtonHref }}
https://github.com/python/cpython/pull/118202/files#diff-8e9a29443bf1ce629c10cc3b9e8cd9c3db85e3db313859d0a645f7736a845491
https://github.com/python/cpython/pull/118202/files#diff-8e9a29443bf1ce629c10cc3b9e8cd9c3db85e3db313859d0a645f7736a845491
Lib/test/test_inspect/test_inspect.pyhttps://github.com/python/cpython/pull/118202/files#diff-92d8ecc68ed9e7ce3b31a764d5b0368db1514365c2a6433bbe3bad5c3210cea0
View file https://github.com/AlexWaygood/cpython/blob/4791b4be82a2b67c8f016af32c42072e6c84f207/Lib/test/test_inspect/test_inspect.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/118202/{{ revealButtonHref }}
https://github.com/python/cpython/pull/118202/files#diff-92d8ecc68ed9e7ce3b31a764d5b0368db1514365c2a6433bbe3bad5c3210cea0
https://github.com/python/cpython/pull/118202/files#diff-92d8ecc68ed9e7ce3b31a764d5b0368db1514365c2a6433bbe3bad5c3210cea0
https://github.com/python/cpython/pull/118202/files#diff-92d8ecc68ed9e7ce3b31a764d5b0368db1514365c2a6433bbe3bad5c3210cea0
https://github.com/python/cpython/pull/118202/files#diff-92d8ecc68ed9e7ce3b31a764d5b0368db1514365c2a6433bbe3bad5c3210cea0
Please reload this pagehttps://github.com/python/cpython/pull/118202/files
https://github.com/python/cpython/pull/118202/files#diff-92d8ecc68ed9e7ce3b31a764d5b0368db1514365c2a6433bbe3bad5c3210cea0
https://github.com/python/cpython/pull/118202/files#diff-92d8ecc68ed9e7ce3b31a764d5b0368db1514365c2a6433bbe3bad5c3210cea0
https://github.com/python/cpython/pull/118202/files#diff-92d8ecc68ed9e7ce3b31a764d5b0368db1514365c2a6433bbe3bad5c3210cea0
Misc/NEWS.d/next/Library/2024-04-24-12-20-48.gh-issue-118013.TKn_kZ.rsthttps://github.com/python/cpython/pull/118202/files#diff-1575251cd7fe584fca9558483676f5a171b50dbbff09724b0330647bdb6c112b
View file https://github.com/AlexWaygood/cpython/blob/4791b4be82a2b67c8f016af32c42072e6c84f207/Misc/NEWS.d/next/Library/2024-04-24-12-20-48.gh-issue-118013.TKn_kZ.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/118202/{{ revealButtonHref }}
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.