Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-131776: Expose functions called from the interpreter loop via PyAP…#134242

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

Open
DinoV wants to merge2 commits intopython:main
base:main
Choose a base branch
Loading
fromDinoV:expose_apis

Conversation

DinoV
Copy link
Contributor

@DinoVDinoV commentedMay 19, 2025
edited by bedevere-appbot
Loading

These APIs are used in CPython's interpreter loop. Alternate interpreter loops can be created using thecases_generator script with an additional input file that can be plugged in using PEP 523. But because these functions aren't exposed it's not possible to actually fully create these alternative interpreter loops without copying and pasting large amounts of code.

@DinoVDinoV requested a review fromvstinnerMay 19, 2025 16:23
Copy link
Member

@ZeroIntensityZeroIntensity left a comment

Choose a reason for hiding this comment

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

Is it too much to ask for these to be renamed toPyUnstable?

@DinoV
Copy link
ContributorAuthor

Is it too much to ask for these to be renamed toPyUnstable?

I'm happy to defer on that, but would be fine renaming them if that seems better. But they're buried in the internal APIs and require definingPy_BUILD_CORE to use which means you're already taking a responsibility on if you want to use them. Also there are currently noPyUnstable functions declared at all in the internal header files (even though there are hundreds of exported functions).

@DinoVDinoV removed the needs backport to 3.14bugs and security fixes labelMay 19, 2025
@vstinner
Copy link
Member

Is it too much to ask for these to be renamed to PyUnstable?

PyUnstable functions require documentation and tests.

Comment on lines +92 to +93
PyAPI_FUNC(PyObject *) _PyType_LookupSubclasses(PyTypeObject *);
PyAPI_FUNC(PyObject *) _PyType_InitSubclasses(PyTypeObject *);

Choose a reason for hiding this comment

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

It feels a little off, putting the dict out there to be modified. What do you need this for, specifically? Can we provide some specific operation (like "set a dict watcher") rather than exposing the whole dict?

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ericsnowcurrentlyericsnowcurrentlyericsnowcurrently left review comments

@ZeroIntensityZeroIntensityZeroIntensity left review comments

@markshannonmarkshannonAwaiting requested review from markshannonmarkshannon is a code owner

@pablogsalpablogsalAwaiting requested review from pablogsal

@vstinnervstinnerAwaiting requested review from vstinner

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@DinoV@vstinner@ericsnowcurrently@ZeroIntensity

[8]ページ先頭

©2009-2025 Movatter.jp