Skip to content

gh-152105: Remove docs snippet that uses internal C API - #155122

Open
encukou wants to merge 1 commit into
python:mainfrom
encukou:remove-PyUnstable_ExecutableKinds-note
Open

gh-152105: Remove docs snippet that uses internal C API#155122
encukou wants to merge 1 commit into
python:mainfrom
encukou:remove-PyUnstable_ExecutableKinds-note

Conversation

@encukou

@encukou encukou commented Aug 3, 2026

Copy link
Copy Markdown
Member

Follow-up to GH-143490 (see this comment).

_PyInterpreterFrame.f_executable and PyStackRef_AsPyObjectBorrow are undocumented and only available in the internal API. Docs should not suggest using them, even if PyUnstable_ExecutableKinds is unusable without them.

This is a backportable docs PR; for 3.16 let's remove the API unless someone explains things. (I'll send the PR after this is merged.)

Follow-up to pythonGH-143490.

`_PyInterpreterFrame.f_executable` and `PyStackRef_AsPyObjectBorrow`
are undocumented and only available in the internal API.
Docs should not suggest using them, even if `PyUnstable_ExecutableKinds`
is unusable without them.
@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #33890467 | 📁 Comparing 88ee59e against main (5918085)

  🔍 Preview build  

1 file changed
± c-api/frame.html

Comment thread Doc/c-api/frame.rst
return PyUnstable_EXECUTABLE_KIND_SKIP;
}
Note that reading the executable kind from a frame is currently only
possible with undocumented internal API.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit: little grammatical issue, either:

Suggested change
possible with undocumented internal API.
possible with undocumented internal APIs.

or

Suggested change
possible with undocumented internal API.
possible with an undocumented internal API.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

"API" is sometimes a non-count noun. We're not consistent with it.

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

Labels

awaiting merge docs Documentation in the Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

3 participants