You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Deprecation of Py_GetPrefix-family APIs should document the sys.base_* counterparts #125313
Documentation suggests sys.prefix as an alternative to Py_GetPrefix in the deprecation note here
Deprecated since version 3.13, will be removed in version 3.15: Get sys.prefix instead.
and it seems correct:
>>>importpoc# CPython module that prints `Py_GetPrefix` on initPrefix: /home/y5/micromamba/envs/py3.13>>>importsys; print(sys.prefix); print(sys.base_prefix)
/home/y5/micromamba/envs/py3.13/home/y5/micromamba/envs/py3.13
But strictly speaking, sys.base_prefix is the real counterpart rather than sys.prefix when it involves venv:
Activity
y5c4l3 commentedon Oct 11, 2024
A fuller comparison for reference:
gh-125313: Prefer `sys.base_*` paths in `Py_Get(Exec)Prefix` deprecat…
pythongh-125313: Prefer `sys.base_*` paths in `Py_Get(Exec)Prefix` de…
vstinner commentedon Oct 21, 2024
Fixed by change 7d88140.
[3.13] gh-125313: Prefer `sys.base_*` paths in `Py_Get(Exec)Prefix` d…
pythongh-125313: Prefer `sys.base_*` paths in `Py_Get(Exec)Prefix` de…