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-106320: Remove private _PyCrossInterpreterData API by vstinner · Pull Request #107068 · python/cpython

Conversation

@vstinner

@vstinner vstinner commented Jul 22, 2023 •
edited by bedevere-bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Move private _PyCrossInterpreterData API to the internal C API: add a new pycore_cross_interp.h header file.

Mark _PyCrossInterpreterData_Init() and
_PyCrossInterpreterData_Lookup() functions are static.

Move get_crossinterp_data() and restore_crossinterp_data() from _testcapi to _testinternalcapi.

  • Issue: C API: Remove private C API functions (move them to the internal C API) #106320

Sorry, something went wrong.

Uh oh!

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

All reactions
@vstinner
pythongh-106320: Remove private _PyCrossInterpreterData API
8e71922
Move private _PyCrossInterpreterData API to the internal C API: add a
new pycore_cross_interp.h header file.

Mark _PyCrossInterpreterData_Init() and
_PyCrossInterpreterData_Lookup() functions are static.

Move get_crossinterp_data() and restore_crossinterp_data() from
_testcapi to _testinternalcapi.
@vstinner vstinner added skip news topic-C-API labels Jul 22, 2023
@vstinner
vstinner requested a review from a team as a code owner July 22, 2023 20:53
@bedevere-bot bedevere-bot added the awaiting core review label Jul 22, 2023
@bedevere-bot bedevere-bot mentioned this pull request Jul 22, 2023
C API: Remove private C API functions (move them to the internal C API) #106320
Closed
@vstinner

vstinner commented Jul 22, 2023

Copy link
Copy Markdown
Member Author

cc @ericsnowcurrently: FYI

All reactions

Sorry, something went wrong.

Uh oh!

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

@vstinner
vstinner enabled auto-merge (squash) July 22, 2023 21:05
@ericsnowcurrently
ericsnowcurrently disabled auto-merge July 22, 2023 21:14
@ericsnowcurrently

ericsnowcurrently commented Jul 22, 2023

Copy link
Copy Markdown
Member

The API is required by the _xxsubinterpreters module, which should not use the internal C-API.

All reactions

Sorry, something went wrong.

Uh oh!

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

@vstinner

vstinner commented Jul 22, 2023

Copy link
Copy Markdown
Member Author

The API is required by the _xxsubinterpreters module, which should not use the internal C-API.

Why should it not use the internal C API? What is the rationale?

If you consider that it's important that 3rd party projects can use this API, it should be made public. No?

All reactions

Sorry, something went wrong.

Uh oh!

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

@vstinner

vstinner commented Jul 22, 2023

Copy link
Copy Markdown
Member Author

By the way, PEP 684 - A Per-Interpreter GIL got accepted: should these _xx extensions be renamed to have a public name, and be documented?

All reactions

Sorry, something went wrong.

Uh oh!

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

@ericsnowcurrently

ericsnowcurrently commented Jul 24, 2023

Copy link
Copy Markdown
Member

The API is required by the _xxsubinterpreters module, which should not use the internal C-API.

Why should it not use the internal C API? What is the rationale?

I'm publishing this module on PyPI.

If you consider that it's important that 3rd party projects can use this API, it should be made public. No?

Maybe with the PyUnstable_ prefix.

By the way, PEP 684 - A Per-Interpreter GIL got accepted: should these _xx extensions be renamed to have a public name, and be documented?

_xxsubinterpreters is related to PEP 554 rather than PEP 684.

All reactions

Sorry, something went wrong.

Uh oh!

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

@vstinner

vstinner commented Jul 24, 2023 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member Author

I'm publishing this module on PyPI.

Oh, I wasn't aware of that, ok :-) That's what I'm trying to discover by removing private functions: see how they are used.

Well, anyone, I prefer to let you decide what do you: do nothing for now (keep the API as private) and decide later, or make some functions public. You might document in a comment in the header file that these functions are exported to be able to be used in 3rd party projects.

Thanks for your feedback, I close my PR.

All reactions

Sorry, something went wrong.

Uh oh!

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

@vstinner vstinner closed this Jul 24, 2023
@vstinner
vstinner deleted the pycore_cross_interp branch July 24, 2023 21:02
@ericsnowcurrently

ericsnowcurrently commented Jul 24, 2023

Copy link
Copy Markdown
Member

Thanks!

All reactions

Sorry, something went wrong.

Uh oh!

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

@ericsnowcurrently ericsnowcurrently mentioned this pull request Aug 8, 2023
Add Documentation for C-API Used by the _xxsubinterpreters Module #107784
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

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

Assignees

No one assigned

Labels

awaiting core review skip news topic-C-API

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