◐ Shell
clean mode source ↗

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

@bedevere-bot mentioned this pull request

Apr 27, 2023

@ericsnowcurrently

@rwgk rwgk mentioned this pull request

May 22, 2023

@rwgk rwgk mentioned this pull request

May 22, 2023

@rwgk rwgk mentioned this pull request

May 23, 2023

rwgk added a commit to rwgk/issues that referenced this pull request

May 23, 2023

@rwgk rwgk mentioned this pull request

May 27, 2023

This was referenced

May 30, 2023

ericsnowcurrently added a commit that referenced this pull request

May 31, 2023
…tic Builtin Types (gh-105115)

In gh-103912 we added tp_bases and tp_mro to each PyInterpreterState.types.builtins entry.  However, doing so ignored the fact that both PyTypeObject fields are public API, and not documented as internal (as opposed to tp_subclasses).  We address that here by reverting back to shared objects, making them immortal in the process.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request

May 31, 2023
…ll Static Builtin Types (pythongh-105115)

In pythongh-103912 we added tp_bases and tp_mro to each PyInterpreterState.types.builtins entry.  However, doing so ignored the fact that both PyTypeObject fields are public API, and not documented as internal (as opposed to tp_subclasses).  We address that here by reverting back to shared objects, making them immortal in the process.
(cherry picked from commit 7be667d)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>

ericsnowcurrently pushed a commit that referenced this pull request

Jun 1, 2023
…All Static Builtin Types (gh-105115) (gh-105124)

In gh-103912 we added tp_bases and tp_mro to each PyInterpreterState.types.builtins entry.  However, doing so ignored the fact that both PyTypeObject fields are public API, and not documented as internal (as opposed to tp_subclasses).  We address that here by reverting back to shared objects, making them immortal in the process.
(cherry picked from commit 7be667d)

Co-authored-by: Eric Snow ericsnowcurrently@gmail.com

ericsnowcurrently added a commit that referenced this pull request

Jun 1, 2023
gh-105122)

When I added the relevant condition to type_ready_set_bases() in gh-103912, I had missed that the function also sets tp_base and ob_type (if necessary).  That led to problems for third-party static types.

We fix that here, by making those extra operations distinct and by adjusting the condition to be more specific.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request

Jun 1, 2023
…Ready() (pythongh-105122)

When I added the relevant condition to type_ready_set_bases() in pythongh-103912, I had missed that the function also sets tp_base and ob_type (if necessary).  That led to problems for third-party static types.

We fix that here, by making those extra operations distinct and by adjusting the condition to be more specific.
(cherry picked from commit 1469393)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>

ericsnowcurrently pushed a commit that referenced this pull request

Jun 1, 2023
…_Ready() (gh-105122) (gh-105211)

When I added the relevant condition to type_ready_set_bases() in gh-103912, I had missed that the function also sets tp_base and ob_type (if necessary).  That led to problems for third-party static types.

We fix that here, by making those extra operations distinct and by adjusting the condition to be more specific.
(cherry picked from commit 1469393)

Co-authored-by: Eric Snow ericsnowcurrently@gmail.com