René's URL Explorer Experiment


Title: gh-127119: Remove check on accidental deallocation of immortal objects for free-threaded build by eendebakpt · Pull Request #127120 · python/cpython · GitHub

Open Graph Title: gh-127119: Remove check on accidental deallocation of immortal objects for free-threaded build by eendebakpt · Pull Request #127120 · python/cpython

X Title: gh-127119: Remove check on accidental deallocation of immortal objects for free-threaded build by eendebakpt · Pull Request #127120 · python/cpython

Description: (Description was updated) The python small ints are immortal with a fixed reference count (also some other types). However, old extension modules can still modify the reference count and end up deallocating these objects. This should not be an issue on 64-bit builds (even when accidentically changing the reference count it will take a very long time for an object to reach refcount zero) or the free-threaded build (which used a different reference counts, so has no legacy extensions modules) In this PR we remove the check on accidental deallocation for the free-threading build. This has performance impact for the long type (where the tp_dealloc is actually called often). For the other types we remove it to be consistent, but it should have no performance impact. Also see: PEP 683, section Accidental De-Immortalizing for details. #102464 (comment) #103403 (comment) Issue: gh-127119

Open Graph Description: (Description was updated) The python small ints are immortal with a fixed reference count (also some other types). However, old extension modules can still modify the reference count and end up dea...

