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.

Author Anthony Sottile
Recipients Anthony Sottile, cecton, pitrou, yselivanov
Date 2018-02-09.23:52:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1518220347.26.0.467229070634.issue30945@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2018-02-09 23:52:27Anthony Sottilesetrecipients: + Anthony Sottile, pitrou, yselivanov, cecton
2018-02-09 23:52:27Anthony Sottilesetmessageid: <1518220347.26.0.467229070634.issue30945@psf.upfronthosting.co.za>
2018-02-09 23:52:27Anthony Sottilelinkissue30945 messages
2018-02-09 23:52:27Anthony Sottilecreate