<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 30, 2019 at 11:41 AM Matthew Pounsett <<a href="mailto:matt@conundrum.com">matt@conundrum.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
What one actually needs to do there, for decent testing code, is to<br>
write an entirely new helper method that takes care of timeouts,<br>
fallback from UDP to TCP, etc..   That middle ground is what's missing<br>
from (that part of) the library.</blockquote><div><br></div><div>Agreed. For doh-proxy we ended up writing a small asyncio wrapper around dnspython. It is **far** from being great, but it does the job of being able to use  asyncio and dnspython: <a href="https://github.com/facebookexperimental/doh-proxy/blob/master/dohproxy/server_protocol.py#L32">https://github.com/facebookexperimental/doh-proxy/blob/master/dohproxy/server_protocol.py#L32</a><br><br>I am going to cut a GH issue and see if there is any interest in merging this in dnspython as a starting point and then people can iterate on it from there.</div><div><br></div><div>Manu</div></div></div>