René's URL Explorer Experiment


Title: bpo-37879: Suppress subtype_dealloc decref when base type is a C heap type by eduardo-elizondo · Pull Request #15323 · python/cpython · GitHub

Open Graph Title: bpo-37879: Suppress subtype_dealloc decref when base type is a C heap type by eduardo-elizondo · Pull Request #15323 · python/cpython

X Title: bpo-37879: Suppress subtype_dealloc decref when base type is a C heap type by eduardo-elizondo · Pull Request #15323 · python/cpython

Description: The instance destructor for a type is responsible for preparing an instance for deallocation by decrementing the reference counts of its referents. If an instance belongs to a heap type, the type object of an instance has its reference count decremented while for static types, which are permanently allocated, the type object is unaffected by the instance destructor. Previously, the default instance destructor searched the class hierarchy for an inherited instance destructor and, if present, would invoke it. Then, if the instance type is a heap type, it would decrement the reference count of that heap type. However, this could result in the premature destruction of a type because the inherited instance destructor should have already decremented the reference count of the type object. This change avoids the premature destruction of the type object by suppressing the decrement of its reference count when an inherited, non-default instance destructor has been invoked. Finally, an assertion on the Py_SIZE of a type was deleted. Heap types have a non zero size, making this into an incorrect assertion. https://bugs.python.org/issue37879

Open Graph Description: The instance destructor for a type is responsible for preparing an instance for deallocation by decrementing the reference counts of its referents. If an instance belongs to a heap type, the type o...

