René's URL Explorer Experiment


Title: gh-145921: Add "_DuringGC" functions for tp_traverse by encukou · Pull Request #145925 · python/cpython · GitHub

Open Graph Title: gh-145921: Add "_DuringGC" functions for tp_traverse by encukou · Pull Request #145925 · python/cpython

X Title: gh-145921: Add "_DuringGC" functions for tp_traverse by encukou · Pull Request #145925 · python/cpython

Description: There are newly documented restrictions on tp_traverse: The traversal function must not have any side effects. It must not modify the reference counts of any Python objects nor create or destroy any Python objects. Add several functions that are guaranteed side-effect-free, with a _DuringGC suffix. Use these in ctypes Consolidate tp_traverse docs in gcsupport.rst, moving unique content from typeobj.rst there Issue: gh-145921 📚 Documentation preview 📚: https://cpython-previews--145925.org.readthedocs.build/

Open Graph Description: There are newly documented restrictions on tp_traverse: The traversal function must not have any side effects. It must not modify the reference counts of any Python objects nor create or destroy a...

X Description: There are newly documented restrictions on tp_traverse: The traversal function must not have any side effects. It must not modify the reference counts of any Python objects nor create or destroy a...

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

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.113.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:156d2298-d22b-9a5d-26e1-28532144dab9
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD8D0:2DD6A3:644E9:872CC:6B066334
html-safe-nonce764d6e4486d12ae50d1d803a81127c7e5368043c911876db23662ead81eb3b3f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOEQwOjJERDZBMzo2NDRFOTo4NzJDQzo2QjA2NjMzNCIsInZpc2l0b3JfaWQiOiIzOTg5NDY5MTA0NDE0NTQ4Nzg4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacd2b64493d7be81032c2c3cf1c01f9aff8c648c3702ca9fe68cd27196f476695a
hovercard-subject-tagpull_request:3395807596
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/145925/files
twitter:imagehttps://avatars.githubusercontent.com/u/302922?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/302922?s=400&v=4
og:image:altThere are newly documented restrictions on tp_traverse: The traversal function must not have any side effects. It must not modify the reference counts of any Python objects nor create or destroy a...
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/145925/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F145925%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%2F145925%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/145925/files
Reloadhttps://github.com/python/cpython/pull/145925/files
Reloadhttps://github.com/python/cpython/pull/145925/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
encukouhttps://github.com/encukou
python:mainhttps://github.com/python/cpython/tree/main
encukou:during-gchttps://github.com/encukou/cpython/tree/during-gc
Conversation 39 https://github.com/python/cpython/pull/145925
Commits 15 https://github.com/python/cpython/pull/145925/commits
Checks 52 https://github.com/python/cpython/pull/145925/checks
Files changed https://github.com/python/cpython/pull/145925/files
Please reload this pagehttps://github.com/python/cpython/pull/145925/files
gh-145921: Add "_DuringGC" functions for tp_traverse https://github.com/python/cpython/pull/145925/files#top
Show all changes 15 commits https://github.com/python/cpython/pull/145925/files
797312f gh-145921: Add "_DuringGC" functions for tp_traverse lysnikolaou Mar 13, 2026 https://github.com/python/cpython/pull/145925/commits/797312f786dcfd2798cb3addfce05e3ea24b55e7
01cd8f7 Exclude PyObject_GetItemData_DuringGC from limited ABI encukou Mar 13, 2026 https://github.com/python/cpython/pull/145925/commits/01cd8f7a4b560aac37398d17ba7247aa8ecbcd98
a94159a Fix typo in link encukou Mar 17, 2026 https://github.com/python/cpython/pull/145925/commits/a94159a8ff4630a3467ec6216f7ba4f3b0fd0666
f5a0b07 Move common info to a common section. encukou Mar 17, 2026 https://github.com/python/cpython/pull/145925/commits/f5a0b072e1442de918d751cd543e779f6452f107
6730065 return m encukou Mar 17, 2026 https://github.com/python/cpython/pull/145925/commits/6730065460c7294234e52134b05e95052ba51e3d
1eb82d7 Merge in the main branch encukou Mar 19, 2026 https://github.com/python/cpython/pull/145925/commits/1eb82d7b5842d9b3f3439f1722d379a6457bd6cc
30a602f Apply suggestions from code review encukou Mar 19, 2026 https://github.com/python/cpython/pull/145925/commits/30a602fed19bf733e0f5700aa808f674c3e429c0
2f74db1 Merge in the GitHub branch encukou Mar 19, 2026 https://github.com/python/cpython/pull/145925/commits/2f74db149556e35b0a0cc262e2065648058e51a3
467ec09 Some more thread safety notes encukou Mar 19, 2026 https://github.com/python/cpython/pull/145925/commits/467ec09a0792f043d2f3c7d0d1d95b60714553db
9d1386a Correct function name encukou Mar 19, 2026 https://github.com/python/cpython/pull/145925/commits/9d1386a3de33ff49d5059f698547128edb932ceb
1cb20e6 PyObject_GetItemData: parametrize raising encukou Mar 19, 2026 https://github.com/python/cpython/pull/145925/commits/1cb20e6ffe42fb5b160047f48e582c90ff22098e
bd11e85 What's New entry encukou Mar 19, 2026 https://github.com/python/cpython/pull/145925/commits/bd11e85dd3885257abf154601d98db15720e9d40
df3bbfe frogotten git add :/ encukou Mar 19, 2026 https://github.com/python/cpython/pull/145925/commits/df3bbfe22031705f46c8ce275c895293fdbe5c35
ba544d1 Merge branch 'main' into during-gc encukou Mar 25, 2026 https://github.com/python/cpython/pull/145925/commits/ba544d119a0e603511415760432d6349d339db4f
3b40506 Merge branch 'main' into during-gc encukou Apr 7, 2026 https://github.com/python/cpython/pull/145925/commits/3b405064fe4d2b0e823a2268d245f0b3b42741f3
Clear filters https://github.com/python/cpython/pull/145925/files
Please reload this pagehttps://github.com/python/cpython/pull/145925/files
Please reload this pagehttps://github.com/python/cpython/pull/145925/files
gcsupport.rst https://github.com/python/cpython/pull/145925/files#diff-8450fc1abe04c96a80a3fc4efddaccced77286fa01d3f32a7e20b8bb291ce420
typeobj.rst https://github.com/python/cpython/pull/145925/files#diff-560c6b0fbef4ddae510a4f11e165d0cd179a52506b470cead404d2b53e48bbe1
refcounts.dat https://github.com/python/cpython/pull/145925/files#diff-8ff1c587ae684b63fa94170a8defe58fde39ef0a7d296afffc5d89e3afb95725
stable_abi.dat https://github.com/python/cpython/pull/145925/files#diff-e87eccb88c979495c493aed4127b9f9932c320edfe4d95c8e28e2ca92e8e33f3
3.15.rst https://github.com/python/cpython/pull/145925/files#diff-bd7a9c5b54eeb2b40e6db5e48e8d79d309d8738e776a40918773c6840189edf9
object.h https://github.com/python/cpython/pull/145925/files#diff-7c8590641fc0d835bdab9395a95dbacfb2abb056cec4217466c0f3ca6cca8270
pycore_moduleobject.h https://github.com/python/cpython/pull/145925/files#diff-e4580d8176afaa9eafde1afd646de2220746b3527aff4421f325a96f65437b81
moduleobject.h https://github.com/python/cpython/pull/145925/files#diff-b922950b4d9070569144f21cce5616a05ef2b86415c05e965f10acfbe8652d9f
object.h https://github.com/python/cpython/pull/145925/files#diff-87272721a5cf1cd9915d6f503f6a7bbefa2f26c935c7ce83ca78706afd0ad05a
test_stable_abi_ctypes.py https://github.com/python/cpython/pull/145925/files#diff-e23b7eb96b17ef58f28bd65875edc3ec27eeb85be4c342d0c2d9c74121a74c0b
2026-03-13-16-37-54.gh-issue-145921.ssA7HZ.rst https://github.com/python/cpython/pull/145925/files#diff-e4f7b9cff32d81afb981e21be06c39b4305d4869a24a8591d4ae5f77ff5b0ee1
stable_abi.toml https://github.com/python/cpython/pull/145925/files#diff-f098b9ddf231fb279a9f5b4b8ed22c4241e1ffed7fe0deffb2c76bb2126d2911
_ctypes.c https://github.com/python/cpython/pull/145925/files#diff-402bc51df93eaaca2e2f2551ec0206d8af190722ae4703c178554b565d7c14b4
ctypes.h https://github.com/python/cpython/pull/145925/files#diff-53f61eb1ad6b25b3aff25b54b4df5004a1f1137ca1d2aae4c7e31fc00ec6e9f8
heaptype.c https://github.com/python/cpython/pull/145925/files#diff-d9a6b6a084da87b48d939dbb827660cc1926fabbd85fa0e3e173858d55cc4cd7
module.c https://github.com/python/cpython/pull/145925/files#diff-70f0ca6b45c9d9808e05a0ca17fe0a9dd0d0ba5b10e0ea8a54358fb4e46eb89e
heaptype_relative.c https://github.com/python/cpython/pull/145925/files#diff-42127c1f5dc4e3ebe96395d14659d54967551b67b4c2e183b0c26ed779912d66
_testmultiphase.c https://github.com/python/cpython/pull/145925/files#diff-f131d2f9bbec4a8dcdcfa1509f5d01a9c39674a8caa646d5c9d5e08971fd6ce5
_testsinglephase.c https://github.com/python/cpython/pull/145925/files#diff-3fbe563401944538a01a71448ef93250ea97fd91892c0656b6ebc0c72f5b96c8
moduleobject.c https://github.com/python/cpython/pull/145925/files#diff-8c2a0fd137780a0ee11c19aae8e46e8490f7667698cd78a5bde466bc995a08c5
typeobject.c https://github.com/python/cpython/pull/145925/files#diff-1decebeef15f4e0b0ce106c665751ec55068d4d1d1825847925ad4f528b5b872
python3dll.c https://github.com/python/cpython/pull/145925/files#diff-be34b08a4cde4f0bfbf86bc3c427e4a3dcc3f2f472061a50d00040a0d8a57c88
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L114
Doc/c-api/gcsupport.rsthttps://github.com/python/cpython/pull/145925/files#diff-8450fc1abe04c96a80a3fc4efddaccced77286fa01d3f32a7e20b8bb291ce420
View file https://github.com/encukou/cpython/blob/3b405064fe4d2b0e823a2268d245f0b3b42741f3/Doc/c-api/gcsupport.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/145925/{{ revealButtonHref }}
https://github.com/python/cpython/pull/145925/files#diff-8450fc1abe04c96a80a3fc4efddaccced77286fa01d3f32a7e20b8bb291ce420
vstinnerhttps://github.com/vstinner
Mar 18, 2026https://github.com/python/cpython/pull/145925/files#r2956135418
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/145925/files
encukouhttps://github.com/encukou
Mar 19, 2026https://github.com/python/cpython/pull/145925/files#r2959157128
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/145925/files
zoobahttps://github.com/zooba
Mar 16, 2026https://github.com/python/cpython/pull/145925/files#r2942777874
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/145925/files
encukouhttps://github.com/encukou
Mar 17, 2026https://github.com/python/cpython/pull/145925/files#r2945673968
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/145925/files
zoobahttps://github.com/zooba
Mar 17, 2026https://github.com/python/cpython/pull/145925/files#r2948476001
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/145925/files
encukouhttps://github.com/encukou
Mar 19, 2026https://github.com/python/cpython/pull/145925/files#r2959231699
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
https://docs.python.org/3/c-api/call.html#vectorcallhttps://docs.python.org/3/c-api/call.html#vectorcall
Please reload this pagehttps://github.com/python/cpython/pull/145925/files
zoobahttps://github.com/zooba
Mar 16, 2026https://github.com/python/cpython/pull/145925/files#r2942801399
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/145925/files
encukouhttps://github.com/encukou
Mar 17, 2026https://github.com/python/cpython/pull/145925/files#r2945692783
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/145925/files
zoobahttps://github.com/zooba
Mar 18, 2026https://github.com/python/cpython/pull/145925/files#r2953762721
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/145925/files
encukouhttps://github.com/encukou
Mar 19, 2026https://github.com/python/cpython/pull/145925/files#r2959211618
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/145925/files
Please reload this pagehttps://github.com/python/cpython/pull/145925/files
Please reload this pagehttps://github.com/python/cpython/pull/145925/files
Please reload this pagehttps://github.com/python/cpython/pull/145925/files
https://github.com/python/cpython/pull/145925/files#diff-8450fc1abe04c96a80a3fc4efddaccced77286fa01d3f32a7e20b8bb291ce420
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L114
Doc/c-api/typeobj.rsthttps://github.com/python/cpython/pull/145925/files#diff-560c6b0fbef4ddae510a4f11e165d0cd179a52506b470cead404d2b53e48bbe1
View file https://github.com/encukou/cpython/blob/3b405064fe4d2b0e823a2268d245f0b3b42741f3/Doc/c-api/typeobj.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/145925/{{ revealButtonHref }}
https://github.com/python/cpython/pull/145925/files#diff-560c6b0fbef4ddae510a4f11e165d0cd179a52506b470cead404d2b53e48bbe1
https://github.com/python/cpython/pull/145925/files#diff-560c6b0fbef4ddae510a4f11e165d0cd179a52506b470cead404d2b53e48bbe1
Doc/data/refcounts.dathttps://github.com/python/cpython/pull/145925/files#diff-8ff1c587ae684b63fa94170a8defe58fde39ef0a7d296afffc5d89e3afb95725
View file https://github.com/encukou/cpython/blob/3b405064fe4d2b0e823a2268d245f0b3b42741f3/Doc/data/refcounts.dat
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/145925/{{ revealButtonHref }}
https://github.com/python/cpython/pull/145925/files#diff-8ff1c587ae684b63fa94170a8defe58fde39ef0a7d296afffc5d89e3afb95725
https://github.com/python/cpython/pull/145925/files#diff-8ff1c587ae684b63fa94170a8defe58fde39ef0a7d296afffc5d89e3afb95725
Please reload this pagehttps://github.com/python/cpython/pull/145925/files
Please reload this pagehttps://github.com/python/cpython/pull/145925/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

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

Viewport: width=device-width


URLs of crawlers that visited me.