https://github.com/python/cpython/commit/7711a1c33f5058ef1d5600a744a19c4c1cbf3d98
commit: 7711a1c33f5058ef1d5600a744a19c4c1cbf3d98
branch: 3.13
author: Miss Islington (bot) <[email protected]>
committer: vstinner <[email protected]>
date: 2024-10-21T09:41:15Z
summary:

[3.13] gh-125313: Prefer `sys.base_*` paths in `Py_Get(Exec)Prefix` deprecation 
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 7d88140d5299bd086434840db66ede8ccd01a688)

Signed-off-by: y5c4l3 <[email protected]>
Co-authored-by: Y5 <[email protected]>

files:
M Doc/c-api/init.rst
M Doc/deprecations/c-api-pending-removal-in-3.15.rst

diff --git a/Doc/c-api/init.rst b/Doc/c-api/init.rst
index 7cfe8ca0649e0b..39eb7fe439449a 100644
--- a/Doc/c-api/init.rst
+++ b/Doc/c-api/init.rst
@@ -615,7 +615,7 @@ Process-wide parameters
    returned string points into static storage; the caller should not modify its
    value.  This corresponds to the :makevar:`prefix` variable in the top-level
    :file:`Makefile` and the :option:`--prefix` argument to the 
:program:`configure`
-   script at build time.  The value is available to Python code as 
``sys.prefix``.
+   script at build time.  The value is available to Python code as 
``sys.base_prefix``.
    It is only useful on Unix.  See also the next function.
 
    This function should not be called before :c:func:`Py_Initialize`, otherwise
@@ -625,7 +625,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.
 
 
 .. c:function:: wchar_t* Py_GetExecPrefix()
@@ -638,7 +639,8 @@ Process-wide parameters
    should not modify its value.  This corresponds to the :makevar:`exec_prefix`
    variable in the top-level :file:`Makefile` and the ``--exec-prefix``
    argument to the :program:`configure` script at build  time.  The value is
-   available to Python code as ``sys.exec_prefix``.  It is only useful on Unix.
+   available to Python code as ``sys.base_exec_prefix``.  It is only useful on
+   Unix.
 
    Background: The exec-prefix differs from the prefix when platform dependent
    files (such as executables and shared libraries) are installed in a 
different
@@ -669,7 +671,8 @@ Process-wide parameters
       It now returns ``NULL`` if called before :c:func:`Py_Initialize`.
 
    .. deprecated-removed:: 3.13 3.15
-      Get :data:`sys.exec_prefix` instead.
+      Get :data:`sys.base_exec_prefix` instead, or :data:`sys.exec_prefix` if
+      :ref:`virtual environments <venv-def>` need to be handled.
 
 
 .. c:function:: wchar_t* Py_GetProgramFullPath()
diff --git a/Doc/deprecations/c-api-pending-removal-in-3.15.rst 
b/Doc/deprecations/c-api-pending-removal-in-3.15.rst
index e3974415e0cc89..fcb703e66fe9eb 100644
--- a/Doc/deprecations/c-api-pending-removal-in-3.15.rst
+++ b/Doc/deprecations/c-api-pending-removal-in-3.15.rst
@@ -13,11 +13,11 @@ Pending Removal in Python 3.15
   * :c:func:`PySys_ResetWarnOptions`:
     Clear :data:`sys.warnoptions` and :data:`!warnings.filters` instead.
   * :c:func:`Py_GetExecPrefix`:
-    Get :data:`sys.exec_prefix` instead.
+    Get :data:`sys.base_exec_prefix` and :data:`sys.exec_prefix` instead.
   * :c:func:`Py_GetPath`:
     Get :data:`sys.path` instead.
   * :c:func:`Py_GetPrefix`:
-    Get :data:`sys.prefix` instead.
+    Get :data:`sys.base_prefix` and :data:`sys.prefix` instead.
   * :c:func:`Py_GetProgramFullPath`:
     Get :data:`sys.executable` instead.
   * :c:func:`Py_GetProgramName`:

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to