Author ohwgiles
Recipients ohwgiles
Date 2021-05-02.21:47:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1619992035.49.0.377506474729.issue44012@roundup.psfhosted.org>
In-reply-to
Content
IPv6 addresses may contain a scope id, for example "fe80::1%eth0".

These are usually required for link-local addresses.

bpo-34788 added support for scoped IPv6 addresses, but missed the
"exploded" method:

>>> import ipaddress
>>> ipaddress.IPv6Address('fe80::1%eth0').exploded
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.9/ipaddress.py", line 394, in exploded
    return self._explode_shorthand_ip_string()
  File "/usr/lib/python3.9/ipaddress.py", line 1824, in _explode_shorthand_ip_string
    ip_int = self._ip_int_from_string(ip_str)
  File "/usr/lib/python3.9/ipaddress.py", line 1705, in _ip_int_from_string
    raise AddressValueError("%s in %r" % (exc, ip_str)) from None
ipaddress.AddressValueError: Only hex digits permitted in '1%eth0' in 'fe80::1%eth0'
History
Date User Action Args
2021-05-02 21:47:15ohwgilessetrecipients: + ohwgiles
2021-05-02 21:47:15ohwgilessetmessageid: <1619992035.49.0.377506474729.issue44012@roundup.psfhosted.org>
2021-05-02 21:47:15ohwgileslinkissue44012 messages
2021-05-02 21:47:15ohwgilescreate