From: Bob Halley Date: Sat, 9 May 2020 20:50:16 +0000 (-0700) Subject: binary -> bytes, text -> str X-Git-Tag: v2.0.0rc1~242 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=07e81b80e628d5b74580efb00c7caa93c6bd7b9f;p=thirdparty%2Fdnspython.git binary -> bytes, text -> str --- diff --git a/doc/message-class.rst b/doc/message-class.rst index 13e740e5..a4ed049d 100644 --- a/doc/message-class.rst +++ b/doc/message-class.rst @@ -58,7 +58,7 @@ The dns.message.Message Class The TSIG keyring to use. The default is `None`. A TSIG keyring is a dictionary mapping from TSIG key name, a ``dns.name.Name``, to - a TSIG secret, a ``binary``. + a TSIG secret, a ``bytes``. .. attribute:: keyname @@ -72,7 +72,7 @@ The dns.message.Message Class .. attribute:: request_mac - A ``binary``, the TSIG MAC of the request message associated with + A ``bytes``, the TSIG MAC of the request message associated with this message; used when validating TSIG signatures. .. attribute:: fudge @@ -89,12 +89,12 @@ The dns.message.Message Class .. attribute:: other_data - A ``binary``, the TSIG "other data". The default is the empty - ``binary``. + A ``bytes``, the TSIG "other data". The default is the empty + ``bytes``. .. attribute:: mac - A ``binary``, the TSIG MAC for this message. + A ``bytes``, the TSIG MAC for this message. .. attribute:: xfr diff --git a/doc/name-class.rst b/doc/name-class.rst index 49744465..35276ed8 100644 --- a/doc/name-class.rst +++ b/doc/name-class.rst @@ -8,7 +8,7 @@ The dns.name.Name Class and Predefined Names .. attribute:: labels - A tuple of ``binary`` in DNS wire format specifying the DNS + A tuple of ``bytes`` in DNS wire format specifying the DNS labels in the name, in order from least-signficiant label (i.e. farthest from the origin) to most-significant label. diff --git a/doc/name.rst b/doc/name.rst index b1229a50..697ce3a7 100644 --- a/doc/name.rst +++ b/doc/name.rst @@ -5,7 +5,7 @@ DNS Names ========= Objects of the dns.name.Name class represent an immutable domain name. -The representation is a tuple of labels, with each lable being a ``binary`` +The representation is a tuple of labels, with each lable being a ``bytes`` object in the DNS wire format. Typically names are not created by supplying the labels tuple directly, but rather by converting from DNS text format or the DNS wire format. @@ -15,7 +15,7 @@ value for ``www.dnspython.org.`` is ``(b'www', b'dnspython', b'org', b'')`` on Python 3, and ``('www', 'dnspython', 'org', '')`` on Python 2. Names may be *absolute* or *relative*. Absolute names end in the root label, -which is an empty ``binary``. Relative names do not end in the root label. To +which is an empty ``bytes``. Relative names do not end in the root label. To convert a relative name to an absolute name requires specifying an *origin*. Typically the origin is known by context. Dnspython provides tools to relativize and derelativize names. It's a good idea not to mix relative diff --git a/doc/resolver-class.rst b/doc/resolver-class.rst index 5d7df506..d0159a52 100644 --- a/doc/resolver-class.rst +++ b/doc/resolver-class.rst @@ -12,7 +12,7 @@ The dns.resolver.Resolver and dns.resolver.Answer Classes .. attribute:: nameservers - A ``list`` of ``text``, each item containing an IPv4 or IPv6 address. + A ``list`` of ``str``, each item containing an IPv4 or IPv6 address. .. attribute:: search @@ -27,7 +27,7 @@ The dns.resolver.Resolver and dns.resolver.Answer Classes .. attribute:: nameserver_ports - A ``dict`` mapping an IPv4 or IPv6 address ``text`` to an ``int``. + A ``dict`` mapping an IPv4 or IPv6 address ``str`` to an ``int``. This specifies the port to use when sending to a nameserver. If a port is not defined for an address, the value of the *port* attribute will be used. @@ -71,7 +71,7 @@ The dns.resolver.Resolver and dns.resolver.Answer Classes .. attribute:: keyalgorithm - A ``dns.name.Name`` or ``text``, the TSIG algorithm to use. + A ``dns.name.Name`` or ``str``, the TSIG algorithm to use. *edns*, an ``int``, is the EDNS level to use. Specifying ``None``, ``False``, or ``-1`` means "do not use EDNS", and in this case the other parameters are ignored. Specifying