René's URL Explorer Experiment


Title: gh-119311: Fix name mangling with PEP 695 generic classes by JelleZijlstra · Pull Request #119464 · python/cpython · GitHub

Open Graph Title: gh-119311: Fix name mangling with PEP 695 generic classes by JelleZijlstra · Pull Request #119464 · python/cpython

X Title: gh-119311: Fix name mangling with PEP 695 generic classes by JelleZijlstra · Pull Request #119464 · python/cpython

Description: Fixes #119311. Fixes #119395. There are two related bugs with name mangling in generic classes: it incorrectly gets applied to names that appear in the class's type param scope (#119311) and it leaks into code after the generic class (#119395). This PR fixes both by introducing a new mechanism where in a type param scope, only type param names are mangled. Unfortunately, I'm not sure we can backport this to 3.12, as it changes some internal C APIs and the magic number. Issue: gh-119311

Open Graph Description: Fixes #119311. Fixes #119395. There are two related bugs with name mangling in generic classes: it incorrectly gets applied to names that appear in the class's type param scope (#119311) and it...

X Description: Fixes #119311. Fixes #119395. There are two related bugs with name mangling in generic classes: it incorrectly gets applied to names that appear in the class's type param scope (#119311) an...

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

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.112.4

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/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:09b6aa3d-1ffb-0595-7706-ead210d2dca4
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD156:128099:ECAEC7:13F4843:6B0654CD
html-safe-noncef36095b134439b859e7dc867a89148d279aa551b0fe419b3a3a0acae92c15071
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMTU2OjEyODA5OTpFQ0FFQzc6MTNGNDg0Mzo2QjA2NTRDRCIsInZpc2l0b3JfaWQiOiI1NjkxNDA1NjQ4NDI1MDE0NDc3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac5691ed6c19d781d7c2bfaf4f4c6d4f1dce9b64801e154dcab85242cbe3e2c6ee
hovercard-subject-tagpull_request:1884655254
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/119464/files
twitter:imagehttps://avatars.githubusercontent.com/u/906600?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/906600?s=400&v=4
og:image:altFixes #119311. Fixes #119395. There are two related bugs with name mangling in generic classes: it incorrectly gets applied to names that appear in the class's type param scope (#119311) and it...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None6324e6ac990fb6befbec840cc0e102a1071c339bfe8f9826bb12de2e3ba1d297
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
release7f0aa75f4141d440c6110dc31af7ea7797abb6c4
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/119464/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F119464%2Ffiles
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%2Fcpython%2Fpull%2F119464%2Ffiles
Sign uphttps://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/119464/files
Reloadhttps://github.com/python/cpython/pull/119464/files
Reloadhttps://github.com/python/cpython/pull/119464/files
pythonhttps://github.com/python
cpythonhttps://github.com/python/cpython
Codehttps://github.com/python/cpython
Issues5k+ (5k+)https://github.com/python/cpython/issues
Pull requests2.4k (2.4k)https://github.com/python/cpython/pulls
Actionshttps://github.com/python/cpython/actions
Projectshttps://github.com/python/cpython/projects
Security and qualityhttps://github.com/python/cpython/security
Insightshttps://github.com/python/cpython/insights
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
JelleZijlstrahttps://github.com/JelleZijlstra
python:mainhttps://github.com/python/cpython/tree/main
JelleZijlstra:pep695-mangle2https://github.com/JelleZijlstra/cpython/tree/pep695-mangle2
Conversation 8 https://github.com/python/cpython/pull/119464
Commits 5 https://github.com/python/cpython/pull/119464/commits
Checks 0 https://github.com/python/cpython/pull/119464/checks
Files changed https://github.com/python/cpython/pull/119464/files
Please reload this pagehttps://github.com/python/cpython/pull/119464/files
gh-119311: Fix name mangling with PEP 695 generic classes https://github.com/python/cpython/pull/119464/files#top
Show all changes 5 commits https://github.com/python/cpython/pull/119464/files
a43da60 gh-119311: Fix name mangling with PEP 695 generic classes JelleZijlstra May 23, 2024 https://github.com/python/cpython/pull/119464/commits/a43da60e7d586eca53a32dc81d7dcb7919a82789
0bfe77c Another test JelleZijlstra May 23, 2024 https://github.com/python/cpython/pull/119464/commits/0bfe77c354bd3baf5465740afe9bd4d077dc7c81
1f27659 magic JelleZijlstra May 23, 2024 https://github.com/python/cpython/pull/119464/commits/1f2765974d8dcb2d72d96c704a64c65872b7b3e5
fffc4ea Remove unnecessary line JelleZijlstra May 23, 2024 https://github.com/python/cpython/pull/119464/commits/fffc4ea1620cc9a62470d6fdf89276194565a194
b119fe2 Merge branch 'main' into pep695-mangle2 JelleZijlstra May 28, 2024 https://github.com/python/cpython/pull/119464/commits/b119fe2d2b1a328c6a45c957f19f430d079ff30f
Clear filters https://github.com/python/cpython/pull/119464/files
Please reload this pagehttps://github.com/python/cpython/pull/119464/files
Please reload this pagehttps://github.com/python/cpython/pull/119464/files
pycore_symtable.h https://github.com/python/cpython/pull/119464/files#diff-2a51d92a01c0bc62a48f185bdae9d50adebaffdc9bb4a1aff64f41edca712ddf
_bootstrap_external.py https://github.com/python/cpython/pull/119464/files#diff-efefe383b3a81d16150c280db0b64eed7569254299418f64cc0d749f8e16f3a4
test_type_params.py https://github.com/python/cpython/pull/119464/files#diff-a3155be59171fb8ab2dbda75f1be6110623d1f120e7a01ff23f2344ee7635bfa
2024-05-23-06-34-14.gh-issue-119395.z-Hsqb.rst https://github.com/python/cpython/pull/119464/files#diff-fa7210a4e637a5cd989208dc13b1f3b70749dfbe47e428f29f1e19e935ff8606
2024-05-23-06-34-45.gh-issue-119311.2DBwKR.rst https://github.com/python/cpython/pull/119464/files#diff-12ff4b04d3fbbb8f79ad7117c5d54d4c960a8de0c57faf832c13cc1576e25461
compile.c https://github.com/python/cpython/pull/119464/files#diff-ebc983d9f91e5bcf73500e377ac65e85863c4f77fd5b6b6caf4fcdf7c0f0b057
symtable.c https://github.com/python/cpython/pull/119464/files#diff-1029343b7709f438c869082355577469b5aa784b454afa461ca2844ce9910ea6
Include/internal/pycore_symtable.hhttps://github.com/python/cpython/pull/119464/files#diff-2a51d92a01c0bc62a48f185bdae9d50adebaffdc9bb4a1aff64f41edca712ddf
View file https://github.com/JelleZijlstra/cpython/blob/b119fe2d2b1a328c6a45c957f19f430d079ff30f/Include/internal/pycore_symtable.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/119464/{{ revealButtonHref }}
https://github.com/python/cpython/pull/119464/files#diff-2a51d92a01c0bc62a48f185bdae9d50adebaffdc9bb4a1aff64f41edca712ddf
https://github.com/python/cpython/pull/119464/files#diff-2a51d92a01c0bc62a48f185bdae9d50adebaffdc9bb4a1aff64f41edca712ddf
https://github.com/python/cpython/pull/119464/files#diff-2a51d92a01c0bc62a48f185bdae9d50adebaffdc9bb4a1aff64f41edca712ddf
https://github.com/python/cpython/pull/119464/files#diff-2a51d92a01c0bc62a48f185bdae9d50adebaffdc9bb4a1aff64f41edca712ddf
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L261
Lib/importlib/_bootstrap_external.pyhttps://github.com/python/cpython/pull/119464/files#diff-efefe383b3a81d16150c280db0b64eed7569254299418f64cc0d749f8e16f3a4
View file https://github.com/JelleZijlstra/cpython/blob/b119fe2d2b1a328c6a45c957f19f430d079ff30f/Lib/importlib/_bootstrap_external.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/119464/{{ revealButtonHref }}
https://github.com/python/cpython/pull/119464/files#diff-efefe383b3a81d16150c280db0b64eed7569254299418f64cc0d749f8e16f3a4
https://github.com/python/cpython/pull/119464/files#diff-efefe383b3a81d16150c280db0b64eed7569254299418f64cc0d749f8e16f3a4
https://github.com/python/cpython/pull/119464/files#diff-efefe383b3a81d16150c280db0b64eed7569254299418f64cc0d749f8e16f3a4
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L355
Lib/test/test_type_params.pyhttps://github.com/python/cpython/pull/119464/files#diff-a3155be59171fb8ab2dbda75f1be6110623d1f120e7a01ff23f2344ee7635bfa
View file https://github.com/JelleZijlstra/cpython/blob/b119fe2d2b1a328c6a45c957f19f430d079ff30f/Lib/test/test_type_params.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/119464/{{ revealButtonHref }}
https://github.com/python/cpython/pull/119464/files#diff-a3155be59171fb8ab2dbda75f1be6110623d1f120e7a01ff23f2344ee7635bfa
https://github.com/python/cpython/pull/119464/files#diff-a3155be59171fb8ab2dbda75f1be6110623d1f120e7a01ff23f2344ee7635bfa
Misc/NEWS.d/next/Core and Builtins/2024-05-23-06-34-14.gh-issue-119395.z-Hsqb.rsthttps://github.com/python/cpython/pull/119464/files#diff-fa7210a4e637a5cd989208dc13b1f3b70749dfbe47e428f29f1e19e935ff8606
View file https://github.com/JelleZijlstra/cpython/blob/b119fe2d2b1a328c6a45c957f19f430d079ff30f/Misc/NEWS.d/next/Core%20and%20Builtins/2024-05-23-06-34-14.gh-issue-119395.z-Hsqb.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/119464/{{ revealButtonHref }}
Misc/NEWS.d/next/Core and Builtins/2024-05-23-06-34-45.gh-issue-119311.2DBwKR.rsthttps://github.com/python/cpython/pull/119464/files#diff-12ff4b04d3fbbb8f79ad7117c5d54d4c960a8de0c57faf832c13cc1576e25461
View file https://github.com/JelleZijlstra/cpython/blob/b119fe2d2b1a328c6a45c957f19f430d079ff30f/Misc/NEWS.d/next/Core%20and%20Builtins/2024-05-23-06-34-45.gh-issue-119311.2DBwKR.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/119464/{{ revealButtonHref }}
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L229
Python/compile.chttps://github.com/python/cpython/pull/119464/files#diff-ebc983d9f91e5bcf73500e377ac65e85863c4f77fd5b6b6caf4fcdf7c0f0b057
View file https://github.com/JelleZijlstra/cpython/blob/b119fe2d2b1a328c6a45c957f19f430d079ff30f/Python/compile.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/119464/{{ revealButtonHref }}
https://github.com/python/cpython/pull/119464/files#diff-ebc983d9f91e5bcf73500e377ac65e85863c4f77fd5b6b6caf4fcdf7c0f0b057
https://github.com/python/cpython/pull/119464/files#diff-ebc983d9f91e5bcf73500e377ac65e85863c4f77fd5b6b6caf4fcdf7c0f0b057
https://github.com/python/cpython/pull/119464/files#diff-ebc983d9f91e5bcf73500e377ac65e85863c4f77fd5b6b6caf4fcdf7c0f0b057
https://github.com/python/cpython/pull/119464/files#diff-ebc983d9f91e5bcf73500e377ac65e85863c4f77fd5b6b6caf4fcdf7c0f0b057
https://github.com/python/cpython/pull/119464/files#diff-ebc983d9f91e5bcf73500e377ac65e85863c4f77fd5b6b6caf4fcdf7c0f0b057
https://github.com/python/cpython/pull/119464/files#diff-ebc983d9f91e5bcf73500e377ac65e85863c4f77fd5b6b6caf4fcdf7c0f0b057
https://github.com/python/cpython/pull/119464/files#diff-ebc983d9f91e5bcf73500e377ac65e85863c4f77fd5b6b6caf4fcdf7c0f0b057
https://github.com/python/cpython/pull/119464/files#diff-ebc983d9f91e5bcf73500e377ac65e85863c4f77fd5b6b6caf4fcdf7c0f0b057
https://github.com/python/cpython/pull/119464/files#diff-ebc983d9f91e5bcf73500e377ac65e85863c4f77fd5b6b6caf4fcdf7c0f0b057
https://github.com/python/cpython/pull/119464/files#diff-ebc983d9f91e5bcf73500e377ac65e85863c4f77fd5b6b6caf4fcdf7c0f0b057
https://github.com/python/cpython/pull/119464/files#diff-ebc983d9f91e5bcf73500e377ac65e85863c4f77fd5b6b6caf4fcdf7c0f0b057
https://github.com/python/cpython/pull/119464/files#diff-ebc983d9f91e5bcf73500e377ac65e85863c4f77fd5b6b6caf4fcdf7c0f0b057
https://github.com/python/cpython/pull/119464/files#diff-ebc983d9f91e5bcf73500e377ac65e85863c4f77fd5b6b6caf4fcdf7c0f0b057
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L232
Python/symtable.chttps://github.com/python/cpython/pull/119464/files#diff-1029343b7709f438c869082355577469b5aa784b454afa461ca2844ce9910ea6
View file https://github.com/JelleZijlstra/cpython/blob/b119fe2d2b1a328c6a45c957f19f430d079ff30f/Python/symtable.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/119464/{{ revealButtonHref }}
https://github.com/python/cpython/pull/119464/files#diff-1029343b7709f438c869082355577469b5aa784b454afa461ca2844ce9910ea6
https://github.com/python/cpython/pull/119464/files#diff-1029343b7709f438c869082355577469b5aa784b454afa461ca2844ce9910ea6
https://github.com/python/cpython/pull/119464/files#diff-1029343b7709f438c869082355577469b5aa784b454afa461ca2844ce9910ea6
https://github.com/python/cpython/pull/119464/files#diff-1029343b7709f438c869082355577469b5aa784b454afa461ca2844ce9910ea6
https://github.com/python/cpython/pull/119464/files#diff-1029343b7709f438c869082355577469b5aa784b454afa461ca2844ce9910ea6
https://github.com/python/cpython/pull/119464/files#diff-1029343b7709f438c869082355577469b5aa784b454afa461ca2844ce9910ea6
https://github.com/python/cpython/pull/119464/files#diff-1029343b7709f438c869082355577469b5aa784b454afa461ca2844ce9910ea6
https://github.com/python/cpython/pull/119464/files#diff-1029343b7709f438c869082355577469b5aa784b454afa461ca2844ce9910ea6
https://github.com/python/cpython/pull/119464/files#diff-1029343b7709f438c869082355577469b5aa784b454afa461ca2844ce9910ea6
https://github.com/python/cpython/pull/119464/files#diff-1029343b7709f438c869082355577469b5aa784b454afa461ca2844ce9910ea6
https://github.com/python/cpython/pull/119464/files#diff-1029343b7709f438c869082355577469b5aa784b454afa461ca2844ce9910ea6
https://github.com/python/cpython/pull/119464/files#diff-1029343b7709f438c869082355577469b5aa784b454afa461ca2844ce9910ea6
https://github.com/python/cpython/pull/119464/files#diff-1029343b7709f438c869082355577469b5aa784b454afa461ca2844ce9910ea6
https://github.com/python/cpython/pull/119464/files#diff-1029343b7709f438c869082355577469b5aa784b454afa461ca2844ce9910ea6
https://github.com/python/cpython/pull/119464/files#diff-1029343b7709f438c869082355577469b5aa784b454afa461ca2844ce9910ea6
https://github.com/python/cpython/pull/119464/files#diff-1029343b7709f438c869082355577469b5aa784b454afa461ca2844ce9910ea6
https://github.com/python/cpython/pull/119464/files#diff-1029343b7709f438c869082355577469b5aa784b454afa461ca2844ce9910ea6
https://github.com/python/cpython/pull/119464/files#diff-1029343b7709f438c869082355577469b5aa784b454afa461ca2844ce9910ea6
https://github.com/python/cpython/pull/119464/files#diff-1029343b7709f438c869082355577469b5aa784b454afa461ca2844ce9910ea6
https://github.com/python/cpython/pull/119464/files#diff-1029343b7709f438c869082355577469b5aa784b454afa461ca2844ce9910ea6
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

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.