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-100227: Make the Global PyModuleDef Cache Safe for Isolated Interpreters by ericsnowcurrently · Pull Request #102938 · python/cpython

Conversation

@ericsnowcurrently

@ericsnowcurrently ericsnowcurrently commented Mar 22, 2023 •
edited by bedevere-bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

This is a similar change to gh-102925, but applied to the global cache of PyModuleDefs instead of the interned strings. Note that the cache is only used for legacy extension modules and not for multi-phase init modules.

(Until gh-102925 is merged, this is based on top of it.)

  • Issue: Improve Interpreter Isolation #100227

Sorry, something went wrong.

Uh oh!

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

All reactions
ericsnowcurrently added 23 commits March 22, 2023 11:59
@ericsnowcurrently
Factor out add_threadstate().
546b934
@ericsnowcurrently
Add _PyThreadState_InitDetached().
0bcd136
@ericsnowcurrently
Add _PyThreadState_ClearDetached().
35d5310
@ericsnowcurrently
Add _PyRuntime.cached_objects.main_tstate.
cba9e34
@ericsnowcurrently
Add _Py_AcquireGlobalObjectsState() and _Py_ReleaseGlobalObjectsState().
3b1bb8b
@ericsnowcurrently
Add _Py_AddToGlobalDict().
eb42aa1
@ericsnowcurrently
Drop _Py_AcquireGlobalObjectsState() and _Py_ReleaseGlobalObjectsStat…
4e9da2d
…e().
@ericsnowcurrently
Add acquire_global_objects_lock() and release_global_objects_lock().
6216207
@ericsnowcurrently
Add some TODO comments.
3c007c0
@ericsnowcurrently
Factor out store_interned().
7d95514
@ericsnowcurrently
Store a thread state to use just for interned strings.
5c20b84
@ericsnowcurrently
Always use the main interpreter when possibly resizing the interned d…
a3ae02a
…ict.
@ericsnowcurrently
Use _PyRuntime.cached_objects.main_tstate instead.
d5fbc37
@ericsnowcurrently
Add _PyThreadState_IsBound() and _PyThreadState_Unbind().
459325f
@ericsnowcurrently
Make sure the one-off tstate is bound before using it.
4f25244
@ericsnowcurrently
Use _Py_AcquireGlobalObjectsState() in store_interned().
e68535a
@ericsnowcurrently
Use _Py_AddToGlobalDict().
22753b3
@ericsnowcurrently
Move the extensions dict to _PyRuntime.cached_objects.
5c7bfd7
@ericsnowcurrently
Add _Py_GetFromGlobalDict().
f1a33ce
@ericsnowcurrently
Add _Py_PopFromGlobalDict().
10e6d69
@ericsnowcurrently
Adjust _Py_AddToGlobalDict().
7dbae68
@ericsnowcurrently
Use _Py_PopFromGlobalDict() in unicode_dealloc().
3e08c1f
@ericsnowcurrently
Use the global dict API in import.c.
1039a60
@ericsnowcurrently ericsnowcurrently added the skip news label Mar 22, 2023
@ericsnowcurrently
ericsnowcurrently requested review from brettcannon, encukou, ncoghlan and warsaw as code owners March 22, 2023 22:56
@bedevere-bot bedevere-bot mentioned this pull request Mar 22, 2023
Improve Interpreter Isolation #100227
Closed
@bedevere-bot bedevere-bot added the awaiting core review label Mar 22, 2023
@ericsnowcurrently

ericsnowcurrently commented Mar 28, 2023

Copy link
Copy Markdown
Member Author

I'm closing this in favor of gh-103084.

All reactions

Sorry, something went wrong.

Uh oh!

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

@ericsnowcurrently ericsnowcurrently closed this Mar 28, 2023
@ericsnowcurrently ericsnowcurrently mentioned this pull request Mar 28, 2023
gh-100227: Make the Global PyModuleDef Cache Safe for Isolated Interpreters #103084
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@brettcannon brettcannon Awaiting requested review from brettcannon brettcannon is a code owner
@encukou encukou Awaiting requested review from encukou
@ncoghlan ncoghlan Awaiting requested review from ncoghlan ncoghlan is a code owner
@warsaw warsaw Awaiting requested review from warsaw warsaw is a code owner

Uh oh!

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

Assignees

No one assigned

Labels

awaiting core review 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.

2 participants

@ericsnowcurrently @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.