gh-89546: Clean up PyType_FromMetaclass by encukou · Pull Request #93686 · python/cpython · GitHub

github.com

Tin mới

encukou:PyType_From-cleanup

GitHub CopilotWrite better code with AI

GitHub Copilot appDirect agents from issue to merge

ActionsAutomate any workflow

CodespacesInstant dev environments

IssuesPlan and track work

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

View all use cases

Financial services

View all industries

Software Development

GitHub SponsorsFund open source developers

Copilot for BusinessEnterprise-grade AI features

Premium SupportEnterprise-grade 24/7 support

Pull requests 2.6k

Security and quality 0

Raise invalid slot exceptions early

Switch to switch for the slots

Allocate & copy the docstring early

Prepare the type names early

Move offset setting to before PyType_Ready

Add comment on preparing special slots

Comment that we don't want to call Python code while a type is half-b…

Add comment on the function's refcounting strategy

Check that base & offsets fit in the basicsize

awaiting core review

awaiting core review

Add blurb for the new check

Move variable declarations out of switch cases

Fix ReST syntax (*sigh*)

View reviewed changes

Learn more about hiding disruptive comments

The reason will be displayed to describe this comment to others. Learn more.

Downcast to int to avoid a warning

Reflow check_basicsize_includes_size_and_offsets to conform to style …

Reword error messages to say "offset is out of bounds"

Move modname down to improve scoping

Move variables to smaller scopes

Merge main branch to resolve conflicts

View reviewed changes

One more PEP 7 nit!

Revert 30935 defer bpo45162 to 312 (

emscripten-core/emscripten#17269

https://github.com/python/cpython/issue/89336

PyType_FromSpec API fails to use metaclass of bases

Successfully merging this pull request may close these issues.