| route-pattern | /_view_fragments/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format) |
| route-controller | voltron_pull_requests_fragments |
| route-action | pull_request_layout |
| fetch-nonce | v2:57f5d91f-963c-782c-c0f7-e1ffd62b1b82 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D29E:2F6228:32E57A:44DC9C:696A2017 |
| html-safe-nonce | adfb1aba699bf2b988abbd389fc7568452944bc5858c4bd53c79fbf88980fc50 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMjlFOjJGNjIyODozMkU1N0E6NDREQzlDOjY5NkEyMDE3IiwidmlzaXRvcl9pZCI6Ijg4NzU4MTM2NTU3MTQzNDA4ODciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | ec6a993b721c3b827782ddcfca11f0f218f449b34a812244ad7e7d8e465d4359 |
| hovercard-subject-tag | pull_request:1341166031 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | ///voltron/pull_requests_fragments/pull_request_layout |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/python/cpython/104267/pull_request_layout |
| twitter:image | https://opengraph.githubassets.com/094c708dae1f63181d5b12eb2818a8b3ca8da50dd30aa38e42675e53b996cddb/python/cpython/pull/104267 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/094c708dae1f63181d5b12eb2818a8b3ca8da50dd30aa38e42675e53b996cddb/python/cpython/pull/104267 |
| og:image:alt | EDIT: These performance numbers are out of date with the current PR; read further down the thread for the up-to-date numbers.
This dramatically speeds up calls to inspect.getattr_static.
Here are b... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | AlexWaygood |
| hostname | github.com |
| expected-hostname | github.com |
| None | 014f3d193f36b7d393f88ca22d06fbacd370800b40a547c1ea67291e02dc8ea3 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d515f6f09fa57a93bf90355cb894eb84ca4f458f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| Skip to content | https://github.com/python/cpython/pull/104267#start-of-content |
|
| https://github.com/ |
|
Sign in
| https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F104267 |
| GitHub CopilotWrite better code with AI | https://github.com/features/copilot |
| GitHub SparkBuild and deploy intelligent apps | https://github.com/features/spark |
| GitHub ModelsManage and compare prompts | https://github.com/features/models |
| MCP RegistryNewIntegrate external tools | https://github.com/mcp |
| ActionsAutomate any workflow | https://github.com/features/actions |
| CodespacesInstant dev environments | https://github.com/features/codespaces |
| IssuesPlan and track work | https://github.com/features/issues |
| Code ReviewManage code changes | https://github.com/features/code-review |
| GitHub Advanced SecurityFind and fix vulnerabilities | https://github.com/security/advanced-security |
| Code securitySecure your code as you build | https://github.com/security/advanced-security/code-security |
| Secret protectionStop leaks before they start | https://github.com/security/advanced-security/secret-protection |
| Why GitHub | https://github.com/why-github |
| Documentation | https://docs.github.com |
| Blog | https://github.blog |
| Changelog | https://github.blog/changelog |
| Marketplace | https://github.com/marketplace |
| View all features | https://github.com/features |
| Enterprises | https://github.com/enterprise |
| Small and medium teams | https://github.com/team |
| Startups | https://github.com/enterprise/startups |
| Nonprofits | https://github.com/solutions/industry/nonprofits |
| App Modernization | https://github.com/solutions/use-case/app-modernization |
| DevSecOps | https://github.com/solutions/use-case/devsecops |
| DevOps | https://github.com/solutions/use-case/devops |
| CI/CD | https://github.com/solutions/use-case/ci-cd |
| View all use cases | https://github.com/solutions/use-case |
| Healthcare | https://github.com/solutions/industry/healthcare |
| Financial services | https://github.com/solutions/industry/financial-services |
| Manufacturing | https://github.com/solutions/industry/manufacturing |
| Government | https://github.com/solutions/industry/government |
| View all industries | https://github.com/solutions/industry |
| View all solutions | https://github.com/solutions |
| AI | https://github.com/resources/articles?topic=ai |
| Software Development | https://github.com/resources/articles?topic=software-development |
| DevOps | https://github.com/resources/articles?topic=devops |
| Security | https://github.com/resources/articles?topic=security |
| View all topics | https://github.com/resources/articles |
| Customer stories | https://github.com/customer-stories |
| Events & webinars | https://github.com/resources/events |
| Ebooks & reports | https://github.com/resources/whitepapers |
| Business insights | https://github.com/solutions/executive-insights |
| GitHub Skills | https://skills.github.com |
| Documentation | https://docs.github.com |
| Customer support | https://support.github.com |
| Community forum | https://github.com/orgs/community/discussions |
| Trust center | https://github.com/trust-center |
| Partners | https://github.com/partners |
| GitHub SponsorsFund open source developers | https://github.com/sponsors |
| Security Lab | https://securitylab.github.com |
| Maintainer Community | https://maintainers.github.com |
| Accelerator | https://github.com/accelerator |
| Archive Program | https://archiveprogram.github.com |
| Topics | https://github.com/topics |
| Trending | https://github.com/trending |
| Collections | https://github.com/collections |
| Enterprise platformAI-powered developer platform | https://github.com/enterprise |
| GitHub Advanced SecurityEnterprise-grade security features | https://github.com/security/advanced-security |
| Copilot for BusinessEnterprise-grade AI features | https://github.com/features/copilot/copilot-business |
| Premium SupportEnterprise-grade 24/7 support | https://github.com/premium-support |
| Pricing | https://github.com/pricing |
| Search syntax tips | https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax |
| documentation | https://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%2F104267 |
|
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%2Fcpython |
| Reload | https://github.com/python/cpython/pull/104267 |
| Reload | https://github.com/python/cpython/pull/104267 |
| Reload | https://github.com/python/cpython/pull/104267 |
|
python
| https://github.com/python |
| cpython | https://github.com/python/cpython |
| Please reload this page | https://github.com/python/cpython/pull/104267 |
|
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 page | https://github.com/python/cpython/pull/104267 |
|
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 service | https://docs.github.com/terms |
| privacy statement | https://docs.github.com/privacy |
| Sign in | https://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose |
| Jump to bottom | https://github.com/python/cpython/pull/104267#issue-comment-box |
| AlexWaygood | https://github.com/AlexWaygood |
| python:main | https://github.com/python/cpython/tree/main |
| AlexWaygood:simple-lru-cache | https://github.com/AlexWaygood/cpython/tree/simple-lru-cache |
|
gh-103193: cache calls to inspect._shadowed_dict in inspect.getattr_static
| https://github.com/python/cpython/pull/104267#top |
| AlexWaygood | https://github.com/AlexWaygood |
| python:main | https://github.com/python/cpython/tree/main |
| AlexWaygood:simple-lru-cache | https://github.com/AlexWaygood/cpython/tree/simple-lru-cache |
|
Conversation
9
| https://github.com/python/cpython/pull/104267 |
|
Commits
4
| https://github.com/python/cpython/pull/104267/commits |
|
Checks
0
| https://github.com/python/cpython/pull/104267/checks |
|
Files changed
| https://github.com/python/cpython/pull/104267/files |
| Please reload this page | https://github.com/python/cpython/pull/104267 |
| https://github.co/hiddenchars |
| https://github.com/python/cpython/pull/{{ revealButtonHref }} |
|
| https://github.com/AlexWaygood |
| AlexWaygood | https://github.com/AlexWaygood |
| May 7, 2023 | https://github.com/python/cpython/pull/104267#issue-1699101338 |
| Please reload this page | https://github.com/python/cpython/pull/104267 |
| @sobolevn | https://github.com/sobolevn |
| #103193 (comment) | https://github.com/python/cpython/issues/103193#issuecomment-1497396338 |
| @carljm | https://github.com/carljm |
| Optimise inspect.getattr_static #103193 | https://github.com/python/cpython/issues/103193 |
| Please reload this page | https://github.com/python/cpython/pull/104267 |
|
| https://github.com/AlexWaygood |
| pythongh-103193 | https://github.com/python/cpython/issues/103193 |
| : cache calls to inspect._shadowed_dict | https://github.com/python/cpython/pull/104267/commits/cb580bac935c111727ce177ae9b56109c5fce4b3 |
| cb580ba | https://github.com/python/cpython/pull/104267/commits/cb580bac935c111727ce177ae9b56109c5fce4b3 |
| https://github.com/AlexWaygood |
| AlexWaygood | https://github.com/AlexWaygood |
|
performance
| https://github.com/python/cpython/issues?q=state%3Aopen%20label%3Aperformance |
| May 7, 2023 | https://github.com/python/cpython/pull/104267#event-9184445890 |
| https://github.com/bedevere-bot |
| bedevere-bot | https://github.com/bedevere-bot |
|
May 7, 2023
| https://github.com/python/cpython/pull/104267#ref-issue-1651011100 |
|
Optimise inspect.getattr_static
#103193
| https://github.com/python/cpython/issues/103193 |
| https://github.com/AlexWaygood |
| AlexWaygood | https://github.com/AlexWaygood |
| carljm | https://github.com/carljm |
| May 7, 2023 14:59 | https://github.com/python/cpython/pull/104267#event-9184446113 |
| https://github.com/carljm |
| carljm | https://github.com/carljm |
| May 7, 2023 | https://github.com/python/cpython/pull/104267#issuecomment-1537463897 |
| Please reload this page | https://github.com/python/cpython/pull/104267 |
| https://github.com/AlexWaygood |
| AlexWaygood | https://github.com/AlexWaygood |
| May 7, 2023 | https://github.com/python/cpython/pull/104267#issuecomment-1537464615 |
| Please reload this page | https://github.com/python/cpython/pull/104267 |
| Please reload this page | https://github.com/python/cpython/pull/104267 |
| https://github.com/carljm |
| carljm | https://github.com/carljm |
| May 7, 2023 | https://github.com/python/cpython/pull/104267#issuecomment-1537466094 |
| Please reload this page | https://github.com/python/cpython/pull/104267 |
| https://github.com/AlexWaygood |
| AlexWaygood | https://github.com/AlexWaygood |
| May 7, 2023 | https://github.com/python/cpython/pull/104267#issuecomment-1537466743 |
| Please reload this page | https://github.com/python/cpython/pull/104267 |
| Please reload this page | https://github.com/python/cpython/pull/104267 |
| https://github.com/AlexWaygood |
| AlexWaygood | https://github.com/AlexWaygood |
| May 7, 2023 | https://github.com/python/cpython/pull/104267#issuecomment-1537469424 |
| Please reload this page | https://github.com/python/cpython/pull/104267 |
|
| https://github.com/AlexWaygood |
| Use mro tuple as the cache key | https://github.com/python/cpython/pull/104267/commits/c26587c462935935eb68172dc179d1d9298e3864 |
| c26587c | https://github.com/python/cpython/pull/104267/commits/c26587c462935935eb68172dc179d1d9298e3864 |
| https://github.com/AlexWaygood |
| AlexWaygood | https://github.com/AlexWaygood |
|
May 7, 2023
| https://github.com/python/cpython/pull/104267#pullrequestreview-1415928452 |
|
View reviewed changes
| https://github.com/python/cpython/pull/104267/files/c26587c462935935eb68172dc179d1d9298e3864 |
| Lib/inspect.py | https://github.com/python/cpython/pull/104267/files/c26587c462935935eb68172dc179d1d9298e3864#diff-b89cd06e4637abacb73f2500301ff979a67ad7ecbfa7cf151c7243715898d7ea |
| AlexWaygood | https://github.com/AlexWaygood |
| May 7, 2023 | https://github.com/python/cpython/pull/104267#discussion_r1186873998 |
| Please reload this page | https://github.com/python/cpython/pull/104267 |
| Learn more | https://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment |
| Please reload this page | https://github.com/python/cpython/pull/104267 |
| AlexWaygood | https://github.com/AlexWaygood |
| May 7, 2023 16:46 | https://github.com/python/cpython/pull/104267#commits-pushed-b3cc123 |
|
| https://github.com/AlexWaygood |
| Add regression test for if a class has its mro mutated(!) | https://github.com/python/cpython/pull/104267/commits/b3cc123ad1ca8d4371a912cdb0d364b962fb016f |
| b3cc123 | https://github.com/python/cpython/pull/104267/commits/b3cc123ad1ca8d4371a912cdb0d364b962fb016f |
|
| https://github.com/AlexWaygood |
| Update perf numbers in whatsnew | https://github.com/python/cpython/pull/104267/commits/2f4b42faaffdc0952ee69158160ccc87a78080a9 |
| 2f4b42f | https://github.com/python/cpython/pull/104267/commits/2f4b42faaffdc0952ee69158160ccc87a78080a9 |
| https://github.com/AlexWaygood |
| AlexWaygood | https://github.com/AlexWaygood |
|
skip news
| https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22skip%20news%22 |
| May 7, 2023 | https://github.com/python/cpython/pull/104267#event-9184572279 |
| https://github.com/AlexWaygood |
| AlexWaygood | https://github.com/AlexWaygood |
| May 7, 2023 16:22 | https://github.com/python/cpython/pull/104267#event-9184572607 |
| https://github.com/bedevere-bot |
| bedevere-bot | https://github.com/bedevere-bot |
|
awaiting core review
| https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20core%20review%22 |
| May 7, 2023 | https://github.com/python/cpython/pull/104267#event-9184579285 |
| https://github.com/AlexWaygood |
| AlexWaygood | https://github.com/AlexWaygood |
| May 7, 2023 | https://github.com/python/cpython/pull/104267#issuecomment-1537485862 |
| Please reload this page | https://github.com/python/cpython/pull/104267 |
| Please reload this page | https://github.com/python/cpython/pull/104267 |
| https://github.com/AlexWaygood |
| AlexWaygood | https://github.com/AlexWaygood |
|
type-feature
| https://github.com/python/cpython/issues?q=state%3Aopen%20label%3Atype-feature |
|
stdlib
| https://github.com/python/cpython/issues?q=state%3Aopen%20label%3Astdlib |
|
3.12
| https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A3.12 |
| May 7, 2023 | https://github.com/python/cpython/pull/104267#event-9184582996 |
| https://github.com/AlexWaygood |
| AlexWaygood | https://github.com/AlexWaygood |
| May 7, 2023 | https://github.com/python/cpython/pull/104267#issuecomment-1537486380 |
| https://github.com/python/cpython/pull/103195/files | https://github.com/python/cpython/pull/103195/files |
| Please reload this page | https://github.com/python/cpython/pull/104267 |
| https://github.com/AlexWaygood |
| AlexWaygood | https://github.com/AlexWaygood |
| May 7, 2023 | https://github.com/python/cpython/pull/104267#event-9184612582 |
| https://github.com/carljm |
| carljm | https://github.com/carljm |
|
May 7, 2023
| https://github.com/python/cpython/pull/104267#pullrequestreview-1415940809 |
|
View reviewed changes
| https://github.com/python/cpython/pull/104267/files/2f4b42faaffdc0952ee69158160ccc87a78080a9 |
| https://github.com/bedevere-bot |
| bedevere-bot | https://github.com/bedevere-bot |
|
awaiting merge
| https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20merge%22 |
|
awaiting core review
| https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20core%20review%22 |
| May 7, 2023 | https://github.com/python/cpython/pull/104267#event-9184664129 |
| https://github.com/AlexWaygood |
| AlexWaygood | https://github.com/AlexWaygood |
| 1b19bd1 | https://github.com/python/cpython/commit/1b19bd1a88e6c410fc9cd08db48e0d35cfa8bb5a |
| May 7, 2023 | https://github.com/python/cpython/pull/104267#event-9184684242 |
| https://github.com/bedevere-bot |
| bedevere-bot | https://github.com/bedevere-bot |
|
awaiting merge
| https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20merge%22 |
| May 7, 2023 | https://github.com/python/cpython/pull/104267#event-9184684292 |
| https://github.com/AlexWaygood |
| AlexWaygood | https://github.com/AlexWaygood |
| May 7, 2023 17:45 | https://github.com/python/cpython/pull/104267#event-9184684299 |
| https://github.com/AlexWaygood |
| AlexWaygood | https://github.com/AlexWaygood |
| May 7, 2023 | https://github.com/python/cpython/pull/104267#issuecomment-1537502604 |
| @carljm | https://github.com/carljm |
| Please reload this page | https://github.com/python/cpython/pull/104267 |
| jbower-fb | https://github.com/jbower-fb |
|
May 8, 2023
| https://github.com/python/cpython/pull/104267#ref-commit-86ca8d2 |
|
| https://github.com/AlexWaygood |
|
| https://github.com/carljm |
|
| https://github.com/jbower-fb |
| pythongh-103193 | https://github.com/python/cpython/issues/103193 |
| : cache calls to | https://github.com/jbower-fb/cpython/commit/86ca8d242de24f62b1bbcdf4109822d14bcc3ee1 |
| inspect._shadowed_dict | https://github.com/jbower-fb/cpython/commit/86ca8d242de24f62b1bbcdf4109822d14bcc3ee1 |
| in `inspect.… | https://github.com/jbower-fb/cpython/commit/86ca8d242de24f62b1bbcdf4109822d14bcc3ee1 |
| 86ca8d2 | https://github.com/jbower-fb/cpython/commit/86ca8d242de24f62b1bbcdf4109822d14bcc3ee1 |
| python#104267 | https://github.com/python/cpython/pull/104267 |
| https://github.com/williamwen42 |
| williamwen42 | https://github.com/williamwen42 |
|
Apr 17, 2024
| https://github.com/python/cpython/pull/104267#ref-issue-2249342935 |
|
[3.12] getattr_static can result in reference leaks
#118013
| https://github.com/python/cpython/issues/118013 |
| https://github.com/AlexWaygood |
| AlexWaygood | https://github.com/AlexWaygood |
|
Apr 23, 2024
| https://github.com/python/cpython/pull/104267#ref-pullrequest-2259924600 |
|
gh-118013: Use weakrefs for the cache key in inspect._shadowed_dict
#118202
| https://github.com/python/cpython/pull/118202 |
| Sign up for free | https://github.com/join?source=comment-repo |
| Sign in to comment | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F104267 |
|
| https://github.com/carljm |
|
carljm
| https://github.com/carljm |
|
| https://github.com/python/cpython/pull/104267/files/2f4b42faaffdc0952ee69158160ccc87a78080a9 |
|
3.12
| https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A3.12 |
|
performance
| https://github.com/python/cpython/issues?q=state%3Aopen%20label%3Aperformance |
|
skip news
| https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22skip%20news%22 |
|
stdlib
| https://github.com/python/cpython/issues?q=state%3Aopen%20label%3Astdlib |
|
type-feature
| https://github.com/python/cpython/issues?q=state%3Aopen%20label%3Atype-feature |
| Please reload this page | https://github.com/python/cpython/pull/104267 |
|
| https://github.com/AlexWaygood |
|
| https://github.com/carljm |
|
| https://github.com/bedevere-bot |
|
| https://github.com |
| Terms | https://docs.github.com/site-policy/github-terms/github-terms-of-service |
| Privacy | https://docs.github.com/site-policy/privacy-policies/github-privacy-statement |
| Security | https://github.com/security |
| Status | https://www.githubstatus.com/ |
| Community | https://github.community/ |
| Docs | https://docs.github.com/ |
| Contact | https://support.github.com?tags=dotcom-footer |