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 — bpo-42745: Make the type cache per-interpreter by vstinner · Pull Request #23947 · python/cpython

Conversation

@vstinner

@vstinner vstinner commented Dec 25, 2020 •
edited by bedevere-bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Make the type attribute lookup cache per-interpreter.

Remove MCACHE macro: the cache is no longer disabled if the
EXPERIMENTAL_ISOLATED_SUBINTERPRETERS macro is defined.

https://bugs.python.org/issue42745

Sorry, something went wrong.

Uh oh!

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

All reactions
@vstinner
vstinner requested a review from markshannon as a code owner December 25, 2020 23:35
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label Dec 25, 2020
@bedevere-bot bedevere-bot added the awaiting core review label Dec 25, 2020
@vstinner

vstinner commented Dec 25, 2020

Copy link
Copy Markdown
Member Author

MCACHE_ prefix stands for "method cache", I chose to leave it unchanged.

All reactions

Sorry, something went wrong.

Uh oh!

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

@vstinner

vstinner commented Dec 26, 2020

Copy link
Copy Markdown
Member Author

My PR is wrong:

 7 tests failed:
     test__xxsubinterpreters test_ast test_atexit test_capi test_embed
     test_interpreters test_threading
All reactions

Sorry, something went wrong.

Uh oh!

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

@vstinner

vstinner commented Dec 26, 2020

Copy link
Copy Markdown
Member Author

This PR can be tested using PR #20085.

All reactions

Sorry, something went wrong.

Uh oh!

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

@vstinner
bpo-42745: Make the type cache per-interpreter
bf67d11
Make the type attribute lookup cache per-interpreter.

Add _PyType_InitCache() function, called by PyInterpreterState_New().

Remove MCACHE macro: the cache is no longer disabled if the
EXPERIMENTAL_ISOLATED_SUBINTERPRETERS macro is defined.

Continue to share next_version_tag between interpreters, since static
types are still shared by interpreters.
@vstinner

vstinner commented Dec 26, 2020

Copy link
Copy Markdown
Member Author

My PR is wrong: (...)

It should now be fixed: I added _PyType_InitCache() and I left next_version_tag unchanged.

All reactions

Sorry, something went wrong.

Uh oh!

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

@vstinner
vstinner merged commit 4101018 into python:master Dec 26, 2020
@bedevere-bot bedevere-bot removed the awaiting core review label Dec 26, 2020
@vstinner
vstinner deleted the method_cache branch December 26, 2020 00:45
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
@vstinner @adorilson
bpo-42745: Make the type cache per-interpreter (pythonGH-23947)
e0b912e
Make the type attribute lookup cache per-interpreter.

Add private _PyType_InitCache() function, called by PyInterpreterState_New().

Continue to share next_version_tag between interpreters, since static
types are still shared by interpreters.

Remove MCACHE macro: the cache is no longer disabled if the
EXPERIMENTAL_ISOLATED_SUBINTERPRETERS macro is defined.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@markshannon markshannon Awaiting requested review from markshannon

Uh oh!

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

Assignees

No one assigned

Labels

None yet

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

@vstinner @the-knights-who-say-ni @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.