-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-125313: Prefer sys.base_*
paths in Py_Get(Exec)Prefix
deprecation notes
#125317
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
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.
Can you please also update Doc/deprecations/c-api-pending-removal-in-3.15.rst ?
Thanks for the reminder. I wasn't aware of the deprecation lists. |
Signed-off-by: y5c4l3 <[email protected]>
8a92243
to
7194494
Compare
@@ -635,7 +635,8 @@ Process-wide parameters | |||
It now returns ``NULL`` if called before :c:func:`Py_Initialize`. | |||
|
|||
.. deprecated-removed:: 3.13 3.15 | |||
Get :data:`sys.prefix` instead. | |||
Get :data:`sys.base_prefix` instead, or :data:`sys.prefix` if | |||
:ref:`virtual environments <venv-def>` need to be handled. |
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.
Can't we always advice to use sys.base_prefix instead?
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.
Here is my concern. If someone looks up the stable API Py_GetPrefix
and the docs bring them here, they are certainly aware of the deprecation, but probably unconscious that there are 2 alternatives with very subtle differences. Clarifying both would at least present the choices to developers depending on their needs. What's your opinion?
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 makes sense.
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.
LGTM
…precation notes (pythonGH-125317) Prefer `sys.base_*` paths in `Py_Get(Exec)Prefix` deprecation notes. (cherry picked from commit 7d88140) Co-authored-by: Y5 <[email protected]> Signed-off-by: y5c4l3 <[email protected]>
GH-125776 is a backport of this pull request to the 3.13 branch. |
Sorry, @y5c4l3 and @vstinner, I could not cleanly backport this to
|
…eprecation notes (GH-125317) (#125776) gh-125313: Prefer `sys.base_*` paths in `Py_Get(Exec)Prefix` deprecation notes (GH-125317) Prefer `sys.base_*` paths in `Py_Get(Exec)Prefix` deprecation notes. (cherry picked from commit 7d88140) Signed-off-by: y5c4l3 <[email protected]> Co-authored-by: Y5 <[email protected]>
…precation notes (python#125317) Prefer `sys.base_*` paths in `Py_Get(Exec)Prefix` deprecation notes. Signed-off-by: y5c4l3 <[email protected]>
Py_GetPrefix
-family APIs should document thesys.base_*
counterparts #125313📚 Documentation preview 📚: https://cpython-previews--125317.org.readthedocs.build/