X Description: (Description was updated) The python small ints are immortal with a fixed reference count (also some other types). However, old extension modules can still modify the reference count and end up dea...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:a0243328-4969-a387-6ce4-12e19a3bc398
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8F42:2FF27D:97C648:CB25A7:6969C079
html-safe-noncebdb81f87530b856b41f9d160923c2265bb693370a181b0ae3e67cecd20bebbf4
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RjQyOjJGRjI3RDo5N0M2NDg6Q0IyNUE3OjY5NjlDMDc5IiwidmlzaXRvcl9pZCI6Ijg4NjA0MzkxNjc0NDMyNTU0MTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacc53dc147198835dc4578daa8ac3032eb590a0850d50ffba91da325a4b448aef2
hovercard-subject-tagpull_request:2193022703
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/127120/files
twitter:imagehttps://avatars.githubusercontent.com/u/883786?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/883786?s=400&v=4
og:image:alt(Description was updated) The python small ints are immortal with a fixed reference count (also some other types). However, old extension modules can still modify the reference count and end up dea...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneacedec8b5f975d9e3d494ddd8f949b0b8a0de59d393901e26f73df9dcba80056
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
release83c08c21cdda978090dc44364b71aa5bc6dcea79
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/127120/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F127120%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
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
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
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/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%2F127120%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/127120/files
Reloadhttps://github.com/python/cpython/pull/127120/files
Reloadhttps://github.com/python/cpython/pull/127120/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/127120/files
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 33.9k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 71.1k 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.1k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects 31 https://github.com/python/cpython/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/python/cpython/security
Please reload this pagehttps://github.com/python/cpython/pull/127120/files
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 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
eendebakpthttps://github.com/eendebakpt
python:mainhttps://github.com/python/cpython/tree/main
eendebakpt:small_int_immortalhttps://github.com/eendebakpt/cpython/tree/small_int_immortal
Conversation 20 https://github.com/python/cpython/pull/127120
Commits 17 https://github.com/python/cpython/pull/127120/commits
Checks 37 https://github.com/python/cpython/pull/127120/checks
Files changed https://github.com/python/cpython/pull/127120/files
Please reload this pagehttps://github.com/python/cpython/pull/127120/files
gh-127119: Remove check on accidental deallocation of immortal objects for free-threaded build https://github.com/python/cpython/pull/127120/files#top
Show all changes 17 commits https://github.com/python/cpython/pull/127120/files
19d64f0 Remove check on small ints in long_dealloc eendebakpt Nov 21, 2024 https://github.com/python/cpython/pull/127120/commits/19d64f005c46b67716424546ffb9dee21c08eeea
4117c54 rewrite assert eendebakpt Nov 22, 2024 https://github.com/python/cpython/pull/127120/commits/4117c549dc250a1ea23408145f5190b08856e6ac
38862e3 📜🤖 Added by blurb_it. blurb-it[bot] Nov 22, 2024 https://github.com/python/cpython/pull/127120/commits/38862e3c1639ad4179efa94e39e4c27c3f806303
a82a6ab Merge branch 'main' into small_int_immortal eendebakpt Nov 22, 2024 https://github.com/python/cpython/pull/127120/commits/a82a6ab2fb9a1e2373ec2f3b1ce5b7c1491949fd
d8c318d avoid warnings in release builds by using Py_DEBUG eendebakpt Nov 22, 2024 https://github.com/python/cpython/pull/127120/commits/d8c318d9251cf3f0f277df3b3af2fb49ec699c84
0cd1eba Update Misc/NEWS.d/next/Core_and_Builtins/2024-11-22-07-58-00.gh-issu… eendebakpt Nov 22, 2024 https://github.com/python/cpython/pull/127120/commits/0cd1eba8255f2a7d369358c027001b4987d3b96d
4dc97c9 Merge branch 'main' into small_int_immortal eendebakpt Nov 22, 2024 https://github.com/python/cpython/pull/127120/commits/4dc97c95a70aa435a1654af827f6a66784d1fd5b
2c23541 use NDEBUG eendebakpt Nov 22, 2024 https://github.com/python/cpython/pull/127120/commits/2c23541dc33e9177373543212b43c40780581ecc
7d3a012 Merge branch 'main' into small_int_immortal eendebakpt Nov 22, 2024 https://github.com/python/cpython/pull/127120/commits/7d3a012605d8629335838cb6db2b99fc1a52e535
00b735f Merge branch 'small_int_immortal' of github.com:eendebakpt/cpython in… eendebakpt Nov 22, 2024 https://github.com/python/cpython/pull/127120/commits/00b735f25c6824e8ccb944a82b8324717a5dc8b2
ea17aee whitespace eendebakpt Nov 22, 2024 https://github.com/python/cpython/pull/127120/commits/ea17aee7abcdd2c6996a5fad42a1493c3b43af74
312c790 Merge branch 'main' into small_int_immortal eendebakpt Nov 22, 2024 https://github.com/python/cpython/pull/127120/commits/312c79066cb34fe26440c84bd2e861aeb9057790
fe0076c Merge branch 'main' into small_int_immortal eendebakpt Nov 22, 2024 https://github.com/python/cpython/pull/127120/commits/fe0076c5357862ff36fd760b8c305009398f19b7
0837699 keep check in stable ABI build eendebakpt Nov 24, 2024 https://github.com/python/cpython/pull/127120/commits/08376995b468ecaa8c85965cef0af11c9f82828b
0764241 typo eendebakpt Nov 24, 2024 https://github.com/python/cpython/pull/127120/commits/076424198edf06dacc4e8eb68a23f2da500f1a78
56f4133 review comments eendebakpt Nov 25, 2024 https://github.com/python/cpython/pull/127120/commits/56f41330dda8283d53b9de9fa04c68371eac2071
8f6bf27 apply same rule to all cases eendebakpt Dec 7, 2024 https://github.com/python/cpython/pull/127120/commits/8f6bf2758dbc6d5ec2e433cd5bfd6580d92a1666
Clear filters https://github.com/python/cpython/pull/127120/files
Please reload this pagehttps://github.com/python/cpython/pull/127120/files
Please reload this pagehttps://github.com/python/cpython/pull/127120/files
2024-11-22-07-58-00.gh-issue-127119.p9Yv4U.rst https://github.com/python/cpython/pull/127120/files#diff-c178e509d23d91e60dcc5ee87fd224e965ae37f752b53aeacb510c3224684d0d
boolobject.c https://github.com/python/cpython/pull/127120/files#diff-12a2cdd9ce4f3f10b023eb53cf47f732321dff1721c1c244f8f85c62ce0e0506
longobject.c https://github.com/python/cpython/pull/127120/files#diff-1a6e70e2beeecad88840c67284ac4d54a36998029244771fcc820e801390726a
object.c https://github.com/python/cpython/pull/127120/files#diff-ba56d44ce0dd731d979970b966fde9d8dd15d12a82f727a052a8ad48d4a49363
sliceobject.c https://github.com/python/cpython/pull/127120/files#diff-5cceaa60ecfa8dcd05c59b973244915a7b9869ecd8c84e6636df56ddddb87c0f
typevarobject.c https://github.com/python/cpython/pull/127120/files#diff-a01f3de4635d64c05f5c6c85a96b6be6aa88a5bf2ace64bfe9823d40e6e637c5
Misc/NEWS.d/next/Core_and_Builtins/2024-11-22-07-58-00.gh-issue-127119.p9Yv4U.rsthttps://github.com/python/cpython/pull/127120/files#diff-c178e509d23d91e60dcc5ee87fd224e965ae37f752b53aeacb510c3224684d0d
View file https://github.com/eendebakpt/cpython/blob/8f6bf2758dbc6d5ec2e433cd5bfd6580d92a1666/Misc/NEWS.d/next/Core_and_Builtins/2024-11-22-07-58-00.gh-issue-127119.p9Yv4U.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/127120/{{ revealButtonHref }}
Objects/boolobject.chttps://github.com/python/cpython/pull/127120/files#diff-12a2cdd9ce4f3f10b023eb53cf47f732321dff1721c1c244f8f85c62ce0e0506
View file https://github.com/eendebakpt/cpython/blob/8f6bf2758dbc6d5ec2e433cd5bfd6580d92a1666/Objects/boolobject.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/127120/{{ revealButtonHref }}
https://github.com/python/cpython/pull/127120/files#diff-12a2cdd9ce4f3f10b023eb53cf47f732321dff1721c1c244f8f85c62ce0e0506
https://github.com/python/cpython/pull/127120/files#diff-12a2cdd9ce4f3f10b023eb53cf47f732321dff1721c1c244f8f85c62ce0e0506
Objects/longobject.chttps://github.com/python/cpython/pull/127120/files#diff-1a6e70e2beeecad88840c67284ac4d54a36998029244771fcc820e801390726a
View file https://github.com/eendebakpt/cpython/blob/8f6bf2758dbc6d5ec2e433cd5bfd6580d92a1666/Objects/longobject.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/127120/{{ revealButtonHref }}
https://github.com/python/cpython/pull/127120/files#diff-1a6e70e2beeecad88840c67284ac4d54a36998029244771fcc820e801390726a
Please reload this pagehttps://github.com/python/cpython/pull/127120/files
https://github.com/python/cpython/pull/127120/files#diff-1a6e70e2beeecad88840c67284ac4d54a36998029244771fcc820e801390726a
https://github.com/python/cpython/pull/127120/files#diff-1a6e70e2beeecad88840c67284ac4d54a36998029244771fcc820e801390726a
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L214
Objects/object.chttps://github.com/python/cpython/pull/127120/files#diff-ba56d44ce0dd731d979970b966fde9d8dd15d12a82f727a052a8ad48d4a49363
View file https://github.com/eendebakpt/cpython/blob/8f6bf2758dbc6d5ec2e433cd5bfd6580d92a1666/Objects/object.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/127120/{{ revealButtonHref }}
https://github.com/python/cpython/pull/127120/files#diff-ba56d44ce0dd731d979970b966fde9d8dd15d12a82f727a052a8ad48d4a49363
https://github.com/python/cpython/pull/127120/files#diff-ba56d44ce0dd731d979970b966fde9d8dd15d12a82f727a052a8ad48d4a49363
https://github.com/python/cpython/pull/127120/files#diff-ba56d44ce0dd731d979970b966fde9d8dd15d12a82f727a052a8ad48d4a49363
https://github.com/python/cpython/pull/127120/files#diff-ba56d44ce0dd731d979970b966fde9d8dd15d12a82f727a052a8ad48d4a49363
Objects/sliceobject.chttps://github.com/python/cpython/pull/127120/files#diff-5cceaa60ecfa8dcd05c59b973244915a7b9869ecd8c84e6636df56ddddb87c0f
View file https://github.com/eendebakpt/cpython/blob/8f6bf2758dbc6d5ec2e433cd5bfd6580d92a1666/Objects/sliceobject.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/127120/{{ revealButtonHref }}
https://github.com/python/cpython/pull/127120/files#diff-5cceaa60ecfa8dcd05c59b973244915a7b9869ecd8c84e6636df56ddddb87c0f
https://github.com/python/cpython/pull/127120/files#diff-5cceaa60ecfa8dcd05c59b973244915a7b9869ecd8c84e6636df56ddddb87c0f
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L217
Objects/typevarobject.chttps://github.com/python/cpython/pull/127120/files#diff-a01f3de4635d64c05f5c6c85a96b6be6aa88a5bf2ace64bfe9823d40e6e637c5
View file https://github.com/eendebakpt/cpython/blob/8f6bf2758dbc6d5ec2e433cd5bfd6580d92a1666/Objects/typevarobject.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/127120/{{ revealButtonHref }}
https://github.com/python/cpython/pull/127120/files#diff-a01f3de4635d64c05f5c6c85a96b6be6aa88a5bf2ace64bfe9823d40e6e637c5
https://github.com/python/cpython/pull/127120/files#diff-a01f3de4635d64c05f5c6c85a96b6be6aa88a5bf2ace64bfe9823d40e6e637c5
Please reload this pagehttps://github.com/python/cpython/pull/127120/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.