René's URL Explorer Experiment


Title: bpo-45383: Inherit MetaClass from bases in FromSpec API by seberg · Pull Request #28748 · python/cpython · GitHub

Open Graph Title: bpo-45383: Inherit MetaClass from bases in FromSpec API by seberg · Pull Request #28748 · python/cpython

X Title: bpo-45383: Inherit MetaClass from bases in FromSpec API by seberg · Pull Request #28748 · python/cpython

Description: This checks the bases of of a type created using the FromSpec API to inherit the bases metaclasses. The MetaClasses alloc function will be called as is done in tp_new for classes created in Python. I have tested that both tests fail on the dev branch without the fix. This doesn't explicitly test that using tp_bases also works (yet). It also doesn't test the allocation size, the way it is written if the metaclass is set correctly (through allocation), then the allocation should also be correct. (I have not done that, because that would require creating a MetaClass that extends the PyHeaptType_Object. Certainly possible, but it seemed a bit much – although that is my secret agenda ;)). https://bugs.python.org/issue45383 Test that __subclasses__ is set correctly Call type_new_init_subclass()? Explicitly test that using tp_bases also works Check the allocation size?

Open Graph Description: This checks the bases of of a type created using the FromSpec API to inherit the bases metaclasses. The MetaClasses alloc function will be called as is done in tp_new for classes created in Python...

