-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
gh-107149: Make PyUnstable_ExecutableKinds public #108440
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
Conversation
20e5c13
to
21cad67
Compare
Since last month, nobody replied to my question if PyUnstable_ExecutableKinds should be made public on purpose, or if this PyUnstable_ExecutableKinds was added by @markshannon in commit 7199584.
Hum, should constants also be prefixed by cc @encukou |
21cad67
to
cdf9ab3
Compare
@gvanrossum: Does this change look good to you? If this API is too new and should "not be used" outside CPython code base, maybe the PyUnstable API should be removed instead? |
Note: this API is new in Python 3.13, Python 3.12 is not affected. |
I defer to @iritkatriel. Maybe it should have just been a private API, i.e. not using |
Possibly. @markshannon do you have a preference? |
Make your choice :-) |
If Mark doesn't have a different view, I'd make them private since that's easier to reverse. |
Let's not waste Mark's time. Let's make it private. |
Ok. I created PR #108651 to make the API private. Would you mind to review it? Thanks in advance.
Sure, later, we can easily make it public if some use cases arise! |
Hold on. I mixed up two PRs or issues of yours that both were related to PyUnstable. I see you already merged gh-108441 which is fine. Those are now public unstable. For this PR I think the API also needs to remain or belong public/unstable, since this API is needed for 3rd parties that are inspecting frames. They'll find this executable kind code and need to be able to understand what it means. So I retract my proposal/approval to make it private. |
@markshannon: So is that your PR what you propose? |
Move PyUnstable_ExecutableKinds and associated macros from the internal C API to the public C API. Rename constants: replace "PY_" prefix with "PyUnstable_" prefix.
cdf9ab3
to
cc026df
Compare
I rebased the PR on the main branch and I renamed constants: replace |
@markshannon wants this API to be public, see his comment: #108651 (comment) |
The mixed case looks a bit strange. Is there a reason it can't be |
cc @encukou who designed https://peps.python.org/pep-0689/ |
Most C API macros uses
I don't have a strong preference between |
See PEP-7:
So, it should be |
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12. |
Sorry, @vstinner, I could not cleanly backport this to |
Oops, I forgot my own comment :-) |
Thanks everybody for helping me to clarify the scope of this API :-) Thanks @encukou for helping me on the API prefix for constants (macros) :-) I merged my PR. |
|
Move PyUnstable_ExecutableKinds and associated macros from the internal C API to the public C API.