`IPv6Interface.ip` loses scope ID information
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ả
Bug report
Bug description:
Hi, I ran into an issue in my code (in multiplemonomials/multicast_expert) because putting an IPv6 address into an IPv6Interface, then accessing it via the ip property loses the scope ID information.
Here's a minimal example:
>> addr = ipaddress.IPv6Address("fe80::%10")
>> addr
IPv6Address('fe80::%10')
>> addr_with_prefix = ipaddress.IPv6Interface((addr, 64))
>> addr_with_prefix
IPv6Interface('fe80::%10/64')
>> addr_with_prefix.ip
IPv6Address('fe80::')
I would expect the last line to return IPv6Address('fe80::%10'), matching the value of addr. Not 100.0% sure this is a bug, but it's certainly something I would not expect since it's not in the documentation. So I'd appreciate if a note about this could be added to the docs if nothing else! Thank you!
Note that this issue is similar, but not the same thing: https://github.com/python/cpython/issues/88178
CPython versions tested on:
3.11
Operating systems tested on:
Windows
Linked PRs
- gh-129548
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 ví dụ tối thiểu về IPv6Address và IPv6Interface trong issue, sau đó xem xét PR được liên kết gh-129548. Xác định liệu hướng giải quyết đã thống nhất là giữ lại scope ID trong IPv6Interface.ip hay ghi lại hành vi hiện tại; được xem là hoàn tất khi hành vi hoặc tài liệu được chọn phù hợp với kỳ vọ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
- networking
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 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
- 25/100