This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: IPv6Address.exploded does not support interface name (scope id)
Type: Stage: patch review
Components: Library (Lib) Versions:
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: ohwgiles
Priority: normal Keywords: patch

Created on 2021-05-02 21:47 by ohwgiles, last changed 2022-04-11 14:59 by admin.

Pull Requests
URL Status Linked Edit
PR 25824 open ohwgiles, 2021-05-02 22:00
Messages (1)
msg392740 - (view) Author: Oliver Giles (ohwgiles) * Date: 2021-05-02 21:47
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
2022-04-11 14:59:45adminsetgithub: 88178
2021-05-02 22:00:23ohwgilessetkeywords: + patch
stage: patch review
pull_requests: + pull_request24511
2021-05-02 21:47:15ohwgilescreate