X Description: The instance destructor for a type is responsible for preparing an instance for deallocation by decrementing the reference counts of its referents. If an instance belongs to a heap type, the type o...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:f726c9ff-ebdb-5bdc-bc85-95595a8e5996
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idCDC6:1CD6E3:41BCA5:5B9FCE:696A4FEC
html-safe-nonce4e1f4508655b988ebfbe7641d3c79a1e9e38eabee97e5f178b930fa6603c2035
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDREM2OjFDRDZFMzo0MUJDQTU6NUI5RkNFOjY5NkE0RkVDIiwidmlzaXRvcl9pZCI6IjE1MTA5MTA1NTY2NjUxNzE5NDgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmaca6043097a95c304b2a14298959d50e1caa78b1187044e5233dd2f18065fac8f3
hovercard-subject-tagpull_request:308317758
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/15323/files
twitter:imagehttps://avatars.githubusercontent.com/u/5315899?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/5315899?s=400&v=4
og:image:altThe instance destructor for a type is responsible for preparing an instance for deallocation by decrementing the reference counts of its referents. If an instance belongs to a heap type, the type o...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None3f871c8e07f0ae1886fa8dac284166d28b09ad5bada6476fc10b674e489788ef
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
release63c426b30d262aba269ef14c40e3c817b384cd61
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/15323/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F15323%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%2F15323%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/15323/files
Reloadhttps://github.com/python/cpython/pull/15323/files
Reloadhttps://github.com/python/cpython/pull/15323/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/15323/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/15323/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
encukouhttps://github.com/encukou
python:masterhttps://github.com/python/cpython/tree/master
eduardo-elizondo:fix-cheaptype-subclasshttps://github.com/eduardo-elizondo/cpython/tree/fix-cheaptype-subclass
Conversation 24 https://github.com/python/cpython/pull/15323
Commits 11 https://github.com/python/cpython/pull/15323/commits
Checks 0 https://github.com/python/cpython/pull/15323/checks
Files changed https://github.com/python/cpython/pull/15323/files
Please reload this pagehttps://github.com/python/cpython/pull/15323/files
bpo-37879: Suppress subtype_dealloc decref when base type is a C heap type https://github.com/python/cpython/pull/15323/files#top
Show all changes 11 commits https://github.com/python/cpython/pull/15323/files
3ee0e63 Suppress subtype_dealloc decref when base type is a C heap type eduardo-elizondo Aug 17, 2019 https://github.com/python/cpython/pull/15323/commits/3ee0e637009f047d8309414b573393d95a0b396f
67cef48 added blurb eduardo-elizondo Aug 17, 2019 https://github.com/python/cpython/pull/15323/commits/67cef48390f9cb2d04edc7922a724ea511ec68cd
d440e8a Fixed whitespace eduardo-elizondo Aug 17, 2019 https://github.com/python/cpython/pull/15323/commits/d440e8ad8c520fc1ce25d129edf997031625d947
5bceecd Typo and indent eduardo-elizondo Aug 18, 2019 https://github.com/python/cpython/pull/15323/commits/5bceecd58125a7157c9842df2d5f08fda2903fff
d227ab3 Fix leaks eduardo-elizondo Sep 10, 2019 https://github.com/python/cpython/pull/15323/commits/d227ab3f4e748c3d26d5d1c0377a028892379584
eaea7be Avoid PyState_FindModule in heapctypesubclass_init encukou Sep 9, 2019 https://github.com/python/cpython/pull/15323/commits/eaea7be0f4ff8020fdc4ebbc9bb0733fe39e4bd8
935bc37 Move the added test code encukou Sep 9, 2019 https://github.com/python/cpython/pull/15323/commits/935bc378a8e41a7f4afa622c45ebe7c2ce8eb6c9
6a23625 Remove unnecessary descriptor encukou Sep 9, 2019 https://github.com/python/cpython/pull/15323/commits/6a23625440fa5c8809cfcbd277547e2d5ccc9f04
f4258a1 Add docstrings to C classes encukou Sep 9, 2019 https://github.com/python/cpython/pull/15323/commits/f4258a1bf71951133a0a72e70fce9d21acb6f40d
152aeaa Merge branch 'master' into fix-cheaptype-subclass eduardo-elizondo Sep 11, 2019 https://github.com/python/cpython/pull/15323/commits/152aeaae096587ff1a7593900bdf07fae552361f
cf82442 Remove merge artifacts eduardo-elizondo Sep 11, 2019 https://github.com/python/cpython/pull/15323/commits/cf82442e19dd491f7bd952e0c03df568b542c7c5
Clear filters https://github.com/python/cpython/pull/15323/files
Please reload this pagehttps://github.com/python/cpython/pull/15323/files
Please reload this pagehttps://github.com/python/cpython/pull/15323/files
test_capi.py https://github.com/python/cpython/pull/15323/files#diff-a537c794ffb51531649e2b81f9ae6978c25077de6aa10c9134576ac628fcc345
2019-08-17-13-50-21.bpo-37879.CZeUem.rst https://github.com/python/cpython/pull/15323/files#diff-2420adc0a608fb1466617c54f3a472360b90d9afcb8215e6e317559cd64c5937
_testcapimodule.c https://github.com/python/cpython/pull/15323/files#diff-b2d7540efa4f376350ef77b923a6dfcc54bb90424970477f66275f19bad0d30f
typeobject.c https://github.com/python/cpython/pull/15323/files#diff-1decebeef15f4e0b0ce106c665751ec55068d4d1d1825847925ad4f528b5b872
Lib/test/test_capi.pyhttps://github.com/python/cpython/pull/15323/files#diff-a537c794ffb51531649e2b81f9ae6978c25077de6aa10c9134576ac628fcc345
View file https://github.com/eduardo-elizondo/cpython/blob/cf82442e19dd491f7bd952e0c03df568b542c7c5/Lib/test/test_capi.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/15323/{{ revealButtonHref }}
https://github.com/python/cpython/pull/15323/files#diff-a537c794ffb51531649e2b81f9ae6978c25077de6aa10c9134576ac628fcc345
https://github.com/python/cpython/pull/15323/files#diff-a537c794ffb51531649e2b81f9ae6978c25077de6aa10c9134576ac628fcc345
Misc/NEWS.d/next/C API/2019-08-17-13-50-21.bpo-37879.CZeUem.rsthttps://github.com/python/cpython/pull/15323/files#diff-2420adc0a608fb1466617c54f3a472360b90d9afcb8215e6e317559cd64c5937
View file https://github.com/eduardo-elizondo/cpython/blob/cf82442e19dd491f7bd952e0c03df568b542c7c5/Misc/NEWS.d/next/C%20API/2019-08-17-13-50-21.bpo-37879.CZeUem.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/15323/{{ revealButtonHref }}
Modules/_testcapimodule.chttps://github.com/python/cpython/pull/15323/files#diff-b2d7540efa4f376350ef77b923a6dfcc54bb90424970477f66275f19bad0d30f
View file https://github.com/eduardo-elizondo/cpython/blob/cf82442e19dd491f7bd952e0c03df568b542c7c5/Modules/_testcapimodule.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/15323/{{ revealButtonHref }}
https://github.com/python/cpython/pull/15323/files#diff-b2d7540efa4f376350ef77b923a6dfcc54bb90424970477f66275f19bad0d30f
https://github.com/python/cpython/pull/15323/files#diff-b2d7540efa4f376350ef77b923a6dfcc54bb90424970477f66275f19bad0d30f
https://github.com/python/cpython/pull/15323/files#diff-b2d7540efa4f376350ef77b923a6dfcc54bb90424970477f66275f19bad0d30f
https://github.com/python/cpython/pull/15323/files#diff-b2d7540efa4f376350ef77b923a6dfcc54bb90424970477f66275f19bad0d30f
https://github.com/python/cpython/pull/15323/files#diff-b2d7540efa4f376350ef77b923a6dfcc54bb90424970477f66275f19bad0d30f
Objects/typeobject.chttps://github.com/python/cpython/pull/15323/files#diff-1decebeef15f4e0b0ce106c665751ec55068d4d1d1825847925ad4f528b5b872
View file https://github.com/eduardo-elizondo/cpython/blob/cf82442e19dd491f7bd952e0c03df568b542c7c5/Objects/typeobject.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/15323/{{ revealButtonHref }}
https://github.com/python/cpython/pull/15323/files#diff-1decebeef15f4e0b0ce106c665751ec55068d4d1d1825847925ad4f528b5b872
https://github.com/python/cpython/pull/15323/files#diff-1decebeef15f4e0b0ce106c665751ec55068d4d1d1825847925ad4f528b5b872
https://github.com/python/cpython/pull/15323/files#diff-1decebeef15f4e0b0ce106c665751ec55068d4d1d1825847925ad4f528b5b872
Please reload this pagehttps://github.com/python/cpython/pull/15323/files
https://github.com/python/cpython/pull/15323/files#diff-1decebeef15f4e0b0ce106c665751ec55068d4d1d1825847925ad4f528b5b872
https://github.com/python/cpython/pull/15323/files#diff-1decebeef15f4e0b0ce106c665751ec55068d4d1d1825847925ad4f528b5b872
https://github.com/python/cpython/pull/15323/files#diff-1decebeef15f4e0b0ce106c665751ec55068d4d1d1825847925ad4f528b5b872
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.