Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
socket: Actually provide non-blocking DNS methods
The green socket module seemed to have only blocking DNS resolution methods even with dnspython installed which is inconsistent with the documentation. This patch has a few consequences: * an import cycle is eliminated * if an import cycle reappears here it'll be visible Note: eliminating the import cycle revealed an issue related to monkey patching and the way we perform greendns tests (the test failures were already present on Python 3.5[1] as that version has some import cycle handling changes). The failures look like this: ====================================================================== FAIL: test_query_ans_types (tests.greendns_test.TestHostsResolver) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/kuba/projects/eventlet/tests/greendns_test.py", line 97, in test_query_ans_types assert isinstance(ans, greendns.dns.resolver.Answer) AssertionError ====================================================================== FAIL: test_query_unknown_no_raise (tests.greendns_test.TestHostsResolver) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/kuba/projects/eventlet/tests/greendns_test.py", line 129, in test_query_unknown_no_raise assert isinstance(ans, greendns.dns.resolver.Answer) AssertionError This issue will be addressed in a separate commit. This patch is contributed by Smarkets Limited. [1] eventlet#267
- Loading branch information