René's URL Explorer Experiment


Title: gh-121954: Don't mutate tuples in _PyCode_New by encukou · Pull Request #122180 · python/cpython · GitHub

Open Graph Title: gh-121954: Don't mutate tuples in _PyCode_New by encukou · Pull Request #122180 · python/cpython

X Title: gh-121954: Don't mutate tuples in _PyCode_New by encukou · Pull Request #122180 · python/cpython

Description: The Python programming language. Contribute to python/cpython development by creating an account on GitHub.

Open Graph Description: Change _PyCode_New (intern_strings & intern_constants) to return new tuples rather than mutating their arguments. If possible, return the argument rather than create a copy. In order to make co...

X Description: Change _PyCode_New (intern_strings & intern_constants) to return new tuples rather than mutating their arguments. If possible, return the argument rather than create a copy. In order to mak...

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

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/:user_id/:repository/pull/:id/commits(.:format)
route-controllerpull_requests
route-actioncommits
fetch-noncev2:557eef0a-3726-981e-4557-7f3fe0f49a6c
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idBD76:1DCF5:395C6:4C2D5:6B021F84
html-safe-nonced11874028255d2bad01b4449f94b50c328af33aa74df9852b7f6e5692d69f7d2
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRDc2OjFEQ0Y1OjM5NUM2OjRDMkQ1OjZCMDIxRjg0IiwidmlzaXRvcl9pZCI6IjgwNzMxMzg2ODUzNTQzMTk3NDgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacc8c42e4574b37a4dc82e377a6227d9b0d9ddf3bcbeb0f4288f4e00adc1c164c4
hovercard-subject-tagpull_request:1983508517
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/commits
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/122180/commits
twitter:imagehttps://opengraph.githubassets.com/c5a7ec4ca06220000a4c84330f31d874bdc4a948a9b1324b4367b30d4110394d/python/cpython/pull/122180
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/c5a7ec4ca06220000a4c84330f31d874bdc4a948a9b1324b4367b30d4110394d/python/cpython/pull/122180
og:image:altChange _PyCode_New (intern_strings & intern_constants) to return new tuples rather than mutating their arguments. If possible, return the argument rather than create a copy. In order to make co...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameencukou
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-cache
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
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-namepull-requests

Links:

