gh-94673: More Per-Interpreter Fields for Builtin Static Types by ericsnowcurrently · Pull Request #103912 · python/cpython · GitHub

github.com

Tin mới

ericsnowcurrently:per-interpreter-static-types-fields

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

[subinterpreters] Static types incorrectly share some objects between interpreters #94673

awaiting core review

awaiting core review

gh-94673: Hide Objects in PyTypeObject Behind Accessors #104074

Make __mro__ a getter.

Add the fields to static_builtin_state.

Fix type_get_bases() and type_get_mro().

Fix _PyStaticType_InitBuiltin() for subinterpreters.

Call _PyType_CheckConsistency() after setting the fields.

Re-run most of type_ready() under each interpreter.

🔨 test-with-buildbots

🔨 test-with-buildbots

Add some comments.

Drop an old workaround for previously shared objects.

🔨 test-with-refleak-buildbots

🔨 test-with-refleak-buildbots

Move Py_TPFLAGS_READYING to each interpreter for static builtin types.

BUG: numpy segfaults on import with current CPython main numpy/numpy#23766

Type object's ob_type does not get set when tp_bases is set before PyType_Ready #104614

https://github.com/pybind/pybind11/tree/d72ffb448c58b4ffb08b5ad629bc788646e2d59e

I'm testing Python 3.12 with pybind11 (master @ https://github.com/pybind/pybind11/tree/d72ffb448c58b4ffb08b5ad629bc788646e2d59e).

cpython/Include/object.h

https://github.com/pybind/pybind11/blob/d72ffb448c58b4ffb08b5ad629bc788646e2d59e/include/pybind11/pytypes.h#L1168

GH-101291: Avoid using macros with casts in low-level long API. #104742

chore: update changelog, with target date for v2.11.0 release pybind/pybind11#4677

https://github.com/pybind/pybind11/pull/4142/files

although there was some back and forth around the time 3.11 was released. I still have to dig up references.

Python 3.11+: Add __notes__ to error_already_set::what() output. pybind/pybind11#4678

Archive debugging code related to

tp_bases of object is NULL: undocumented or unintentional behavior change in 3.12? #105020

gh-105020: Share tp_bases and tp_mro Between Interpreters For All Static Builtin Types #105115

gh-104614: Make Sure ob_type is Always Set Correctly by PyType_Ready() #105122

: Share tp_bases and tp_mro Between Interpreters For All Sta…

[3.12] gh-105020: Share tp_bases and tp_mro Between Interpreters For All Static Builtin Types (gh-105115) #105124

: Share tp_bases and tp_mro Between Interpreters For A…