gh-125313: Prefer sys.base_* paths in Py_Get(Exec)Prefix deprecation notes#125317
gh-125313: Prefer sys.base_* paths in Py_Get(Exec)Prefix deprecation notes#125317vstinner merged 1 commit intopython:mainfrom
sys.base_* paths in Py_Get(Exec)Prefix deprecation notes#125317Conversation
vstinner
left a comment
There was a problem hiding this comment.
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 <y5c4l3@proton.me>
8a92243 to
7194494
Compare
| .. 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.
Can't we always advice to use sys.base_prefix instead?
There was a problem hiding this comment.
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?
…precation notes (pythonGH-125317) Prefer `sys.base_*` paths in `Py_Get(Exec)Prefix` deprecation notes. (cherry picked from commit 7d88140) Co-authored-by: Y5 <124019959+y5c4l3@users.noreply.github.com> Signed-off-by: y5c4l3 <y5c4l3@proton.me>
|
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 <y5c4l3@proton.me> Co-authored-by: Y5 <124019959+y5c4l3@users.noreply.github.com>
…precation notes (python#125317) Prefer `sys.base_*` paths in `Py_Get(Exec)Prefix` deprecation notes. Signed-off-by: y5c4l3 <y5c4l3@proton.me>
Py_GetPrefix-family APIs should document thesys.base_*counterparts #125313📚 Documentation preview 📚: https://cpython-previews--125317.org.readthedocs.build/