René's URL Explorer Experiment


Title: gh-155742: Check singletons consistency at Python exit by vstinner · Pull Request #157572 · python/cpython · GitHub

Open Graph Title: gh-155742: Check singletons consistency at Python exit by vstinner · Pull Request #157572 · python/cpython

X Title: gh-155742: Check singletons consistency at Python exit by vstinner · Pull Request #157572 · python/cpython

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

Open Graph Description: In debug mode at Python exit, check if immutable singleton objects have been modified by mistake to detect bugs in C extensions. Add tests corrupting bytes, str, bool and int singleton objects. ...

X Description: In debug mode at Python exit, check if immutable singleton objects have been modified by mistake to detect bugs in C extensions. Add tests corrupting bytes, str, bool and int singleton objects. ...

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

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:c68514c2-2f3a-ecfe-61dd-35c7ca185ae1
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD86C:FC5BE:31406D6:41703A1:6B01E808
html-safe-nonce3937b2331bd4f9799210454e6ab798a052b9886c1856ed68f86429d9272b1a34
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEODZDOkZDNUJFOjMxNDA2RDY6NDE3MDNBMTo2QjAxRTgwOCIsInZpc2l0b3JfaWQiOiI5MDQxMDg4ODU0ODk5MTU3MDAwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac9750516db723306ba9f08ad3b42ba94f15ea871da2e4523ceb71e14560bb9ac2
hovercard-subject-tagpull_request:4539355035
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/cpython/157572/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/f0c17afaf0caa7e0826d16cfcd7328703e827186d22cfbb772d6c76c52e91a52/python/cpython/pull/157572
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/f0c17afaf0caa7e0826d16cfcd7328703e827186d22cfbb772d6c76c52e91a52/python/cpython/pull/157572
og:image:altIn debug mode at Python exit, check if immutable singleton objects have been modified by mistake to detect bugs in C extensions. Add tests corrupting bytes, str, bool and int singleton objects. ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamevstinner
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
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
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-namepull-requests

Links:

