Document what happens when venv is run using existing directory
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Python
- Star
- 77.2k
- Fork
- 35.9k
- Chỉ số merge pull request
- Chỉ số pull request đang chờ
Mô tả
Documentation
Please consider specifying the behavior of venv module when the ENV_DIR already exists, and/or is not empty and/or contains an existing virtual environment. Currently the docs mentions only: “running this command creates the target directory”, and “creates” implies the command should be executed when ENV_DIR is not present [1].
However, I am able to run python -m venv .venv twice, and there is no error. There is no mention in the docs what happens when the directory is already there. Does venv skips creation of virtual environment? Does it try to create it anyways? What if ENV_DIR content is already a virtual environment? What if it is somewhat broken, does venv try to “fix” it?
[1] On the other hand, there are options --clear, --update, --update-deps, and those imply the ENV_DIR should be present. But it contradicts the previous assumption.
Linked PRs
- gh-151419
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Xem lại tài liệu về mô-đun venv và PR được liên kết gh-151419, sau đó so sánh cách diễn đạt trong đó với việc chạy python -m venv trên các thư mục ENV_DIR hiện có, không rỗng, hợp lệ và bị hỏng. Công việc được xem là hoàn tất khi tài liệu giải thích các hành vi đó và cách --clear, --update cũng như --update-deps ảnh hưởng đến chúng.
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
- documentation
- Loại issue
- Tài liệu
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100