prometheus / prometheus/client_python

installed package name doesnt match

Đang mở
#1,010 2 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
Python
Star
4.4k
Fork
876
Merge trung bình
8 ngày 4 giờ
Pull request đã merge (30 ngày)
1

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu bằng cách so sánh tên distribution mà pip sử dụng với thư mục import/package được nêu trong báo cáo. Làm rõ tên nào là chính xác để cài đặt và giải thích sự khác biệt này trong tài liệu, sau đó xác minh tác động đối với việc tự động hóa bằng các bước kiểm tra pip index và pip list có thể tái lập.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
build-system, documentation
Loại issue
Tài liệu
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.