Skip to content

Commit

Permalink
Disable back aiodns by default
Browse files Browse the repository at this point in the history
  • Loading branch information
asvetlov committed Nov 1, 2016
1 parent bcd9b95 commit 9fbb7d7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ CHANGES
- Extend `ClientResponse` with `content_type` and `charset`
properties like in `web.Request`. #1349

-
- Disable aiodns by default #559

-

Expand Down
5 changes: 3 additions & 2 deletions aiohttp/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@

try:
import aiodns
aiodns_default = hasattr(aiodns.DNSResolver, 'gethostbyname')
# aiodns_default = hasattr(aiodns.DNSResolver, 'gethostbyname')
except ImportError: # pragma: no cover
aiodns = None
aiodns_default = False

aiodns_default = False


class ThreadedResolver(AbstractResolver):
Expand Down
9 changes: 5 additions & 4 deletions tests/test_resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ def test_async_resolver_aiodns_not_present(loop, monkeypatch):


def test_default_resolver():
if gethostbyname:
assert DefaultResolver is AsyncResolver
else:
assert DefaultResolver is ThreadedResolver
# if gethostbyname:
# assert DefaultResolver is AsyncResolver
# else:
# assert DefaultResolver is ThreadedResolver
assert DefaultResolver is ThreadedResolver

0 comments on commit 9fbb7d7

Please sign in to comment.