Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Virtualenv>=20.0.0 has new version command output breaking virtualenv_version fact

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

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

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python, ruby
Lĩnh vực
devops

Hướng nghiên cứu

Read lib/facter/virtualenv_version.rb and reproduce the fact with both virtualenv --version outputs shown in the issue. Update the parsing so virtualenv_version is defined for versions before and from 20.0.0, then verify the fact no longer raises the reported nil error.

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

Mô tả

Affected Puppet, Ruby, OS and module versions/distributions

We are running old everything, but the facter fact, https://github.com/voxpupuli/puppet-python/blob/master/lib/facter/virtualenv_version.rb, hasn't been changed in a while.

How to reproduce (e.g Puppet code you use)

Try to use virtualenv_version fact when virtualenv>=20.0.0 is installed

What are you seeing

error while resolving custom fact "virtualenv_version": undefined method `[]' for nil:NilClass

What behaviour did you expect instead

virtualenv_version is defined with a version value.

Any additional information you'd like to impart

This happens because virtualenv>=20.0.0 is a major rewrite and changes the output of the virtualenv --version command.

Old virtualenv:

$ virtualenv --version
16.7.5

New virtualenv:

$ ~/venv/bin/virtualenv --version
virtualenv 20.0.1 from /home/clark/venv/lib/python2.7/site-packages/virtualenv/__init__.pyc

The fact's output parsing will need to be updated to handle both cases.

Ngôn ngữ chính
Ruby
Star
196
Fork
371
Merge trung bình
5 giờ 54 phút
Pull request đã merge (30 ngày)
5

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

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.

Issue khác của voxpupuli/puppet-python

Tất cả issue của voxpupuli/puppet-python

Issue tương tự

Thêm issue về Ruby

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.