-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Connecting to IPv6-only hosts fails with a RuntimeError
#6195
Comments
Bug does not occur in
$ python -m asyncio
asyncio REPL 3.9.7 (default, Oct 10 2021, 15:13:22)
[GCC 11.1.0] on linux
>>> import asyncio
>>> from aiohttp import ClientSession
>>> await ClientSession().get('https://ipv6.google.com')
<ClientResponse(https://ipv6.google.com) [200 OK]>
<CIMultiDictProxy(...)> |
Looking through the diff, I think the issue was caused by 2b92ef7. |
RuntimeError
Could you specify the actual OS/distro name and version, not just the name of the kernel project? Also, it would be useful to have some sort of a regression test PR with a pytest-based test case. (We can mark it as xfail per https://pganssle-talks.github.io/xfail-lightning until it's fixed but it should exist at least) |
Arch Linux, rolling,
I don't see it as a straightforward task, since it's seems to me it only reproduces on global scope addresses, and not on a loopback addresses. Sorry, I don't have enough time to do it right now. Thanks! |
Reproducer:
Uses external site, sorry. |
Sorry about it. I made a pull request #6204 for this. |
Describe the bug
When aiohttp tries to connect to a host with only IPv6 address (with no IPv4 address), the exception
RuntimeError: coroutine raised StopIteration
is raised inTCPConnector._create_direct_connection
caused by theStopIteration
in_DNSCacheTable.next_addrs
.To Reproduce
aiohttp.ClientSession
.ipv6.google.com
.E.g:
await ClientSession().get('https://ipv6.google.com')
Expected behavior
await ClientSession().get('https://ipv6.google.com')
does not fail and returns a response.Logs/tracebacks
Python Version
aiohttp Version
multidict Version
yarl Version
OS
Linux
Related component
Client
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: