René's URL Explorer Experiment


Title: [mypyc] Make attribute access memory safe on free-threaded builds by JukkaL · Pull Request #21705 · python/mypy · GitHub

Open Graph Title: [mypyc] Make attribute access memory safe on free-threaded builds by JukkaL · Pull Request #21705 · python/mypy

X Title: [mypyc] Make attribute access memory safe on free-threaded builds by JukkaL · Pull Request #21705 · python/mypy

Description: Optional static typing for Python. Contribute to python/mypy development by creating an account on GitHub.

Open Graph Description: This fixes memory unsafety when there is a race condition related to attribute get/set operations on a free-threaded build, for simple reference-based attributes only (PyObject *). This includes at...

X Description: This fixes memory unsafety when there is a race condition related to attribute get/set operations on a free-threaded build, for simple reference-based attributes only (PyObject *). This includes at...

Opengraph URL: https://github.com/python/mypy/pull/21705

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
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:08a12af6-5dcd-2661-71c3-d1460f5b3e8a
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id85B4:1D7BA0:1E993F:29945B:6B0021C6
html-safe-nonce68d01ee638bcf2afad0479795cd463ae23d8cabe330c868c11417c4baf695cd7
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NUI0OjFEN0JBMDoxRTk5M0Y6Mjk5NDVCOjZCMDAyMUM2IiwidmlzaXRvcl9pZCI6IjY4MzY1NTA4MDQ0ODEwNjk1MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac4f5034cee75a7757d85cb1482f7a2ec239fa2a06d5abc8d5b35a3a7f1e69c331
hovercard-subject-tagpull_request:4016359874
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/mypy/21705/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/599dd80817b26c8ecc0cc4d92b2ea23f355cde565a42c3da35798d42c2e560f0/python/mypy/pull/21705
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/599dd80817b26c8ecc0cc4d92b2ea23f355cde565a42c3da35798d42c2e560f0/python/mypy/pull/21705
og:image:altThis fixes memory unsafety when there is a race condition related to attribute get/set operations on a free-threaded build, for simple reference-based attributes only (PyObject *). This includes at...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameJukkaL
hostnamegithub.com
expected-hostnamegithub.com
None4eb4cba0d69f045374ac15de9666d22b0961e1d555cc3824f36b7734c00c78e0
turbo-cache-controlno-cache
go-importgithub.com/python/mypy git https://github.com/python/mypy.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id7053637
octolytics-dimension-repository_nwopython/mypy
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id7053637
octolytics-dimension-repository_network_root_nwopython/mypy
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
release44c658b24abf00491fb7ae5f56d42c9f38cbeab2
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-namepull-requests

Links:

Skip to contenthttps://github.com/python/mypy/pull/21705#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F21705
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F21705
Sign uphttps://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%2Fmypy
Reloadhttps://github.com/python/mypy/pull/21705
Reloadhttps://github.com/python/mypy/pull/21705
Reloadhttps://github.com/python/mypy/pull/21705
pythonhttps://github.com/python
mypyhttps://github.com/python/mypy
Codehttps://github.com/python/mypy
Issues2.7k (2.7k)https://github.com/python/mypy/issues
Pull requests546 (546)https://github.com/python/mypy/pulls
Actionshttps://github.com/python/mypy/actions
Projectshttps://github.com/python/mypy/projects
Wikihttps://github.com/python/mypy/wiki
Security and qualityhttps://github.com/python/mypy/security
Insightshttps://github.com/python/mypy/insights
https://github.com/python/mypy
JukkaLhttps://github.com/JukkaL
masterhttps://github.com/python/mypy/tree/master
mypyc-safe-attrhttps://github.com/python/mypy/tree/mypyc-safe-attr
Conversationhttps://github.com/python/mypy/pull/21705
Commits16 (16)https://github.com/python/mypy/pull/21705/commits
Checkshttps://github.com/python/mypy/pull/21705/checks
Files changedhttps://github.com/python/mypy/pull/21705/files
[mypyc] Make attribute access memory safe on free-threaded buildshttps://github.com/python/mypy/pull/21705#top
JukkaLhttps://github.com/JukkaL
masterhttps://github.com/python/mypy/tree/master
mypyc-safe-attrhttps://github.com/python/mypy/tree/mypyc-safe-attr
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
Jul 8, 2026https://github.com/python/mypy/pull/21705#issue-4839698591
Please reload this pagehttps://github.com/python/mypy/pull/21705
mypyc/mypyc#1203https://github.com/mypyc/mypyc/issues/1203
Please reload this pagehttps://github.com/python/mypy/pull/21705
JukkaLhttps://github.com/JukkaL
July 8, 2026 12:29https://github.com/python/mypy/pull/21705#commits-pushed-f0f0440
https://github.com/JukkaL
WIP make attribute read safe if there is single writerhttps://github.com/python/mypy/pull/21705/commits/f0f044025689497afc5826ea144e70b72b5bda53
f0f0440https://github.com/python/mypy/pull/21705/commits/f0f044025689497afc5826ea144e70b72b5bda53
https://github.com/JukkaL
WIP make attribute writes safe for simple pointer typeshttps://github.com/python/mypy/pull/21705/commits/f9bcdb4c4ffb666e3fcae3f5287027ee80841a4a
f9bcdb4https://github.com/python/mypy/pull/21705/commits/f9bcdb4c4ffb666e3fcae3f5287027ee80841a4a
https://github.com/JukkaL
WIP add faster init path + adjust read implementationhttps://github.com/python/mypy/pull/21705/commits/141da6e3ad5432f1d96b53c39ab52b4145853ad1
141da6ehttps://github.com/python/mypy/pull/21705/commits/141da6e3ad5432f1d96b53c39ab52b4145853ad1
https://github.com/JukkaL
Only inline fast path of attr readhttps://github.com/python/mypy/pull/21705/commits/dc58f4e73ad52202f7b8e444b52ac72e104035e3
dc58f4ehttps://github.com/python/mypy/pull/21705/commits/dc58f4e73ad52202f7b8e444b52ac72e104035e3
https://github.com/JukkaL
Optimize final attribute readshttps://github.com/python/mypy/pull/21705/commits/5323ad82e2c4c72410876ec0c88393dc859acb59
5323ad8https://github.com/python/mypy/pull/21705/commits/5323ad82e2c4c72410876ec0c88393dc859acb59
https://github.com/JukkaL
Update commentshttps://github.com/python/mypy/pull/21705/commits/fa8e7abcfb34c1f2652a9b4168ae2b5a9e163d9b
fa8e7abhttps://github.com/python/mypy/pull/21705/commits/fa8e7abcfb34c1f2652a9b4168ae2b5a9e163d9b
https://github.com/JukkaL
Update commenthttps://github.com/python/mypy/pull/21705/commits/95b9fd6c0bdd830c97b73c02908d8b627356f468
95b9fd6https://github.com/python/mypy/pull/21705/commits/95b9fd6c0bdd830c97b73c02908d8b627356f468
https://github.com/JukkaL
Use CPy_NOINLINEhttps://github.com/python/mypy/pull/21705/commits/1bb2e045921198db0b5e19cc527cb4335fcd6518
1bb2e04https://github.com/python/mypy/pull/21705/commits/1bb2e045921198db0b5e19cc527cb4335fcd6518
https://github.com/JukkaL
Fix another attribute read code pathhttps://github.com/python/mypy/pull/21705/commits/f650d7ea430f068ab38d9014f8d5a5b1f324fba3
f650d7ehttps://github.com/python/mypy/pull/21705/commits/f650d7ea430f068ab38d9014f8d5a5b1f324fba3
https://github.com/JukkaL
Fix decref of old attribute valuehttps://github.com/python/mypy/pull/21705/commits/1bf07dcba7b709211fb7398facbd309dcf0e424b
1bf07dchttps://github.com/python/mypy/pull/21705/commits/1bf07dcba7b709211fb7398facbd309dcf0e424b
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
July 8, 2026 17:22https://github.com/python/mypy/pull/21705#event-27728087904
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
Jul 8, 2026https://github.com/python/mypy/pull/21705#issuecomment-4917430626
@msullivanhttps://github.com/msullivan
Please reload this pagehttps://github.com/python/mypy/pull/21705
https://github.com/msullivan
msullivanhttps://github.com/msullivan
Jul 8, 2026 https://github.com/python/mypy/pull/21705#pullrequestreview-4657332882
View reviewed changes https://github.com/python/mypy/pull/21705/files/1bf07dcba7b709211fb7398facbd309dcf0e424b
mypyc/lib-rt/pythonsupport.hhttps://github.com/python/mypy/pull/21705/files/1bf07dcba7b709211fb7398facbd309dcf0e424b#diff-af1250dfff0c5bd0ba26f901201826902b3efb6a6b9efa6f280f746da3940b80
msullivanhttps://github.com/msullivan
Jul 8, 2026https://github.com/python/mypy/pull/21705#discussion_r3546729618
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/mypy/pull/21705
JukkaLhttps://github.com/JukkaL
Jul 9, 2026https://github.com/python/mypy/pull/21705#discussion_r3552973365
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/mypy/pull/21705
mypyc/lib-rt/pythonsupport.chttps://github.com/python/mypy/pull/21705/files/1bf07dcba7b709211fb7398facbd309dcf0e424b#diff-00f02d80955b9c5161c224d077bb23991d4618e04c3c23f17186884e6287c51b
msullivanhttps://github.com/msullivan
Jul 8, 2026https://github.com/python/mypy/pull/21705#discussion_r3546793329
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/mypy/pull/21705
JukkaLhttps://github.com/JukkaL
Jul 9, 2026https://github.com/python/mypy/pull/21705#discussion_r3552967983
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/mypy/pull/21705
mypyc/lib-rt/pythonsupport.chttps://github.com/python/mypy/pull/21705/files/1bf07dcba7b709211fb7398facbd309dcf0e424b#diff-00f02d80955b9c5161c224d077bb23991d4618e04c3c23f17186884e6287c51b
msullivanhttps://github.com/msullivan
Jul 8, 2026https://github.com/python/mypy/pull/21705#discussion_r3546903931
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/mypy/pull/21705
JukkaLhttps://github.com/JukkaL
Jul 9, 2026https://github.com/python/mypy/pull/21705#discussion_r3552966580
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/mypy/pull/21705
JukkaLhttps://github.com/JukkaL
July 9, 2026 11:27https://github.com/python/mypy/pull/21705#commits-pushed-1495001
https://github.com/JukkaL
Optimize SetAttrRef -- drop _PyObject_SetMaybeWeakrefhttps://github.com/python/mypy/pull/21705/commits/149500126d9c999ca682e09cfe2a4ec79575aa4f
1495001https://github.com/python/mypy/pull/21705/commits/149500126d9c999ca682e09cfe2a4ec79575aa4f
https://github.com/JukkaL
Remove critical section from get attr slow pathhttps://github.com/python/mypy/pull/21705/commits/bb82dcede574eca57db65aaa5d49970dc9d82558
bb82dcehttps://github.com/python/mypy/pull/21705/commits/bb82dcede574eca57db65aaa5d49970dc9d82558
https://github.com/JukkaL
Further simplify slow pathhttps://github.com/python/mypy/pull/21705/commits/c6f345e80dbd9b210b1ecab225ca72434d6e62e7
c6f345ehttps://github.com/python/mypy/pull/21705/commits/c6f345e80dbd9b210b1ecab225ca72434d6e62e7
https://github.com/JukkaL
Update commentshttps://github.com/python/mypy/pull/21705/commits/8320eae008271d5fec179cea43aec2130b32e244
8320eaehttps://github.com/python/mypy/pull/21705/commits/8320eae008271d5fec179cea43aec2130b32e244
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
Jul 9, 2026https://github.com/python/mypy/pull/21705#issuecomment-4927093471
Please reload this pagehttps://github.com/python/mypy/pull/21705
https://github.com/msullivan
msullivanhttps://github.com/msullivan
Jul 10, 2026 https://github.com/python/mypy/pull/21705#pullrequestreview-4668837824
View reviewed changes https://github.com/python/mypy/pull/21705/files/8320eae008271d5fec179cea43aec2130b32e244
msullivanhttps://github.com/msullivan
https://github.com/python/mypy/pull/21705#pullrequestreview-4668837824
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/mypy/pull/21705
mypyc/codegen/emitclass.pyhttps://github.com/python/mypy/pull/21705/files/8320eae008271d5fec179cea43aec2130b32e244#diff-2ebf14883ec1c15fc6962be521fd27028b7e0233ae812a67b04bef644613aa8a
msullivanhttps://github.com/msullivan
Jul 10, 2026https://github.com/python/mypy/pull/21705#discussion_r3556633723
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/mypy/pull/21705
JukkaLhttps://github.com/JukkaL
Jul 10, 2026https://github.com/python/mypy/pull/21705#discussion_r3557904888
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/mypy/pull/21705
mypyc/lib-rt/pythonsupport.hhttps://github.com/python/mypy/pull/21705/files/8320eae008271d5fec179cea43aec2130b32e244#diff-af1250dfff0c5bd0ba26f901201826902b3efb6a6b9efa6f280f746da3940b80
msullivanhttps://github.com/msullivan
Jul 10, 2026https://github.com/python/mypy/pull/21705#discussion_r3556656652
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/mypy/pull/21705
JukkaLhttps://github.com/JukkaL
Jul 10, 2026https://github.com/python/mypy/pull/21705#discussion_r3558430725
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/mypy/pull/21705
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
July 10, 2026 09:21https://github.com/python/mypy/pull/21705#event-27806297298
JukkaLhttps://github.com/JukkaL
July 10, 2026 11:51https://github.com/python/mypy/pull/21705#commits-pushed-1b73f65
https://github.com/JukkaL
Update stale commenthttps://github.com/python/mypy/pull/21705/commits/1b73f6519ef64acd6701768e50d4de40f2c635e1
1b73f65https://github.com/python/mypy/pull/21705/commits/1b73f6519ef64acd6701768e50d4de40f2c635e1
https://github.com/JukkaL
Merge branch 'master' into mypyc-safe-attrhttps://github.com/python/mypy/pull/21705/commits/18de4e1efd4661f5a8579f0d4f54a2b56ef1fd53
18de4e1https://github.com/python/mypy/pull/21705/commits/18de4e1efd4661f5a8579f0d4f54a2b56ef1fd53
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
d5daed2https://github.com/python/mypy/commit/d5daed27b550c034bde1d697d37a64953bc6ec52
Jul 10, 2026https://github.com/python/mypy/pull/21705#event-27811033806
Please reload this pagehttps://github.com/python/mypy/pull/21705
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
July 10, 2026 11:29https://github.com/python/mypy/pull/21705#event-27811035138
JukkaLhttps://github.com/JukkaL
Jul 10, 2026 https://github.com/python/mypy/pull/21705#ref-commit-a9f62a3
https://github.com/JukkaL
[mypyc] Make attribute access memory safe on free-threaded builds (https://github.com/python/mypy/commit/a9f62a3cf98a58a7a2607b7c81695802b39f5edc
#2…https://github.com/python/mypy/pull/21705
a9f62a3https://github.com/python/mypy/commit/a9f62a3cf98a58a7a2607b7c81695802b39f5edc
…1705https://github.com/python/mypy/pull/21705
mypyc/mypyc#1203https://github.com/mypyc/mypyc/issues/1203
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
Jul 10, 2026 https://github.com/python/mypy/pull/21705#ref-issue-4853901524
Release 2.3 planning #21717 https://github.com/python/mypy/issues/21717
https://github.co/hiddenchars
https://github.com/python/mypy/pull/{{ revealButtonHref }}
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%2Fmypy%2Fpull%2F21705
https://github.com/msullivan
msullivan https://github.com/msullivan
https://github.com/python/mypy/pull/21705/files/8320eae008271d5fec179cea43aec2130b32e244
Please reload this pagehttps://github.com/python/mypy/pull/21705
Please reload this pagehttps://github.com/python/mypy/pull/21705
https://github.com/JukkaL
https://github.com/msullivan
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.