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-84436: Make Interned Strings Immortal by ericsnowcurrently · Pull Request #102887 · python/cpython

Conversation

@ericsnowcurrently

@ericsnowcurrently ericsnowcurrently commented Mar 21, 2023 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

This is a prerequisite for a per-interpreter GIL if the interned strings dict stays global (e.g. gh-102858).

(This is based on gh-102925. It also requires gh-19474.)

  • Issue: Fixing Copy on Writes from reference counting and immortal objects #84436

Sorry, something went wrong.

Uh oh!

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

All reactions
@ericsnowcurrently ericsnowcurrently added the skip news label Mar 21, 2023
@bedevere-bot bedevere-bot mentioned this pull request Mar 21, 2023
Fixing Copy on Writes from reference counting and immortal objects #84436
Closed
@bedevere-bot bedevere-bot added the awaiting core review label Mar 21, 2023
@ericsnowcurrently ericsnowcurrently mentioned this pull request Mar 21, 2023
gh-100227: Make the Global Interned Dict Safe for Isolated Interpreters #102858
Closed
@ericsnowcurrently

ericsnowcurrently commented Mar 21, 2023

Copy link
Copy Markdown
Member Author

CC @kumaraditya303

All reactions

Sorry, something went wrong.

Uh oh!

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

ericsnowcurrently added 17 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
ericsnowcurrently force-pushed the immortal-interned-strings branch from 13f3b8f to ca776b1 Compare March 22, 2023 18:25
ericsnowcurrently added 2 commits March 22, 2023 12:32
@ericsnowcurrently
Make objects stored in global containers immortal.
b649a84
@ericsnowcurrently
Immortalize the interned strings dict.
9b0dc99
@ericsnowcurrently
ericsnowcurrently force-pushed the immortal-interned-strings branch from ca776b1 to 9b0dc99 Compare March 22, 2023 18:34
@github-actions

github-actions Bot commented Apr 12, 2026

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

All reactions

Sorry, something went wrong.

Uh oh!

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

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Apr 12, 2026
@ambv

ambv commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

This PR is attached to gh-84436, which is already completed: the fix for that issue landed through other changes, and this PR's approach was not taken or has since become obsolete. Closing to cull the number of open pull requests. Do not reopen this pull request without getting a go-ahead from a triager or core developer.

All reactions

Sorry, something went wrong.

Uh oh!

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

@ambv ambv closed this Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ZeroIntensity ZeroIntensity Awaiting requested review from ZeroIntensity ZeroIntensity will be requested when the pull request is marked ready for review ZeroIntensity is a code owner
@FFY00 FFY00 Awaiting requested review from FFY00 FFY00 will be requested when the pull request is marked ready for review FFY00 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 stale Stale PR or inactive for long period of time.

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