GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-94673: Add _PyStaticType_InitBuiltin() by ericsnowcurrently · Pull Request #95152 · python/cpython

Conversation

@ericsnowcurrently

@ericsnowcurrently ericsnowcurrently commented Jul 22, 2022 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

This is the first of several precursors to storing tp_subclasses (and tp_weaklist) on the interpreter state for static builtin types.

We do the following:

  • add _PyStaticType_InitBuiltin()
  • add _Py_TPFLAGS_STATIC_BUILTIN
  • set it on all static builtin types in _PyStaticType_InitBuiltin()
  • shuffle some code around to be able to use _PyStaticType_InitBuiltin()
    • rename _PyStructSequence_InitType() to _PyStructSequence_InitBuiltinWithFlags()
    • add _PyStructSequence_InitBuiltin().
  • Issue: [subinterpreters] Static types incorrectly share some objects between interpreters #94673

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
ericsnowcurrently added 4 commits July 22, 2022 16:58
@ericsnowcurrently
Add _PyStaticType_InitBuiltin().
c6c341b
@ericsnowcurrently
Call PyType_Ready() in _PyStaticType_InitBuiltin().
8c4d7fe
@ericsnowcurrently
Add _PyStructSequence_InitBuiltin().
4679a86
@ericsnowcurrently
Remember if a type is a static builtin.
3ed7aa1
@ericsnowcurrently
ericsnowcurrently requested a review from kumaraditya303 July 22, 2022 23:04
@ericsnowcurrently
ericsnowcurrently requested review from iritkatriel and markshannon as code owners July 22, 2022 23:04
@bedevere-bot bedevere-bot added the awaiting core review label Jul 22, 2022
@ericsnowcurrently
ericsnowcurrently removed request for iritkatriel and markshannon July 22, 2022 23:04
@ericsnowcurrently ericsnowcurrently added the skip news label Jul 22, 2022
@ericsnowcurrently ericsnowcurrently mentioned this pull request Jul 22, 2022
[subinterpreters] Static types incorrectly share some objects between interpreters #94673
Closed
@ericsnowcurrently

ericsnowcurrently commented Jul 22, 2022

Copy link
Copy Markdown
Member Author

This was split out of #94995.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

kumaraditya303
kumaraditya303 reviewed Jul 23, 2022
View reviewed changes
Comment thread Objects/structseq.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

@ericsnowcurrently
Always clean up when there's an error.
240b164
@ericsnowcurrently
ericsnowcurrently merged commit 4a1dd73 into python:main Jul 25, 2022
@bedevere-bot bedevere-bot removed the awaiting core review label Jul 25, 2022
@ericsnowcurrently
ericsnowcurrently deleted the init-static-builtin-new branch July 25, 2022 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@kumaraditya303 kumaraditya303 kumaraditya303 left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@ericsnowcurrently @kumaraditya303 @bedevere-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.