Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

pip package performing install on every run with underscore in name

オープン
#743 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python, ruby
領域
devops

調査の方向性

Start in manifests/pip.pp, especially the version check that compares pip install output with pip freeze. Reproduce the astropy_healpix example using pip 21.2 or newer and inspect the underscore-versus-dash behavior. Done means an already-installed latest package does not trigger pip install on a subsequent run.

索引モデルが issue の本文から書いたものです。

説明

bug

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
主要言語
Ruby
スター
196
フォーク
371
平均マージ
5時間 54分
マージ済み PR(30日)
5

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

voxpupuli/puppet-python のほかの issue

voxpupuli/puppet-python の issue をすべて見る

似ている issue

Ruby の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。