X Description: This checks the bases of of a type created using the FromSpec API to inherit the bases metaclasses. The MetaClasses alloc function will be called as is done in tp_new for classes created in Python...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:3f3d0382-b4f4-903e-6453-5700a2367ea2
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9BE4:2B7A56:473C60:64DB06:696A4FA1
html-safe-noncebe7f486f1b5928b830ba273d198884749193f0ebeea64e194cd2e883bc8fe4bb
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QkU0OjJCN0E1Njo0NzNDNjA6NjREQjA2OjY5NkE0RkExIiwidmlzaXRvcl9pZCI6IjU3MjY3MTA5MzY3MDExMjg2MDkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac4ceff3d36c7f6593b65a3d47ee15b5ee337a04d788819f8d42f66fd641b0aab4
hovercard-subject-tagpull_request:750374450
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/28748/files
twitter:imagehttps://avatars.githubusercontent.com/u/61977?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/61977?s=400&v=4
og:image:altThis checks the bases of of a type created using the FromSpec API to inherit the bases metaclasses. The MetaClasses alloc function will be called as is done in tp_new for classes created in Python...
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/28748/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F28748%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%2F28748%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/28748/files
Reloadhttps://github.com/python/cpython/pull/28748/files
Reloadhttps://github.com/python/cpython/pull/28748/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/28748/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/28748/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:mainhttps://github.com/python/cpython/tree/main
seberg:fromspec-metatype-inheritancehttps://github.com/seberg/cpython/tree/fromspec-metatype-inheritance
Conversation 39 https://github.com/python/cpython/pull/28748
Commits 19 https://github.com/python/cpython/pull/28748/commits
Checks 0 https://github.com/python/cpython/pull/28748/checks
Files changed https://github.com/python/cpython/pull/28748/files
Please reload this pagehttps://github.com/python/cpython/pull/28748/files
bpo-45383: Inherit MetaClass from bases in FromSpec API https://github.com/python/cpython/pull/28748/files#top
Show all changes 19 commits https://github.com/python/cpython/pull/28748/files
67c8a97 BUG: Inherit MetaClass from bases in FromSpec API seberg Oct 5, 2021 https://github.com/python/cpython/pull/28748/commits/67c8a97affcb9dbb12f44fdb7767e756b82ea34b
2012aaa 📜🤖 Added by blurb_it. blurb-it[bot] Oct 5, 2021 https://github.com/python/cpython/pull/28748/commits/2012aaa637fc4eadc941424782223bf762d018be
881ba13 MAINT: Address review comments seberg Oct 20, 2021 https://github.com/python/cpython/pull/28748/commits/881ba13faf8e725947a5a488aec68316c7b19cc1
6fd1926 Merge in the main branch encukou May 27, 2022 https://github.com/python/cpython/pull/28748/commits/6fd192648db52c5d8006204c377ec6eaf485ca29
aad7456 Disallow non-type metaclasses encukou May 27, 2022 https://github.com/python/cpython/pull/28748/commits/aad745657bd69039ea906286a5bacf38174f95cc
aba4208 Use custom metaclasses for the tests, rather than stuff from ctypes encukou May 27, 2022 https://github.com/python/cpython/pull/28748/commits/aba4208e975802acb910714f91fe7ee4883fe9a0
4eb003a Make PyType_FromMetaclass refcounting easier to follow encukou May 27, 2022 https://github.com/python/cpython/pull/28748/commits/4eb003a808c321be0cdf3cacb67131dde835f904
1ae7969 Adjust documentation encukou May 27, 2022 https://github.com/python/cpython/pull/28748/commits/1ae7969b99c50f7b2a2a943e3740f5634d612c41
6001a33 Fix type warning encukou May 31, 2022 https://github.com/python/cpython/pull/28748/commits/6001a3322fc287fe4f4c1dd6a86e25c1d4cbc7d0
1ad0eca Remove unused includes from _testcapimodule.c encukou May 31, 2022 https://github.com/python/cpython/pull/28748/commits/1ad0ecadb217d42886e9abe4d08c25d76124d743
ea69819 Use an explicit role in the News entry encukou May 31, 2022 https://github.com/python/cpython/pull/28748/commits/ea6981952ad9d418fef890fdfc35f59b69d502b7
cb1527f Test that __subclasses__ is updated properly encukou May 31, 2022 https://github.com/python/cpython/pull/28748/commits/cb1527ff40107f1d3d64799008ac599ab8e5ad9a
f86d2b5 Document caveats, suggest that PyType_From* is not for user-provided … encukou May 31, 2022 https://github.com/python/cpython/pull/28748/commits/f86d2b5a6aa47feb8199ab25b51f3c330594ec2d
93c65e8 Remove unused variable encukou May 31, 2022 https://github.com/python/cpython/pull/28748/commits/93c65e81e94d33eee6d1c087c933ac46486dd77c
d881750 Move bases calculation before the allocation encukou May 31, 2022 https://github.com/python/cpython/pull/28748/commits/d881750fece555526a24caba53dc1d8a838ee4ec
a7af972 Fix compiler warning for Py_NewRef result encukou Jun 1, 2022 https://github.com/python/cpython/pull/28748/commits/a7af972e72ad6ee70fb241f66b511d7feea41b4e
2f47be3 Use PyErr_Occurred rather than a variable encukou Jun 9, 2022 https://github.com/python/cpython/pull/28748/commits/2f47be342c056c4008ea111a11cf8dadb5f03d0e
ef6bcce Use PEP 7 style encukou Jun 9, 2022 https://github.com/python/cpython/pull/28748/commits/ef6bccecd78f76f5015e4667f0dcde60f53dc26c
6b31880 Replace duplicate Py_TPFLAGS_BASETYPE check with an assert encukou Jun 9, 2022 https://github.com/python/cpython/pull/28748/commits/6b31880cf77b079386844e9d3a43cdcc712d3264
Clear filters https://github.com/python/cpython/pull/28748/files
Please reload this pagehttps://github.com/python/cpython/pull/28748/files
Please reload this pagehttps://github.com/python/cpython/pull/28748/files
type.rst https://github.com/python/cpython/pull/28748/files#diff-04d16413dd014ab960bcc7e5f56e3e087da668393f6525d10d099e5a86020016
2021-10-05-21-59-43.bpo-45383.TVClgf.rst https://github.com/python/cpython/pull/28748/files#diff-4991e64f641413046c3b41e720c41817a30e8b14f4f8b839bba7e6404bd107e0
_testcapimodule.c https://github.com/python/cpython/pull/28748/files#diff-b2d7540efa4f376350ef77b923a6dfcc54bb90424970477f66275f19bad0d30f
typeobject.c https://github.com/python/cpython/pull/28748/files#diff-1decebeef15f4e0b0ce106c665751ec55068d4d1d1825847925ad4f528b5b872
Doc/c-api/type.rsthttps://github.com/python/cpython/pull/28748/files#diff-04d16413dd014ab960bcc7e5f56e3e087da668393f6525d10d099e5a86020016
View file https://github.com/seberg/cpython/blob/6b31880cf77b079386844e9d3a43cdcc712d3264/Doc/c-api/type.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/28748/{{ revealButtonHref }}
https://github.com/python/cpython/pull/28748/files#diff-04d16413dd014ab960bcc7e5f56e3e087da668393f6525d10d099e5a86020016
https://github.com/python/cpython/pull/28748/files#diff-04d16413dd014ab960bcc7e5f56e3e087da668393f6525d10d099e5a86020016
https://github.com/python/cpython/pull/28748/files#diff-04d16413dd014ab960bcc7e5f56e3e087da668393f6525d10d099e5a86020016
https://github.com/python/cpython/pull/28748/files#diff-04d16413dd014ab960bcc7e5f56e3e087da668393f6525d10d099e5a86020016
Misc/NEWS.d/next/C API/2021-10-05-21-59-43.bpo-45383.TVClgf.rsthttps://github.com/python/cpython/pull/28748/files#diff-4991e64f641413046c3b41e720c41817a30e8b14f4f8b839bba7e6404bd107e0
View file https://github.com/seberg/cpython/blob/6b31880cf77b079386844e9d3a43cdcc712d3264/Misc/NEWS.d/next/C%20API/2021-10-05-21-59-43.bpo-45383.TVClgf.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/28748/{{ revealButtonHref }}
Modules/_testcapimodule.chttps://github.com/python/cpython/pull/28748/files#diff-b2d7540efa4f376350ef77b923a6dfcc54bb90424970477f66275f19bad0d30f
View file https://github.com/seberg/cpython/blob/6b31880cf77b079386844e9d3a43cdcc712d3264/Modules/_testcapimodule.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/28748/{{ revealButtonHref }}
https://github.com/python/cpython/pull/28748/files#diff-b2d7540efa4f376350ef77b923a6dfcc54bb90424970477f66275f19bad0d30f
https://github.com/python/cpython/pull/28748/files#diff-b2d7540efa4f376350ef77b923a6dfcc54bb90424970477f66275f19bad0d30f
https://github.com/python/cpython/pull/28748/files#diff-b2d7540efa4f376350ef77b923a6dfcc54bb90424970477f66275f19bad0d30f
https://github.com/python/cpython/pull/28748/files#diff-b2d7540efa4f376350ef77b923a6dfcc54bb90424970477f66275f19bad0d30f
Please reload this pagehttps://github.com/python/cpython/pull/28748/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.