From: Filip Š Date: Tue, 29 Oct 2019 19:47:12 +0000 (+0100) Subject: Rename `doh` method to `https` X-Git-Tag: v2.0.0rc1~345^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c012df98e44b14371d51aaccfb578653e70fc0ca;p=thirdparty%2Fdnspython.git Rename `doh` method to `https` --- diff --git a/dns/query.py b/dns/query.py index fc504666..42bdd471 100644 --- a/dns/query.py +++ b/dns/query.py @@ -207,8 +207,8 @@ def _destination_and_source(af, where, port, source, source_port): return (af, destination, source) -def doh(query, nameserver, post=True): - """Return the response obtained after sending a query via DoH. +def https(query, nameserver, post=True): + """Return the response obtained after sending a query via DNS-over-HTTPS. *query*, a ``dns.message.Message`` containing the query to send diff --git a/dns/query.pyi b/dns/query.pyi index d3d9a48e..c115de99 100644 --- a/dns/query.pyi +++ b/dns/query.pyi @@ -7,7 +7,7 @@ except ImportError: class ssl(object): SSLContext = {} -def doh(query : message.Message, nameserver : str, post=True) -> message.Message: +def https(query : message.Message, nameserver : str, post=True) -> message.Message: pass def tcp(q : message.Message, where : str, timeout : float = None, port=53, af : Optional[int] = None, source : Optional[str] = None, source_port : Optional[int] = 0, diff --git a/dns/resolver.py b/dns/resolver.py index 6f532036..575df4c5 100644 --- a/dns/resolver.py +++ b/dns/resolver.py @@ -909,7 +909,7 @@ class Resolver(object): try: if protocol == 'https': tcp_attempt = True - response = dns.query.doh(request, nameserver) + response = dns.query.https(request, nameserver) else: tcp_attempt = tcp if tcp: