socket documentation should mention AF_UNSPEC in the section on constants and getaddrinfo() docs
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Python
- Star
- 77.2k
- Fork
- 36k
- Chỉ số merge pull request
- Chỉ số pull request đang chờ
Mô tả
Documentation
In the socket module documentation
There should be a mention of AF_UNSPEC alongside AF_INET, AF_INET6 and AF_UNIX in the constants section.
Also e.g. in the getaddrinfo() entry, it should be mentioned you can pass socket.AF_UNSPEC instead of 0.
The difference matters if automated testing is checking type annotations (at least I had this issue submitting
a pull request for pythonosc).
The default family argument for getaddrinfo is 0.
This has type int, not type socket.AddressFamily, whereas socket.AF_UNSPEC,
has the type socket.AddressFamily, but corresponds to the integer 0.
This makes a difference when type annotations are being checked
and the argument to family is expected to be of type socket.AddressFamily.
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 từ tài liệu của mô-đun socket, cụ thể là phần hằng số và mục getaddrinfo(). Đề cập đến AF_UNSPEC cùng với AF_INET, AF_INET6 và AF_UNIX, đồng thời ghi rõ rằng nó có thể được truyền thay cho 0 cho đối số family. Công việc được xem là hoàn tất khi cả hai tham chiếu được yêu cầu đều giải thích sự khác biệt liên quan đến kiểu.
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, networking
- 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
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 48/100