Skip to contenthttps://github.com/python/cpython/pull/122180/commits#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F122180%2Fcommits
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%2F122180%2Fcommits
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%2Fcommits&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/122180/commits
Reloadhttps://github.com/python/cpython/pull/122180/commits
Reloadhttps://github.com/python/cpython/pull/122180/commits
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
https://github.com/python/cpython
encukouhttps://github.com/encukou
python:mainhttps://github.com/python/cpython/tree/main
encukou:gh-121863https://github.com/encukou/cpython/tree/gh-121863
Conversationhttps://github.com/python/cpython/pull/122180
Commits20 (20)https://github.com/python/cpython/pull/122180/commits
Checkshttps://github.com/python/cpython/pull/122180/checks
Files changedhttps://github.com/python/cpython/pull/122180/files
gh-121954: Don't mutate tuples in _PyCode_Newhttps://github.com/python/cpython/pull/122180/commits#top
encukouhttps://github.com/encukou
python:mainhttps://github.com/python/cpython/tree/main
encukou:gh-121863https://github.com/encukou/cpython/tree/gh-121863
Immortalize implicit arguments; use static sting for ".0"https://github.com/python/cpython/pull/122180/commits/3c7050e9a72ff1848e3d1c5bbc8fe751cc91c206
https://github.com/encukou
encukouhttps://github.com/python/cpython/commits?author=encukou
3c7050ehttps://github.com/python/cpython/pull/122180/commits/3c7050e9a72ff1848e3d1c5bbc8fe751cc91c206
https://github.com/python/cpython/tree/3c7050e9a72ff1848e3d1c5bbc8fe751cc91c206
Intern mangled identifiers after creationhttps://github.com/python/cpython/pull/122180/commits/2ebe868e6c0dcd84769be4842ac3568c54a705e3
https://github.com/encukou
encukouhttps://github.com/python/cpython/commits?author=encukou
2ebe868https://github.com/python/cpython/pull/122180/commits/2ebe868e6c0dcd84769be4842ac3568c54a705e3
https://github.com/python/cpython/tree/2ebe868e6c0dcd84769be4842ac3568c54a705e3
Create new tuples with _PyCode_Newhttps://github.com/python/cpython/pull/122180/commits/7ba01d59a7f64450d950a210e62278d69497595d
https://github.com/encukou
encukouhttps://github.com/python/cpython/commits?author=encukou
7ba01d5https://github.com/python/cpython/pull/122180/commits/7ba01d59a7f64450d950a210e62278d69497595d
https://github.com/python/cpython/tree/7ba01d59a7f64450d950a210e62278d69497595d
Intern strings in _PyCode_ConstantKeyhttps://github.com/python/cpython/pull/122180/commits/ff7f4e6695153c81b9955761832244ed18229c43
https://github.com/encukou
encukouhttps://github.com/python/cpython/commits?author=encukou
ff7f4e6https://github.com/python/cpython/pull/122180/commits/ff7f4e6695153c81b9955761832244ed18229c43
https://github.com/python/cpython/tree/ff7f4e6695153c81b9955761832244ed18229c43
Merge validate_and_copy_tuple into intern_nameshttps://github.com/python/cpython/pull/122180/commits/c2db0f0aa83bd3016381f335ce362106538ce070
https://github.com/encukou
encukouhttps://github.com/python/cpython/commits?author=encukou
c2db0f0https://github.com/python/cpython/pull/122180/commits/c2db0f0aa83bd3016381f335ce362106538ce070
https://github.com/python/cpython/tree/c2db0f0aa83bd3016381f335ce362106538ce070
Remove test that asserted a constant is *not* internedhttps://github.com/python/cpython/pull/122180/commits/259d2caab39c1c4e19c1cf1ea8263af298a8cccc
https://github.com/encukou
encukouhttps://github.com/python/cpython/commits?author=encukou
259d2cahttps://github.com/python/cpython/pull/122180/commits/259d2caab39c1c4e19c1cf1ea8263af298a8cccc
https://github.com/python/cpython/tree/259d2caab39c1c4e19c1cf1ea8263af298a8cccc
Fix ref handling in error casehttps://github.com/python/cpython/pull/122180/commits/891304ddab50e6b44509fc2a2bea1889cad96bae
https://github.com/encukou
encukouhttps://github.com/python/cpython/commits?author=encukou
891304dhttps://github.com/python/cpython/pull/122180/commits/891304ddab50e6b44509fc2a2bea1889cad96bae
https://github.com/python/cpython/tree/891304ddab50e6b44509fc2a2bea1889cad96bae
Skip interning in _Py_Mangle (_PyCode_ConstantKey is enough)https://github.com/python/cpython/pull/122180/commits/1e655b2dbed03989ea931807cf2960b13354abbd
https://github.com/encukou
encukouhttps://github.com/python/cpython/commits?author=encukou
1e655b2https://github.com/python/cpython/pull/122180/commits/1e655b2dbed03989ea931807cf2960b13354abbd
https://github.com/python/cpython/tree/1e655b2dbed03989ea931807cf2960b13354abbd
Add blurbhttps://github.com/python/cpython/pull/122180/commits/a75078fc845313c331a278f5e72ba58971614db1
https://github.com/encukou
encukouhttps://github.com/python/cpython/commits?author=encukou
a75078fhttps://github.com/python/cpython/pull/122180/commits/a75078fc845313c331a278f5e72ba58971614db1
https://github.com/python/cpython/tree/a75078fc845313c331a278f5e72ba58971614db1
Immortalize localsplusnameshttps://github.com/python/cpython/pull/122180/commits/2557b5b3550b74e161b0a37eb543b78bcd6dbc46
https://github.com/encukou
encukouhttps://github.com/python/cpython/commits?author=encukou
2557b5bhttps://github.com/python/cpython/pull/122180/commits/2557b5b3550b74e161b0a37eb543b78bcd6dbc46
https://github.com/python/cpython/tree/2557b5b3550b74e161b0a37eb543b78bcd6dbc46
Free-threading: Re-add lock for intern_constantshttps://github.com/python/cpython/pull/122180/commits/9bca4c69d133ada11fa6c963fa3f5a8dc5d1e04e
https://github.com/encukou
encukouhttps://github.com/python/cpython/commits?author=encukou
9bca4c6https://github.com/python/cpython/pull/122180/commits/9bca4c69d133ada11fa6c963fa3f5a8dc5d1e04e
https://github.com/python/cpython/tree/9bca4c69d133ada11fa6c963fa3f5a8dc5d1e04e
Merge in the main branchhttps://github.com/python/cpython/pull/122180/commits/3939ac582779d614dbee980fcde17c9051c309da
https://github.com/encukou
encukouhttps://github.com/python/cpython/commits?author=encukou
3939ac5https://github.com/python/cpython/pull/122180/commits/3939ac582779d614dbee980fcde17c9051c309da
https://github.com/python/cpython/tree/3939ac582779d614dbee980fcde17c9051c309da
Intern tuples in free-threaded buildhttps://github.com/python/cpython/pull/122180/commits/25dbda6f388037c833f99dfaa98c02b011000732
https://github.com/encukou
encukouhttps://github.com/python/cpython/commits?author=encukou
25dbda6https://github.com/python/cpython/pull/122180/commits/25dbda6f388037c833f99dfaa98c02b011000732
https://github.com/python/cpython/tree/25dbda6f388037c833f99dfaa98c02b011000732
Intern the outer tuples like any other objecthttps://github.com/python/cpython/pull/122180/commits/b33c1eb3c687b450eb119776a7892a48d27e292a
https://github.com/encukou
encukouhttps://github.com/python/cpython/commits?author=encukou
b33c1ebhttps://github.com/python/cpython/pull/122180/commits/b33c1eb3c687b450eb119776a7892a48d27e292a
https://github.com/python/cpython/tree/b33c1eb3c687b450eb119776a7892a48d27e292a
Regenerate test_frozenmain.hhttps://github.com/python/cpython/pull/122180/commits/cd6086f85fc0df9fadf8a0d99ac9a753280ef1f8
https://github.com/encukou
encukouhttps://github.com/python/cpython/commits?author=encukou
cd6086fhttps://github.com/python/cpython/pull/122180/commits/cd6086f85fc0df9fadf8a0d99ac9a753280ef1f8
https://github.com/python/cpython/tree/cd6086f85fc0df9fadf8a0d99ac9a753280ef1f8
Adjust comment for _PyCode_Finihttps://github.com/python/cpython/pull/122180/commits/ecd7ae75a5f545033725eb118fa14361a31baa9c
https://github.com/encukou
encukouhttps://github.com/python/cpython/commits?author=encukou
ecd7ae7https://github.com/python/cpython/pull/122180/commits/ecd7ae75a5f545033725eb118fa14361a31baa9c
https://github.com/python/cpython/tree/ecd7ae75a5f545033725eb118fa14361a31baa9c
Merge in the main branchhttps://github.com/python/cpython/pull/122180/commits/34f5119ffc257eaa2a75ecc76e9ad4b2700553b2
https://github.com/encukou
encukouhttps://github.com/python/cpython/commits?author=encukou
34f5119https://github.com/python/cpython/pull/122180/commits/34f5119ffc257eaa2a75ecc76e9ad4b2700553b2
https://github.com/python/cpython/tree/34f5119ffc257eaa2a75ecc76e9ad4b2700553b2
Add tests for converting to strict unicodehttps://github.com/python/cpython/pull/122180/commits/aa1a5ca0dfa5c7f6ec393286e2f95c5213de2530
https://github.com/encukou
encukouhttps://github.com/python/cpython/commits?author=encukou
aa1a5cahttps://github.com/python/cpython/pull/122180/commits/aa1a5ca0dfa5c7f6ec393286e2f95c5213de2530
https://github.com/python/cpython/tree/aa1a5ca0dfa5c7f6ec393286e2f95c5213de2530
Unlock mutex in error pathhttps://github.com/python/cpython/pull/122180/commits/e705379ae5413a46c74c305a28807173b6188a0e
https://github.com/encukou
encukouhttps://github.com/python/cpython/commits?author=encukou
e705379https://github.com/python/cpython/pull/122180/commits/e705379ae5413a46c74c305a28807173b6188a0e
https://github.com/python/cpython/tree/e705379ae5413a46c74c305a28807173b6188a0e
Add braces to if bodieshttps://github.com/python/cpython/pull/122180/commits/ed6115fad5f5cf9149ade8edd86d67862492949b
https://github.com/encukou
encukouhttps://github.com/python/cpython/commits?author=encukou
ed6115fhttps://github.com/python/cpython/pull/122180/commits/ed6115fad5f5cf9149ade8edd86d67862492949b
https://github.com/python/cpython/tree/ed6115fad5f5cf9149ade8edd86d67862492949b
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.