-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
AsyncResolver not default when aiodns is installed. #2228
Comments
Doc should reflect current state. |
Is it possible to explicitly set async resolver globally, or does it need to be set for each client session? |
No global state :) |
thanks @asvetlov . |
Yes |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs. |
Long story short
The docs say the AsyncResolver is the default resolver used when aiodns is installed but this is not really the case.
Here's what current stable docs say:
Expected behaviour
AsyncResolver being the default resolver when aiodns is installed.
Actual behaviour
ThreadedResolver is used.
Steps to reproduce
aiodns
:pip install aiodns
.AsyncResolver
is default:>>> aiohttp.resolver.DefaultResolver == aiohttp.resolver.AsyncResolver
False
>>> aiohttp.resolver.DefaultResolver == aiohttp.resolver.ThreadedResolver
True
Your environment
I'm using aiohttp version 2.2.3 with Python 3.5.2 on Ubuntu 16.04.3.
More observations
In
/aiohttp/resolver.py
we can clearly see this line:And then later on:
The text was updated successfully, but these errors were encountered: