-
-
Notifications
You must be signed in to change notification settings - Fork 377
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Affected Puppet, Ruby, OS and module versions/distributions
- Puppet: 8
- Ruby: 3.2.9
- Distribution: Debian 13 (client/agent)
- Module version: 8.0.0
- Python 3.13 (system packages)
- pip 25.3
How to reproduce (e.g Puppet code you use)
Using hiera:
python::python_pyvenvs:
'/opt/venv':
version: '3.13'
python::python_pips:
'astropy_healpix':
virtualenv: '/opt/venv'
ensure: latest
python::venv: present
python::version: '3.13'
What are you seeing
pip install is run on every puppet run:
What behaviour did you expect instead
pip install should not be run if the latest version is already installed.
Output log
Debug: Exec[pip_install_astropy_healpix](provider=shell): Executing check '["/bin/sh", "-c", "[ $(/opt/venv/bin/pip --log /opt/venv/pip.log install 'astropy_healpix==9!0dev0+x' 2>&1 | sed -nE 's/.*\\(from versions: (.*, )*(.*)\\)/\\2/p' | tr -d \"[:space:]\") = $(/opt/venv/bin/pip freeze --all | grep -i -e ^astropy-healpix== | cut -d= -f3 | tr -d '[:space:]') ]"]'
Debug: Executing with uid=root gid=root: '/bin/sh -c [ $(/opt/venv/bin/pip --log /opt/venv/pip.log install 'astropy_healpix==9!0dev0+x' 2>&1 | sed -nE 's/.*\(from versions: (.*, )*(.*)\)/\2/p' | tr -d "[:space:]") = $(/opt/venv/bin/pip freeze --all | grep -i -e ^astropy-healpix== | cut -d= -f3 | tr -d '[:space:]') ]'
Debug: /Stage[main]/Python/Python::Pip[astropy_healpix]/Exec[pip_install_astropy_healpix]/unless: /bin/sh: 1: [: =: argument expected
Debug: Exec[pip_install_astropy_healpix](provider=shell): Executing '["/bin/sh", "-c", "/opt/venv/bin/pip --log /opt/venv/pip.log install --upgrade astropy_healpix"]'
Debug: Executing with uid=root gid=root: '/bin/sh -c /opt/venv/bin/pip --log /opt/venv/pip.log install --upgrade astropy_healpix'
Notice: /Stage[main]/Python/Python::Pip[astropy_healpix]/Exec[pip_install_astropy_healpix]/returns: executed successfully (corrective)
Any additional information you'd like to impart
Based on the comments in manifests/pip.pp, it looks like pip freeze used to replace underscores with dashes. That seems to no longer be the case beginning in pip 21.2.
pip 20.3.4 / python 3.9
# pip install typing_extensions
Collecting typing_extensions
Downloading typing_extensions-4.15.0-py3-none-any.whl (44 kB)
|████████████████████████████████| 44 kB 7.9 MB/s
Installing collected packages: typing-extensions
Successfully installed typing-extensions-4.15.0
# pip list | grep 'typing.extensions'
typing-extensions 4.15.0
# pip freeze | grep 'typing.extensions'
typing-extensions==4.15.0
pip 21.1.3 / python 3.9
# pip list | grep 'typing.extensions'
typing-extensions 4.15.0
# pip freeze | grep 'typing.extensions'
typing-extensions==4.15.0
pip 21.2 / python 3.9
# pip list | grep 'typing.extensions'
typing_extensions 4.15.0
# pip freeze | grep 'typing.extensions'
typing_extensions==4.15.0
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working