Skip to contenthttps://github.com/python/cpython/pull/157572#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F157572
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%2F157572
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%2Fcpython
Reloadhttps://github.com/python/cpython/pull/157572
Reloadhttps://github.com/python/cpython/pull/157572
Reloadhttps://github.com/python/cpython/pull/157572
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
vstinnerhttps://github.com/vstinner
python:mainhttps://github.com/python/cpython/tree/main
vstinner:global_obj_fini_checkhttps://github.com/vstinner/cpython/tree/global_obj_fini_check
Conversationhttps://github.com/python/cpython/pull/157572
Commits12 (12)https://github.com/python/cpython/pull/157572/commits
Checkshttps://github.com/python/cpython/pull/157572/checks
Files changedhttps://github.com/python/cpython/pull/157572/files
gh-155742: Check singletons consistency at Python exithttps://github.com/python/cpython/pull/157572#top
vstinnerhttps://github.com/vstinner
python:mainhttps://github.com/python/cpython/tree/main
vstinner:global_obj_fini_checkhttps://github.com/vstinner/cpython/tree/global_obj_fini_check
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
Sep 15, 2026https://github.com/python/cpython/pull/157572#issue-5464758003
Please reload this pagehttps://github.com/python/cpython/pull/157572
Treat bytes objects as immutable in C code #155742https://github.com/python/cpython/issues/155742
Please reload this pagehttps://github.com/python/cpython/pull/157572
https://github.com/vstinner
pythongh-155742https://github.com/python/cpython/issues/155742
: Check singletons consistencty at Python exithttps://github.com/python/cpython/pull/157572/commits/cd83f8d285bfa380527d34302a27a00d8039d016
cd83f8dhttps://github.com/python/cpython/pull/157572/commits/cd83f8d285bfa380527d34302a27a00d8039d016
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
FFY00https://github.com/FFY00
ZeroIntensityhttps://github.com/ZeroIntensity
ericsnowcurrentlyhttps://github.com/ericsnowcurrently
markshannonhttps://github.com/markshannon
code ownershttps://github.com/python/cpython/blob/5601e1ec3b5b4b94f189f8a457eea445cda6be45/.github/CODEOWNERS#L313
September 15, 2026 16:38https://github.com/python/cpython/pull/157572#event-31188522588
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
Sep 15, 2026 https://github.com/python/cpython/pull/157572#ref-issue-5144142594
Treat bytes objects as immutable in C code #155742 https://github.com/python/cpython/issues/155742
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
awaiting core review https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20core%20review%22
Sep 15, 2026https://github.com/python/cpython/pull/157572#event-31188530101
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
Sep 15, 2026 https://github.com/python/cpython/pull/157572#ref-pullrequest-5152664184
gh-155742: Check singletons consistencty in the garbage collector #155801 https://github.com/python/cpython/pull/155801
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
Sep 15, 2026https://github.com/python/cpython/pull/157572#event-31188782587
https://github.com/vstinner
Fix compiler warningshttps://github.com/python/cpython/pull/157572/commits/121f23ac7e93ad07e604b17386882fbbef9162bc
121f23ahttps://github.com/python/cpython/pull/157572/commits/121f23ac7e93ad07e604b17386882fbbef9162bc
sqlite3.Blob slice assignment with a step corrupts an immortal bytes singleton #155702 https://github.com/python/cpython/issues/155702
bytearray.take_bytes() can corrupt shared single-byte bytes objects #156995 https://github.com/python/cpython/issues/156995
https://github.com/encukou
encukouhttps://github.com/encukou
Sep 16, 2026 https://github.com/python/cpython/pull/157572#pullrequestreview-5219874313
View reviewed changes https://github.com/python/cpython/pull/157572/files/121f23ac7e93ad07e604b17386882fbbef9162bc
Include/internal/pycore_global_objects_fini_generated.hhttps://github.com/python/cpython/pull/157572/files/121f23ac7e93ad07e604b17386882fbbef9162bc#diff-31f682b2a04cda997f449a9816ee5fae305e3bfa7357afcb794615921c6a88d2
Please reload this pagehttps://github.com/python/cpython/pull/157572
https://github.com/vstinner
Use loops in generated finalizer codehttps://github.com/python/cpython/pull/157572/commits/03d611aa2e0519394803ae39cf2e54798b7957eb
03d611ahttps://github.com/python/cpython/pull/157572/commits/03d611aa2e0519394803ae39cf2e54798b7957eb
https://github.com/encukou
encukouhttps://github.com/encukou
Sep 16, 2026 https://github.com/python/cpython/pull/157572#pullrequestreview-5223534759
View reviewed changes https://github.com/python/cpython/pull/157572/files/03d611aa2e0519394803ae39cf2e54798b7957eb
Include/internal/pycore_global_objects_fini_generated.hhttps://github.com/python/cpython/pull/157572/files/03d611aa2e0519394803ae39cf2e54798b7957eb#diff-31f682b2a04cda997f449a9816ee5fae305e3bfa7357afcb794615921c6a88d2
encukouhttps://github.com/encukou
Sep 16, 2026https://github.com/python/cpython/pull/157572#discussion_r4026743697
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/157572
Include/internal/pycore_global_objects_fini_generated.hhttps://github.com/python/cpython/pull/157572/files/03d611aa2e0519394803ae39cf2e54798b7957eb#diff-31f682b2a04cda997f449a9816ee5fae305e3bfa7357afcb794615921c6a88d2
Please reload this pagehttps://github.com/python/cpython/pull/157572
Include/internal/pycore_global_objects_fini_generated.hhttps://github.com/python/cpython/pull/157572/files/03d611aa2e0519394803ae39cf2e54798b7957eb#diff-31f682b2a04cda997f449a9816ee5fae305e3bfa7357afcb794615921c6a88d2
Please reload this pagehttps://github.com/python/cpython/pull/157572
Include/internal/pycore_global_objects_fini_generated.hhttps://github.com/python/cpython/pull/157572/files/03d611aa2e0519394803ae39cf2e54798b7957eb#diff-31f682b2a04cda997f449a9816ee5fae305e3bfa7357afcb794615921c6a88d2
Please reload this pagehttps://github.com/python/cpython/pull/157572
https://github.com/vstinner
Address Petr's reviewhttps://github.com/python/cpython/pull/157572/commits/03f6eedd9d575d2e9b25a1dc604145b4451d4e92
03f6eedhttps://github.com/python/cpython/pull/157572/commits/03f6eedd9d575d2e9b25a1dc604145b4451d4e92
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
Sep 16, 2026https://github.com/python/cpython/pull/157572#issuecomment-5699133596
@encukouhttps://github.com/encukou
Please reload this pagehttps://github.com/python/cpython/pull/157572
https://github.com/vstinner
Always call _PyBytes_CheckOverflow()https://github.com/python/cpython/pull/157572/commits/d195ee0f4c7c19b33617bf9e9e0d3f8440af2a76
d195ee0https://github.com/python/cpython/pull/157572/commits/d195ee0f4c7c19b33617bf9e9e0d3f8440af2a76
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
Sep 16, 2026https://github.com/python/cpython/pull/157572#issuecomment-5700075803
Please reload this pagehttps://github.com/python/cpython/pull/157572
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
Sep 16, 2026 https://github.com/python/cpython/pull/157572#pullrequestreview-5224871240
View reviewed changes https://github.com/python/cpython/pull/157572/files/d195ee0f4c7c19b33617bf9e9e0d3f8440af2a76
Lib/test/test_capi/test_misc.pyhttps://github.com/python/cpython/pull/157572/files/d195ee0f4c7c19b33617bf9e9e0d3f8440af2a76#diff-4178d53cac5b09685584df43c65b66797dd4ca4df491b2081565d95ba90aaa36
Please reload this pagehttps://github.com/python/cpython/pull/157572
https://github.com/vstinner
Apply suggestion fromhttps://github.com/python/cpython/pull/157572/commits/17902a6f0a27310114f6e8b8208698cc3fb6212b
@vstinnerhttps://github.com/vstinner
17902a6https://github.com/python/cpython/pull/157572/commits/17902a6f0a27310114f6e8b8208698cc3fb6212b
https://github.com/encukou
encukouhttps://github.com/encukou
Sep 17, 2026https://github.com/python/cpython/pull/157572#issuecomment-5711574040
vstinner#17https://github.com/vstinner/cpython/pull/17
Please reload this pagehttps://github.com/python/cpython/pull/157572
encukouhttps://github.com/encukou
September 17, 2026 13:27https://github.com/python/cpython/pull/157572#commits-pushed-fd6eccb
https://github.com/encukou
Share more code in _PyStaticObject_CheckUnicode (https://github.com/python/cpython/pull/157572/commits/fd6eccb1c01716d30dbaf32cd62e7f1835716382
#17https://github.com/vstinner/cpython/pull/17
)https://github.com/python/cpython/pull/157572/commits/fd6eccb1c01716d30dbaf32cd62e7f1835716382
fd6eccbhttps://github.com/python/cpython/pull/157572/commits/fd6eccb1c01716d30dbaf32cd62e7f1835716382
https://github.com/vstinner
Add pycore_global_objects_fini.h internal headerhttps://github.com/python/cpython/pull/157572/commits/05cea1f7fc7a5e1b6c7cafb6dc2b966b783de94a
05cea1fhttps://github.com/python/cpython/pull/157572/commits/05cea1f7fc7a5e1b6c7cafb6dc2b966b783de94a
https://github.com/vstinner
Update make regen-global-objectshttps://github.com/python/cpython/pull/157572/commits/bfa5de52bb4a74cc29f48f250417be2013e2e205
bfa5de5https://github.com/python/cpython/pull/157572/commits/bfa5de52bb4a74cc29f48f250417be2013e2e205
https://github.com/vstinner
Update test_capihttps://github.com/python/cpython/pull/157572/commits/809e9119ce9df2631fbf74958818a26dc8c545c4
809e911https://github.com/python/cpython/pull/157572/commits/809e9119ce9df2631fbf74958818a26dc8c545c4
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
AA-Turnerhttps://github.com/AA-Turner
emmatypinghttps://github.com/emmatyping
erlend-aaslandhttps://github.com/erlend-aasland
code ownershttps://github.com/python/cpython/blob/1e03154546c5c1af5c0c746a2bdedc758acdec93/.github/CODEOWNERS#L186
September 17, 2026 12:31https://github.com/python/cpython/pull/157572#event-31319071107
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
itamarohttps://github.com/itamaro
code ownerhttps://github.com/python/cpython/blob/1e03154546c5c1af5c0c746a2bdedc758acdec93/.github/CODEOWNERS#L85
September 17, 2026 12:31https://github.com/python/cpython/pull/157572#event-31319071585
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
Sep 17, 2026https://github.com/python/cpython/pull/157572#issuecomment-5714525803
@encukouhttps://github.com/encukou
Please reload this pagehttps://github.com/python/cpython/pull/157572
vstinnerhttps://github.com/vstinner
September 17, 2026 14:43https://github.com/python/cpython/pull/157572#commits-pushed-2cf826f
https://github.com/vstinner
Merge branch 'main' into global_obj_fini_checkhttps://github.com/python/cpython/pull/157572/commits/2cf826f721c776673c5e3178d281f882f57af42e
2cf826fhttps://github.com/python/cpython/pull/157572/commits/2cf826f721c776673c5e3178d281f882f57af42e
https://github.com/vstinner
Move _PyHamt_BitmapNode_Type includehttps://github.com/python/cpython/pull/157572/commits/a1556153e5c18ea780cfca6ae4ad6c6575466c3e
a155615https://github.com/python/cpython/pull/157572/commits/a1556153e5c18ea780cfca6ae4ad6c6575466c3e
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
8bcbcf8https://github.com/python/cpython/commit/8bcbcf8cfc73844154f87c29b37ebb51cd8cb9b7
Sep 17, 2026https://github.com/python/cpython/pull/157572#event-31325222775
Please reload this pagehttps://github.com/python/cpython/pull/157572
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
September 17, 2026 14:03https://github.com/python/cpython/pull/157572#event-31325225813
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
awaiting core review https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20core%20review%22
Sep 17, 2026https://github.com/python/cpython/pull/157572#event-31325227416
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
Sep 17, 2026https://github.com/python/cpython/pull/157572#issuecomment-5715680404
@encukouhttps://github.com/encukou
Please reload this pagehttps://github.com/python/cpython/pull/157572
https://github.co/hiddenchars
https://github.com/python/cpython/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%2Fcpython%2Fpull%2F157572
https://github.com/encukou
encukou https://github.com/encukou
https://github.com/python/cpython/pull/157572/files/03f6eedd9d575d2e9b25a1dc604145b4451d4e92
https://github.com/markshannon
markshannon https://github.com/markshannon
https://github.com/ericsnowcurrently
ericsnowcurrently https://github.com/ericsnowcurrently
https://github.com/ZeroIntensity
ZeroIntensity https://github.com/ZeroIntensity
https://github.com/FFY00
FFY00 https://github.com/FFY00
https://github.com/erlend-aasland
erlend-aasland https://github.com/erlend-aasland
https://github.com/AA-Turner
AA-Turner https://github.com/AA-Turner
https://github.com/emmatyping
emmatyping https://github.com/emmatyping
https://github.com/itamaro
itamaro https://github.com/itamaro
Please reload this pagehttps://github.com/python/cpython/pull/157572
Please reload this pagehttps://github.com/python/cpython/pull/157572
https://github.com/vstinner
https://github.com/encukou
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.