-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
gh-141004: Document unstable executable kind macros in pyframe.h
#143490
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Doc/c-api/frame.rst
Outdated
| Index for the "skip" kind in ``PyUnstable_ExecutableKinds``. | ||
| Indicates that the frame's code object should be skipped. | ||
| .. versionadded:: 3.12 |
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.
9c03215 was not backported to 3.12?
|
These are rather useless without docs for |
|
@encukou ok, makes sense. I'll add the documentation for PyUnstable_ExecutableKinds and link these macros to it. Thanks :) |
Doc/c-api/frame.rst
Outdated
| An enumeration of the different kinds of executables (code objects) in a frame. | ||
| This can be one of the constants :c:macro:`PyUnstable_EXECUTABLE_KIND_SKIP` | ||
| or :c:macro:`PyUnstable_EXECUTABLE_KIND_PY_FUNCTION`. |
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.
It's an array, not an enum.
Could you document what it's useful for or how to use it? That part isn't very clear to me.
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.
Please go through what i've mentioned below and let me know if its perfectly appropriate, and as soon I recieve the heads up i'll update and commit:
.. c:var:: PyUnstable_ExecutableKinds
An array of executable kinds (executor types) for frames, used for internal
debugging and tracing. The entries are indexed by the constants
:c:macro:PyUnstable_EXECUTABLE_KIND_SKIP or
:c:macro:PyUnstable_EXECUTABLE_KIND_PY_FUNCTION.
This can be used to identify the type of the code object associated with a frame.
.. versionadded:: 3.13
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.
Could @encukou or @StanFromIreland please review my suggestion above and correct it if its wrong or gimme the green light to commit this ⬆️
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.
I'd prefer some words on why/how you'd use this.
You can say “The entries are indexed by the following constants:”, and indent the docs for the constants. Since the entries are all similar, you could even use a compact table, like in code object flags.
ZeroIntensity
left a comment
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.
You need to update ignored_c_api.txt here too.
Doc/c-api/frame.rst
Outdated
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.
Too many blank lines.
| .. c:macro:: PyUnstable_EXECUTABLE_KIND_PY_FUNCTION | ||
| Index for the "Python function" kind in ``PyUnstable_ExecutableKinds``. |
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.
These should be links via :c:data:`PyUnstable_ExecutableKinds`
|
test_asyncio.test_sendfile port conflict - unrelated to docs. |
|
We don't need those tests to run at all really, we can (I think) exclude the ignore file from triggering the Edit: See #143583. |
Can the same be said for #143492 |
gh-141004: Document unstable executable kind macros in
pyframe.hThis PR documents the
PyUnstable_EXECUTABLE_KIND_*macros and thePyUnstable_ExecutableKindsarray inDoc/c-api/frame.rst. These were listed as undocumented in the parent issue.📚 Documentation preview 📚: https://cpython-previews--143490.org.readthedocs.build/