[issue41169] socket.inet_pton raised when pass an IPv6 address like "[::]" to it

Christian Heimes report at bugs.python.org
Wed Jul 1 02:12:33 EDT 2020


Christian Heimes <lists at cheimes.de> added the comment:

In your example you are binding to [::1]. That's suppose to work. Binding or connecting to [::] does not work for me on Linux:


>>> addr = '[::]', 8888
>>> s = socket.socket(socket.AF_INET6)
>>> s.bind(addr)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known
>>> s.connect(addr)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
socket.gaierror: [Errno -2] Name or service not known

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41169>
_______________________________________


More information about the Python-bugs-list mailing list