Tin mới
seberg:fromspec-metatype-inheritance
GitHub CopilotWrite better code with AI
GitHub Copilot appDirect agents from issue to merge
CodespacesInstant dev environments
Code ReviewManage code changes
Code QualityEnforce quality at merge
GitHub Advanced SecurityFind and fix vulnerabilities
Code securitySecure your code as you build
Secret protectionStop leaks before they start
GitHub SponsorsFund open source developers
Copilot for BusinessEnterprise-grade AI features
Premium SupportEnterprise-grade 24/7 support
BUG: Inherit MetaClass from bases in FromSpec API
Learn more about hiding disruptive comments
The reason will be displayed to describe this comment to others. Learn more.
MAINT: Address review comments
gh-60074: add new stable API function PyType_FromMetaclass #93012
Use custom metaclasses for the tests, rather than stuff from ctypes
Make PyType_FromMetaclass refcounting easier to follow
Consider adding PyType_FromMetaclass python/pythoncapi-compat#41
Remove unused includes from _testcapimodule.c
Use an explicit role in the News entry
Test that __subclasses__ is updated properly
Document caveats, suggest that PyType_From* is not for user-provided …
Move bases calculation before the allocation
PyType_FromSpec API fails to use metaclass of bases #89546
Fix compiler warning for Py_NewRef result
Use PyErr_Occurred rather than a variable
Replace duplicate Py_TPFLAGS_BASETYPE check with an assert
https://github.com/python/cpython/blob/main/Lib/test/test_capi.py#L910
Hm, I was under the impression that most of these tests were split like that. If a test fail, is it easier to see where and why it failed if the assert is on the Py side?
gh-89546: Clean up PyType_FromMetaclass #93686
: Clean up PyType_FromMetaclass (