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-76785: Move the Cross-Interpreter Code to Its Own File by ericsnowcurrently · Pull Request #111502 · python/cpython

Conversation

@ericsnowcurrently

@ericsnowcurrently ericsnowcurrently commented Oct 30, 2023 •
edited by bedevere-app Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

This is partly to clear this stuff out of pystate.c, but also in preparation for moving some code out of _xxsubinterpretersmodule.c.

This change also moves this stuff to the internal API (new: Include/internal/pycore_crossinterp.h). @vstinner did this previously and I undid it. Now I'm re-doing it. :/

(This PR essentially only moves existing code between files.)

  • Issue: [subinterpreters] PEP 554 implementation: add interpreters module #76785

Sorry, something went wrong.

Uh oh!

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

All reactions
ericsnowcurrently added 4 commits October 30, 2023 09:52
@ericsnowcurrently
Factor out interp_utils.*.
25eb51a
@ericsnowcurrently
interp_utils -> crossinterp
7870af1
@ericsnowcurrently
Add pycore_crossinterp.h.
8450753
@ericsnowcurrently
Move everything to the internal C-API for now.
2f788d8
@ericsnowcurrently ericsnowcurrently added the skip news label Oct 30, 2023
@ericsnowcurrently
ericsnowcurrently requested a review from a team as a code owner October 30, 2023 16:00
@bedevere-app bedevere-app Bot mentioned this pull request Oct 30, 2023
[subinterpreters] PEP 554 implementation: add interpreters module #76785
Closed
@bedevere-app bedevere-app Bot added the awaiting core review label Oct 30, 2023
Eclips4
Eclips4 reviewed Oct 30, 2023
View reviewed changes
Comment thread Python/crossinterp.c Resolved

Uh oh!

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

ericsnowcurrently added 4 commits October 30, 2023 11:33
@ericsnowcurrently
Group the API and code appropriately.
f77c5c9
@ericsnowcurrently
Fix a smelly symbol.
e85f29e
@ericsnowcurrently
Add a missing include.
cc3c844
@ericsnowcurrently
Fix the _freeze_module build on Windows.
953c39e
@ericsnowcurrently
ericsnowcurrently removed the request for review from a team October 30, 2023 18:17
vstinner
vstinner approved these changes Oct 30, 2023
View reviewed changes

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread Include/internal/pycore_crossinterp.h
};

PyAPI_FUNC(_PyCrossInterpreterData *) _PyCrossInterpreterData_New(void);
PyAPI_FUNC(void) _PyCrossInterpreterData_Free(_PyCrossInterpreterData *data);

@vstinner vstinner Oct 30, 2023

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you don't need one of these functions in shared libraries (stdlib extensions), you can replace PyAPI_FUNC() with extern.

Sorry, something went wrong.

Uh oh!

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

ericsnowcurrently reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@ericsnowcurrently ericsnowcurrently Oct 30, 2023

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They're basically all used in _xxsubinterpretersmodule.c and _xxinterpchannelsmodule.c.

Sorry, something went wrong.

Uh oh!

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

vstinner reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels Oct 30, 2023
@ericsnowcurrently
ericsnowcurrently merged commit c6fe086 into python:main Oct 30, 2023
@bedevere-app bedevere-app Bot removed the awaiting merge label Oct 30, 2023
@ericsnowcurrently
ericsnowcurrently deleted the crossinterp-utils-refactor branch October 30, 2023 22:53
FullteaR pushed a commit to FullteaR/cpython that referenced this pull request Nov 3, 2023
@ericsnowcurrently @FullteaR
pythongh-76785: Move the Cross-Interpreter Code to Its Own File (pyth…
af89509
…ongh-111502)

This is partly to clear this stuff out of pystate.c, but also in preparation for moving some code out of _xxsubinterpretersmodule.c.  This change also moves this stuff to the internal API (new: Include/internal/pycore_crossinterp.h).  @vstinner did this previously and I undid it.  Now I'm re-doing it. :/
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
@ericsnowcurrently @aisk
pythongh-76785: Move the Cross-Interpreter Code to Its Own File (pyth…
3a4f933
…ongh-111502)

This is partly to clear this stuff out of pystate.c, but also in preparation for moving some code out of _xxsubinterpretersmodule.c.  This change also moves this stuff to the internal API (new: Include/internal/pycore_crossinterp.h).  @vstinner did this previously and I undid it.  Now I'm re-doing it. :/
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
@ericsnowcurrently @Glyphack
pythongh-76785: Move the Cross-Interpreter Code to Its Own File (pyth…
537057e
…ongh-111502)

This is partly to clear this stuff out of pystate.c, but also in preparation for moving some code out of _xxsubinterpretersmodule.c.  This change also moves this stuff to the internal API (new: Include/internal/pycore_crossinterp.h).  @vstinner did this previously and I undid it.  Now I'm re-doing it. :/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Eclips4 Eclips4 Eclips4 left review comments
@vstinner vstinner vstinner approved these changes

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 @vstinner @Eclips4
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.