René's URL Explorer Experiment


Title: gh-145142: Make str.maketrans safe under free-threading by VanshAgarwal24036 · Pull Request #145157 · python/cpython · GitHub

Open Graph Title: gh-145142: Make str.maketrans safe under free-threading by VanshAgarwal24036 · Pull Request #145157 · python/cpython

X Title: gh-145142: Make str.maketrans safe under free-threading by VanshAgarwal24036 · Pull Request #145157 · python/cpython

Description: Replace unsafe PyDict_Next iteration with snapshot iteration using PyDict_Items to avoid crashes when the input dict is mutated concurrently under free-threading. Adds a regression test. Issue: gh-145142

Open Graph Description: Replace unsafe PyDict_Next iteration with snapshot iteration using PyDict_Items to avoid crashes when the input dict is mutated concurrently under free-threading. Adds a regression test. Issue: g...

X Description: Replace unsafe PyDict_Next iteration with snapshot iteration using PyDict_Items to avoid crashes when the input dict is mutated concurrently under free-threading. Adds a regression test. Issue: g...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:5876f214-3c63-ec27-a027-d371dc8b6988
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA178:13DDC4:A2A974D:E479AE1:6A50DC90
html-safe-nonce24122d19b1c7093ac7b80e4bfc421d108bc5d690c7f44cda38c13c119992eed0
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMTc4OjEzRERDNDpBMkE5NzREOkU0NzlBRTE6NkE1MERDOTAiLCJ2aXNpdG9yX2lkIjoiNjIwMDAzMjkxMTMwOTIwMDUyOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac30b7325f6279ce27bb8d0b33d5c3c5afb1025a61ddae9a212e1518b08eae2256
hovercard-subject-tagpull_request:3317304561
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/145157/files
twitter:imagehttps://avatars.githubusercontent.com/u/148854295?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/148854295?s=400&v=4
og:image:altReplace unsafe PyDict_Next iteration with snapshot iteration using PyDict_Items to avoid crashes when the input dict is mutated concurrently under free-threading. Adds a regression test. Issue: g...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None72b13e0e8d0319acdd27a145cfe73f4f06c791713d0ac4690e41fb68ad28cac0
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
release17290b65caabb92b271e0949d1bf147b63deab41
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/145157/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F145157%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%2F145157%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/145157/files
Reloadhttps://github.com/python/cpython/pull/145157/files
Reloadhttps://github.com/python/cpython/pull/145157/files
Please reload this pagehttps://github.com/python/cpython/pull/145157/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/145157/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
VanshAgarwal24036:gh-145142-dict-next-critical-sectionhttps://github.com/VanshAgarwal24036/cpython/tree/gh-145142-dict-next-critical-section
Conversation 18 https://github.com/python/cpython/pull/145157
Commits 13 https://github.com/python/cpython/pull/145157/commits
Checks 47 https://github.com/python/cpython/pull/145157/checks
Files changed https://github.com/python/cpython/pull/145157/files
Please reload this pagehttps://github.com/python/cpython/pull/145157/files
gh-145142: Make str.maketrans safe under free-threading https://github.com/python/cpython/pull/145157/files#top
Show all changes 13 commits https://github.com/python/cpython/pull/145157/files
0745e41 gh-145142: Make str.maketrans safe under free-threading VanshAgarwal24036 Feb 23, 2026 https://github.com/python/cpython/pull/145157/commits/0745e4103aa899304e02b06d7b16a422a0b97e68
3fdf54c Add new line at end of test file VanshAgarwal24036 Feb 23, 2026 https://github.com/python/cpython/pull/145157/commits/3fdf54c694c0ffba7a466b8371e96ddc0b5cae97
9a75245 Update changes VanshAgarwal24036 Feb 24, 2026 https://github.com/python/cpython/pull/145157/commits/9a752459e913b688826a55eae40d021fa3d8a194
5071b9d Add new line at end of news file VanshAgarwal24036 Feb 24, 2026 https://github.com/python/cpython/pull/145157/commits/5071b9d4106a3f6ea96d4e740ef37f5dbb04ced0
b34fd09 Remove unnecessary paranthesis in news file VanshAgarwal24036 Feb 24, 2026 https://github.com/python/cpython/pull/145157/commits/b34fd099f8f91fc6447f20e0a16f03e6988ec005
044c347 Correct build error VanshAgarwal24036 Feb 24, 2026 https://github.com/python/cpython/pull/145157/commits/044c347f8a80162a2d0c03b85bd69399eb7357a1
b7e9d1b Update VanshAgarwal24036 Feb 24, 2026 https://github.com/python/cpython/pull/145157/commits/b7e9d1b555d703b7b826b7ac50d2f9d9f9e75d5d
bfc812a Add new function VanshAgarwal24036 Feb 24, 2026 https://github.com/python/cpython/pull/145157/commits/bfc812a07564c731572248cc666154ecebadaf07
f7c3c45 Update helper fuction VanshAgarwal24036 Feb 24, 2026 https://github.com/python/cpython/pull/145157/commits/f7c3c45d8db11af1e7ef1289961ad94be1c62996
4e715b0 Update function VanshAgarwal24036 Feb 24, 2026 https://github.com/python/cpython/pull/145157/commits/4e715b009b73f76063db88741b415a0a355d7a37
b60b67c Perform suggested changes VanshAgarwal24036 Feb 24, 2026 https://github.com/python/cpython/pull/145157/commits/b60b67cc4406e5887b39e10e1e0346c9369e8a88
28af6d8 Fix placement of clinic code colesbury Feb 27, 2026 https://github.com/python/cpython/pull/145157/commits/28af6d808fdf9cd927d1f975263f7b5605cfb85f
4994663 Merge branch 'main' into gh-145142-dict-next-critical-section colesbury Feb 27, 2026 https://github.com/python/cpython/pull/145157/commits/4994663f677df653eeb9ea3fbf9c8602ebf977b7
Clear filters https://github.com/python/cpython/pull/145157/files
Please reload this pagehttps://github.com/python/cpython/pull/145157/files
Please reload this pagehttps://github.com/python/cpython/pull/145157/files
test_str.py https://github.com/python/cpython/pull/145157/files#diff-02c8fc77d7c6778cb0af842d23415c34dcd4bfe45e41a909c779b69a4bc4a89f
2026-02-23-23-18-28.gh-issue-145142.T-XbVe.rst https://github.com/python/cpython/pull/145157/files#diff-529e0d4a6c0d2f4b4a9b217032e9ffef517477112e7b63b4938e87d58deda19c
unicodeobject.c https://github.com/python/cpython/pull/145157/files#diff-34c966e7876d6f8bf801dd51896327e4f68bba02cddb95fbf3963f0b2e39c38a
Lib/test/test_free_threading/test_str.pyhttps://github.com/python/cpython/pull/145157/files#diff-02c8fc77d7c6778cb0af842d23415c34dcd4bfe45e41a909c779b69a4bc4a89f
View file https://github.com/VanshAgarwal24036/cpython/blob/4994663f677df653eeb9ea3fbf9c8602ebf977b7/Lib/test/test_free_threading/test_str.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/145157/{{ revealButtonHref }}
https://github.com/python/cpython/pull/145157/files#diff-02c8fc77d7c6778cb0af842d23415c34dcd4bfe45e41a909c779b69a4bc4a89f
Misc/NEWS.d/next/Core_and_Builtins/2026-02-23-23-18-28.gh-issue-145142.T-XbVe.rsthttps://github.com/python/cpython/pull/145157/files#diff-529e0d4a6c0d2f4b4a9b217032e9ffef517477112e7b63b4938e87d58deda19c
View file https://github.com/VanshAgarwal24036/cpython/blob/4994663f677df653eeb9ea3fbf9c8602ebf977b7/Misc/NEWS.d/next/Core_and_Builtins/2026-02-23-23-18-28.gh-issue-145142.T-XbVe.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/145157/{{ revealButtonHref }}
Objects/unicodeobject.chttps://github.com/python/cpython/pull/145157/files#diff-34c966e7876d6f8bf801dd51896327e4f68bba02cddb95fbf3963f0b2e39c38a
View file https://github.com/VanshAgarwal24036/cpython/blob/4994663f677df653eeb9ea3fbf9c8602ebf977b7/Objects/unicodeobject.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/145157/{{ revealButtonHref }}
https://github.com/python/cpython/pull/145157/files#diff-34c966e7876d6f8bf801dd51896327e4f68bba02cddb95fbf3963f0b2e39c38a
eendebakpthttps://github.com/eendebakpt
Feb 27, 2026https://github.com/python/cpython/pull/145157/files#r2864968457
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/145157/files
https://github.com/python/cpython/pull/145157/files#diff-34c966e7876d6f8bf801dd51896327e4f68bba02cddb95fbf3963f0b2e39c38a
https://github.com/python/cpython/pull/145157/files#diff-34c966e7876d6f8bf801dd51896327e4f68bba02cddb95fbf3963f0b2e39c38a
https://github.com/python/cpython/pull/145157/files#diff-34c966e7876d6f8bf801dd51896327e4f68bba02cddb95fbf3963f0b2e39c38a
Please reload this pagehttps://github.com/python/cpython/pull/145157/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.