`IPv6Interface.ip` loses scope ID information
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 77.2k
- Forks
- 35.9k
- PR-Merge-Kennzahlen
- PR-Kennzahlen ausstehend
Beschreibung
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
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit dem minimalen IPv6Address- und IPv6Interface-Beispiel im Issue und prüfe anschließend den verknüpften PR gh-129548. Ermittle, ob die vereinbarte Lösung darin besteht, die scope ID in IPv6Interface.ip beizubehalten oder das aktuelle Verhalten zu dokumentieren; erledigt ist die Aufgabe, wenn das gewählte Verhalten oder die Dokumentation dieser Erwartung entspricht.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- networking
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 25/100