Message311916
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. |
|
Date |
User |
Action |
Args |
2018-02-09 23:52:27 | Anthony Sottile | set | recipients:
+ Anthony Sottile, pitrou, yselivanov, cecton |
2018-02-09 23:52:27 | Anthony Sottile | set | messageid: <1518220347.26.0.467229070634.issue30945@psf.upfronthosting.co.za> |
2018-02-09 23:52:27 | Anthony Sottile | link | issue30945 messages |
2018-02-09 23:52:27 | Anthony Sottile | create | |
|