Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.4k
gh-106320: Remove private _PyCrossInterpreterData API#107068
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Move private _PyCrossInterpreterData API to the internal C API: add anew 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.
cc@ericsnowcurrently: FYI |
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? |
By the way,PEP 684 - A Per-Interpreter GIL got accepted: should these |
I'm publishing this module on PyPI.
Maybe with the
_xxsubinterpreters is related to PEP 554 rather than PEP 684. |
vstinner commentedJul 24, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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. |
Thanks! |
Uh oh!
There was an error while loading.Please reload this page.
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.