[New-bugs-announce] [issue43513] venv: recreate symlinks on --upgrade

ThiefMaster report at bugs.python.org
Tue Mar 16 09:57:10 EDT 2021


New submission from ThiefMaster <adrian at planetcoding.net>:

When using `python -m venv --upgrade someenv`, it rewrites `pyvenv.cfg` with the current python version but leaves the python symlinks untouched (https://github.com/python/cpython/blob/a8ef4572a6b28bcfc0b10b34fa4204954b9dd761/Lib/venv/__init__.py#L248)

This is of course fine when the original location of the Python interpreter is something like `/usr/bin/python3.9`, but when using pyenv it's a path containing the full version such as `/home/USER/.pyenv/versions/3.9.2/bin/python`, which makes in-place updates of minor Python versions harder than needed (manual update of the symlink needed).

IfF you agree that this change makes sense, I wouldn't mind sending a PR for this...

----------
components: Library (Lib)
messages: 388840
nosy: ThiefMaster
priority: normal
severity: normal
status: open
title: venv: recreate symlinks on --upgrade
type: enhancement

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43513>
_______________________________________


More information about the New-bugs-announce mailing list