René's URL Explorer Experiment


Title: gh-139103: Improve namedtuple scaling in free-threaded build by colesbury · Pull Request #144332 · python/cpython · GitHub

Open Graph Title: gh-139103: Improve namedtuple scaling in free-threaded build by colesbury · Pull Request #144332 · python/cpython

X Title: gh-139103: Improve namedtuple scaling in free-threaded build by colesbury · Pull Request #144332 · python/cpython

Description: Add _Py_type_getattro_stackref, a variant of type attribute lookup that returns _PyStackRef instead of PyObject*. This allows returning deferred references in the free-threaded build, reducing reference count contention when accessing type attributes. This improves scaling of namedtuple instantiation across multiple threads. Issue: gh-139103

Open Graph Description: Add _Py_type_getattro_stackref, a variant of type attribute lookup that returns _PyStackRef instead of PyObject*. This allows returning deferred references in the free-threaded build, reducing refe...

X Description: Add _Py_type_getattro_stackref, a variant of type attribute lookup that returns _PyStackRef instead of PyObject*. This allows returning deferred references in the free-threaded build, reducing refe...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:731cfa30-86cb-5fc9-8411-c0cebe373920
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idC7DC:2E7C7E:3A5F9E:4F7FF4:6A55952F
html-safe-nonce6110eda07b1d9eb913ca520603e426a6a8418cddcf52d1c080782740df0132f7
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDN0RDOjJFN0M3RTozQTVGOUU6NEY3RkY0OjZBNTU5NTJGIiwidmlzaXRvcl9pZCI6Ijg2NDg0MTcxNTM0MDg5MzExMTkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac258cb0c60e8bd3a9051e92a9648e4f226493af0a1a5583f3ef8009c9bebb8921
hovercard-subject-tagpull_request:3225270840
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/144332/files
twitter:imagehttps://avatars.githubusercontent.com/u/655866?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/655866?s=400&v=4
og:image:altAdd _Py_type_getattro_stackref, a variant of type attribute lookup that returns _PyStackRef instead of PyObject*. This allows returning deferred references in the free-threaded build, reducing refe...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneb5665c84831ed9ac4fb79519c16c9c5580ba8092fb8bb6e3e72972ec7197348e
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
releaseaa21baa44893467b0b640d0300538f84ca8c475b
ui-targetcanary-1
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/144332/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F144332%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
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
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
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/enterprise/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%2F144332%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/144332/files
Reloadhttps://github.com/python/cpython/pull/144332/files
Reloadhttps://github.com/python/cpython/pull/144332/files
Please reload this pagehttps://github.com/python/cpython/pull/144332/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/144332/files
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 35k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 73.8k 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.3k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security and quality 0 https://github.com/python/cpython/security
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 and quality 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
colesburyhttps://github.com/colesbury
python:mainhttps://github.com/python/cpython/tree/main
colesbury:gh-139103-named-tuplehttps://github.com/colesbury/cpython/tree/gh-139103-named-tuple
Conversation 13 https://github.com/python/cpython/pull/144332
Commits 9 https://github.com/python/cpython/pull/144332/commits
Checks 69 https://github.com/python/cpython/pull/144332/checks
Files changed https://github.com/python/cpython/pull/144332/files
Please reload this pagehttps://github.com/python/cpython/pull/144332/files
gh-139103: Improve namedtuple scaling in free-threaded build https://github.com/python/cpython/pull/144332/files#top
Show all changes 9 commits https://github.com/python/cpython/pull/144332/files
3600622 gh-139103: Improve namedtuple scaling in free-threaded build colesbury Jan 29, 2026 https://github.com/python/cpython/pull/144332/commits/360062235ff460bb4a415cea3d34492207fec50b
382e937 Add blurb colesbury Jan 29, 2026 https://github.com/python/cpython/pull/144332/commits/382e937ff6a5a4a62305f92fb9e1d26f0b9cfe08
6edb13f Rename PyObject_GetAttrStackRef to _PyObject_GetAttrStackRef colesbury Jan 30, 2026 https://github.com/python/cpython/pull/144332/commits/6edb13fd32f0114c575e00c9a0b0aad0f61d35fe
f09d89a Merge branch 'main' into gh-139103-named-tuple colesbury Feb 3, 2026 https://github.com/python/cpython/pull/144332/commits/f09d89ad00bc244e13b33331ea8baeca9129418d
596d359 Merge branch 'main' into gh-139103-named-tuple colesbury Feb 5, 2026 https://github.com/python/cpython/pull/144332/commits/596d3591ce4d49368fca82ded27ce662f843abf1
7d89766 Apply suggestion from @vstinner colesbury Feb 5, 2026 https://github.com/python/cpython/pull/144332/commits/7d89766fc938146640f1fe628a459894354cd515
e3ae10e Apply suggestion from @vstinner colesbury Feb 5, 2026 https://github.com/python/cpython/pull/144332/commits/e3ae10ed8599c49dbdc212657a4ae555b36613b1
eb9d185 format colesbury Feb 5, 2026 https://github.com/python/cpython/pull/144332/commits/eb9d1850ee7bec1ac1afaafe455c69f54878149e
c53a02f Update Include/internal/pycore_function.h colesbury Feb 5, 2026 https://github.com/python/cpython/pull/144332/commits/c53a02f8d9b7251c30ae625304162ad7ed9ecb61
Clear filters https://github.com/python/cpython/pull/144332/files
Please reload this pagehttps://github.com/python/cpython/pull/144332/files
Please reload this pagehttps://github.com/python/cpython/pull/144332/files
pycore_function.h https://github.com/python/cpython/pull/144332/files#diff-c4efb36e1ad7be7992f0652a436b45ba6dbd05e88954c629f920008d2edc7566
pycore_object.h https://github.com/python/cpython/pull/144332/files#diff-2a12f738a77b362d74a65949b58c37f2affcd15ba8b1c979b63bd00223b8a456
pycore_typeobject.h https://github.com/python/cpython/pull/144332/files#diff-9df981eafa9c743230f2e1513191ba147f0fba63d0c51fb7968c1e7093d9e877
2026-01-29-16-57-11.gh-issue-139103.icXIEQ.rst https://github.com/python/cpython/pull/144332/files#diff-6fdd077fa960d9e853854d3679620c1b93622e4fcaed04c2f8f73b6cc1faffa9
test_cases.c.h https://github.com/python/cpython/pull/144332/files#diff-2852a58ed53ab1473b74dbdc4165885a9b74865b6d71e48fa4813d6289fa1838
funcobject.c https://github.com/python/cpython/pull/144332/files#diff-57bc77178b3d6f1010dd924722c87522f224d93bc341f0e46c0945094124d8f2
object.c https://github.com/python/cpython/pull/144332/files#diff-ba56d44ce0dd731d979970b966fde9d8dd15d12a82f727a052a8ad48d4a49363
typeobject.c https://github.com/python/cpython/pull/144332/files#diff-1decebeef15f4e0b0ce106c665751ec55068d4d1d1825847925ad4f528b5b872
bytecodes.c https://github.com/python/cpython/pull/144332/files#diff-729a985b0cb8b431cb291f1edb561bbbfea22e3f8c262451cd83328a0936a342
executor_cases.c.h https://github.com/python/cpython/pull/144332/files#diff-a1c3430c42a66c16e6d2e154491a6da993b187b27c628545a12a02c7b2a06b81
generated_cases.c.h https://github.com/python/cpython/pull/144332/files#diff-4ef46fa654f95502e49a24f7dc8ee31a4cac9b3433fe9cd2b2d4dd78cfbad448
ftscalingbench.py https://github.com/python/cpython/pull/144332/files#diff-d51c3e79e672f3d98cfef9a358923325b99608bfac16469b23f8f76dfa177c50
Include/internal/pycore_function.hhttps://github.com/python/cpython/pull/144332/files#diff-c4efb36e1ad7be7992f0652a436b45ba6dbd05e88954c629f920008d2edc7566
View file https://github.com/colesbury/cpython/blob/c53a02f8d9b7251c30ae625304162ad7ed9ecb61/Include/internal/pycore_function.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/144332/{{ revealButtonHref }}
https://github.com/python/cpython/pull/144332/files#diff-c4efb36e1ad7be7992f0652a436b45ba6dbd05e88954c629f920008d2edc7566
https://github.com/python/cpython/pull/144332/files#diff-c4efb36e1ad7be7992f0652a436b45ba6dbd05e88954c629f920008d2edc7566
Include/internal/pycore_object.hhttps://github.com/python/cpython/pull/144332/files#diff-2a12f738a77b362d74a65949b58c37f2affcd15ba8b1c979b63bd00223b8a456
View file https://github.com/colesbury/cpython/blob/c53a02f8d9b7251c30ae625304162ad7ed9ecb61/Include/internal/pycore_object.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/144332/{{ revealButtonHref }}
https://github.com/python/cpython/pull/144332/files#diff-2a12f738a77b362d74a65949b58c37f2affcd15ba8b1c979b63bd00223b8a456
https://github.com/python/cpython/pull/144332/files#diff-2a12f738a77b362d74a65949b58c37f2affcd15ba8b1c979b63bd00223b8a456
Include/internal/pycore_typeobject.hhttps://github.com/python/cpython/pull/144332/files#diff-9df981eafa9c743230f2e1513191ba147f0fba63d0c51fb7968c1e7093d9e877
View file https://github.com/colesbury/cpython/blob/c53a02f8d9b7251c30ae625304162ad7ed9ecb61/Include/internal/pycore_typeobject.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/144332/{{ revealButtonHref }}
https://github.com/python/cpython/pull/144332/files#diff-9df981eafa9c743230f2e1513191ba147f0fba63d0c51fb7968c1e7093d9e877
https://github.com/python/cpython/pull/144332/files#diff-9df981eafa9c743230f2e1513191ba147f0fba63d0c51fb7968c1e7093d9e877
https://github.com/python/cpython/pull/144332/files#diff-9df981eafa9c743230f2e1513191ba147f0fba63d0c51fb7968c1e7093d9e877
https://github.com/python/cpython/pull/144332/files#diff-9df981eafa9c743230f2e1513191ba147f0fba63d0c51fb7968c1e7093d9e877
Misc/NEWS.d/next/Core_and_Builtins/2026-01-29-16-57-11.gh-issue-139103.icXIEQ.rsthttps://github.com/python/cpython/pull/144332/files#diff-6fdd077fa960d9e853854d3679620c1b93622e4fcaed04c2f8f73b6cc1faffa9
View file https://github.com/colesbury/cpython/blob/c53a02f8d9b7251c30ae625304162ad7ed9ecb61/Misc/NEWS.d/next/Core_and_Builtins/2026-01-29-16-57-11.gh-issue-139103.icXIEQ.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/144332/{{ revealButtonHref }}
Modules/_testinternalcapi/test_cases.c.hhttps://github.com/python/cpython/pull/144332/files#diff-2852a58ed53ab1473b74dbdc4165885a9b74865b6d71e48fa4813d6289fa1838
View file https://github.com/colesbury/cpython/blob/c53a02f8d9b7251c30ae625304162ad7ed9ecb61/Modules/_testinternalcapi/test_cases.c.h
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/python/cpython/pull/144332/files
Objects/funcobject.chttps://github.com/python/cpython/pull/144332/files#diff-57bc77178b3d6f1010dd924722c87522f224d93bc341f0e46c0945094124d8f2
View file https://github.com/colesbury/cpython/blob/c53a02f8d9b7251c30ae625304162ad7ed9ecb61/Objects/funcobject.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/144332/{{ revealButtonHref }}
https://github.com/python/cpython/pull/144332/files#diff-57bc77178b3d6f1010dd924722c87522f224d93bc341f0e46c0945094124d8f2
https://github.com/python/cpython/pull/144332/files#diff-57bc77178b3d6f1010dd924722c87522f224d93bc341f0e46c0945094124d8f2
https://github.com/python/cpython/pull/144332/files#diff-57bc77178b3d6f1010dd924722c87522f224d93bc341f0e46c0945094124d8f2
https://github.com/python/cpython/pull/144332/files#diff-57bc77178b3d6f1010dd924722c87522f224d93bc341f0e46c0945094124d8f2
https://github.com/python/cpython/pull/144332/files#diff-57bc77178b3d6f1010dd924722c87522f224d93bc341f0e46c0945094124d8f2
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L218
Objects/object.chttps://github.com/python/cpython/pull/144332/files#diff-ba56d44ce0dd731d979970b966fde9d8dd15d12a82f727a052a8ad48d4a49363
View file https://github.com/colesbury/cpython/blob/c53a02f8d9b7251c30ae625304162ad7ed9ecb61/Objects/object.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/144332/{{ revealButtonHref }}
https://github.com/python/cpython/pull/144332/files#diff-ba56d44ce0dd731d979970b966fde9d8dd15d12a82f727a052a8ad48d4a49363
https://github.com/python/cpython/pull/144332/files#diff-ba56d44ce0dd731d979970b966fde9d8dd15d12a82f727a052a8ad48d4a49363
https://github.com/python/cpython/pull/144332/files#diff-ba56d44ce0dd731d979970b966fde9d8dd15d12a82f727a052a8ad48d4a49363
Please reload this pagehttps://github.com/python/cpython/pull/144332/files
https://github.com/python/cpython/pull/144332/files#diff-ba56d44ce0dd731d979970b966fde9d8dd15d12a82f727a052a8ad48d4a49363
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L220
Objects/typeobject.chttps://github.com/python/cpython/pull/144332/files#diff-1decebeef15f4e0b0ce106c665751ec55068d4d1d1825847925ad4f528b5b872
View file https://github.com/colesbury/cpython/blob/c53a02f8d9b7251c30ae625304162ad7ed9ecb61/Objects/typeobject.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/144332/{{ revealButtonHref }}
https://github.com/python/cpython/pull/144332/files#diff-1decebeef15f4e0b0ce106c665751ec55068d4d1d1825847925ad4f528b5b872
https://github.com/python/cpython/pull/144332/files#diff-1decebeef15f4e0b0ce106c665751ec55068d4d1d1825847925ad4f528b5b872
https://github.com/python/cpython/pull/144332/files#diff-1decebeef15f4e0b0ce106c665751ec55068d4d1d1825847925ad4f528b5b872
https://github.com/python/cpython/pull/144332/files#diff-1decebeef15f4e0b0ce106c665751ec55068d4d1d1825847925ad4f528b5b872
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L225
Python/bytecodes.chttps://github.com/python/cpython/pull/144332/files#diff-729a985b0cb8b431cb291f1edb561bbbfea22e3f8c262451cd83328a0936a342
View file https://github.com/colesbury/cpython/blob/c53a02f8d9b7251c30ae625304162ad7ed9ecb61/Python/bytecodes.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/144332/{{ revealButtonHref }}
https://github.com/python/cpython/pull/144332/files#diff-729a985b0cb8b431cb291f1edb561bbbfea22e3f8c262451cd83328a0936a342
https://github.com/python/cpython/pull/144332/files#diff-729a985b0cb8b431cb291f1edb561bbbfea22e3f8c262451cd83328a0936a342
Please reload this pagehttps://github.com/python/cpython/pull/144332/files
Please reload this pagehttps://github.com/python/cpython/pull/144332/files
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.