Cannot `os.spawnl` with no arguments
Đang mở
Chưa có ai nhận issue này.
docs
type-bug
- 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ả
Bug report
Bug description:
Python 3.8 and 3.11.9
Probably related to: https://github.com/python/cpython/issues/52284
Seems to be the same as: https://github.com/python/cpython/issues/63130
A number of bugs:
-
- Doesn't work with no arguements.
>>> os.spawnl(os.P_NOWAIT, "c:\path_to_some_program\app.exe")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<frozen os>", line 930, in spawnl
ValueError: spawnv() arg 2 cannot be empty
- If I try and make the arguement empty it also fails. This means that I am forced to send an arguement that may trigger an unknown behaviour in the spawned application.:
>>> os.spawnl(os.P_NOWAIT, "c:\path_to_some_program\app.exe", '')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<frozen os>", line 930, in spawnl
ValueError: spawnv() arg 2 first element cannot be empty
- If any aspect of this is intended, then the documentation needs to be updated to explicitly say this. Currently it implies any arguments are optional. (Honestly, the docs for this are bad generally.)
CPython versions tested on:
3.11
Operating systems tested on:
Windows
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
Bắt đầu với triển khai os.spawnl được hiển thị trong traceback và tài liệu tương ứng cho spawnl và spawnv. Tái hiện các trường hợp trên Windows khi không có đối số và khi đối số đầu tiên rỗng, sau đó xác định hành vi dự kiến và cập nhật triển khai hoặc tài liệu để các yêu cầu đối với các đối số được chấp nhận được nêu rõ và được kiểm thử.
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
- operating-systems
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- 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
- 30/100