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
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:303a7dc9-1e65-cb94-cc27-3a2622bf9c05 |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | BE4C:36C7A:932721:C4BA9A:69697EB1 |
| html-safe-nonce | 3902230ac28656ae8923962a2754430d2300ffa8fe3481ffae24d1f17cfd9de1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRTRDOjM2QzdBOjkzMjcyMTpDNEJBOUE6Njk2OTdFQjEiLCJ2aXNpdG9yX2lkIjoiNDM2NzY5MTY3NTYyNjA0MjA5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 46b6c8c591de767353da698a579a75a3e7c3ea28e159efd4896d39e7dd8b0faf |
| hovercard-subject-tag | pull_request:750374450 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/28748/checks |
| twitter:image | https://avatars.githubusercontent.com/u/61977?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/61977?s=400&v=4 |
| og:image:alt | 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... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | f33e4b94c8824ab2b434d82a94139432fb5ebee9df4b75304140ad22508c4a77 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 48f380098b30acbb700b04f1724481ca10d574fc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width