prometheus / prometheus/client_python

installed package name doesnt match

Offen
#1,010 2 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
Python
Sterne
4.4k
Forks
876
Ø Merge
8 T. 4 Std.
Gemergte PRs (30 T.)
1

Beschreibung

There appears to be some discrepancy between the pip package name and the name of the installed package
Both prometheus_client and prometheus-client appear to be valid names to install the package

python3 -m pip index versions prometheus-client
WARNING: pip index is currently an experimental command. It may be removed/changed in a future release without prior warning.
prometheus-client (0.20.0)
python3 -m pip index versions prometheus_client
WARNING: pip index is currently an experimental command. It may be removed/changed in a future release without prior warning.
prometheus_client (0.20.0)

but the actual installed package is named prometheus_client

prometheus_client      0.20.0

and the files on disk reflect that name

ll /usr/local/lib/python3.8/dist-packages
total 32
 4096 Feb 27 10:26 ./
 4096 Jun 27  2022 ../
 4096 Feb 27 10:26 pip/
 4096 Feb 27 10:26 pip-24.0.dist-info/
 4096 Feb 27 10:26 prometheus_client/
 4096 Feb 27 10:26 prometheus_client-0.20.0.dist-info/

All the documentation suggest using

pip install prometheus-client

but that name doesn't match what is output from pip list
which in my case causes problem for automation scripts as the name in the list of installed packages does not match the name of the package to be installed

which name is the correct one?
why does the package name not match the installed package name on disk or in pip list

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, den von pip verwendeten Distributionsnamen mit dem im Bericht angegebenen Import-/Paketverzeichnis zu vergleichen. Kläre, welcher Name für die Installation korrekt ist, und erläutere die Unterscheidung in der Dokumentation. Überprüfe anschließend die Auswirkungen auf die Automatisierung mit reproduzierbaren pip index- und pip list-Prüfungen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
build-system, documentation
Issue-Typ
Dokumentation
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.