os.stat()’s follow_symlinks is a bit ambigously described
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
- 48/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- python
- Lĩnh vực
- documentation
Hướng nghiên cứu
Bắt đầu với tài liệu về os.stat() và phần Files and Directories được liên kết. Làm rõ rằng follow_symlinks áp dụng cho thành phần cuối cùng của tên đường dẫn, sau đó kiểm tra và sửa, nếu cần, phần diễn đạt tương ứng cho Windows và mục Changed in; tài liệu phải mô tả chính xác cả hai hành vi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Documentation
There are numerous functions which take a pathname and and argument like follow_symlinks.
For most of these, the argument follow_symlinks is not further explained in the function itself, but people will rather have to resort to https://docs.python.org/3/library/os.html#files-and-directories where things are rather exactly described.
However, the description of os.stat() has:
This function normally follows symlinks; to stat a symlink add the argument follow_symlinks=False, or use lstat().
Which is however only half correct, because what it actually means is:
When the last component of the path is a symbolic link, the function normally follows it. Symbolic links in the path that are not the last component, are always followed.
Similar, the paragraph below for windows, also uses wording that implies any name-surrogate reparse points, i.e. not only if the last pathname component is one.
No idea what Windows does, but if that's also wrong, it should be corrected accordingly. Also in the "Changed in" entry for that.
AFAICS, the other functions of os have it correctly described (by simply not describing it).
Thanks,
Chris.
- Ngôn ngữ chính
- Python
- Star
- 77.2k
- Fork
- 36k
- Merge trung bình
- 1 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 558
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.
Issue khác của python/cpython
-
docs pending
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
stdlib type-feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
stdlib type-feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
build type-bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
stdlib topic-email type-feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Tất cả issue của python/cpython
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
-
🐛 Bug 🔔 Pending processing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
jumpserver/jumpserver#17584 ·