Anthony Sottile <[email protected]> added the comment:
Actually, my issue seems to be something more strange.
The host being passed in is `localhost` which resolves to:
```
>>> pprint.pprint(socket.getaddrinfo('localhost', 80))
[(<AddressFamily.AF_INET: 2>,
<SocketKind.SOCK_STREAM: 1>,
6,
'',
('127.0.0.1', 80)),
(<AddressFamily.AF_INET: 2>,
<SocketKind.SOCK_DGRAM: 2>,
17,
'',
('127.0.0.1', 80)),
(<AddressFamily.AF_INET: 2>,
<SocketKind.SOCK_RAW: 3>,
0,
'',
('127.0.0.1', 80)),
(<AddressFamily.AF_INET6: 10>,
<SocketKind.SOCK_STREAM: 1>,
6,
'',
('::1', 80, 0, 0)),
(<AddressFamily.AF_INET6: 10>,
<SocketKind.SOCK_DGRAM: 2>,
17,
'',
('::1', 80, 0, 0)),
(<AddressFamily.AF_INET6: 10>,
<SocketKind.SOCK_RAW: 3>,
0,
'',
('::1', 80, 0, 0))]
```
asyncio is picking ipv6 because of this code:
https://github.com/python/cpython/blob/a445feb72902e4a3c5ae712f0c289309e1580d52/Lib/asyncio/base_events.py#L1334-L1340
despite my host not actually having an ipv6 network hooked up.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue30945>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com