]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
in doco, text->str, binary->bytes
authorBob Halley <halley@dnspython.org>
Fri, 8 May 2020 14:02:48 +0000 (07:02 -0700)
committerBob Halley <halley@dnspython.org>
Fri, 8 May 2020 14:02:48 +0000 (07:02 -0700)
17 files changed:
dns/e164.py
dns/edns.py
dns/flags.py
dns/inet.py
dns/ipv6.py
dns/message.py
dns/name.py
dns/node.py
dns/opcode.py
dns/query.py
dns/rcode.py
dns/rdata.py
dns/rdatatype.py
dns/resolver.py
dns/reversename.py
dns/ttl.py
dns/update.py

index ab14041d699698cd8b0a62c47f59ed5df0ef7b72..d6e695b0c8be946f38ff0d6e2e8a07a951990aa9 100644 (file)
@@ -32,7 +32,7 @@ def from_e164(text, origin=public_enum_domain):
     Non-digits in the text are ignored, i.e. "16505551212",
     "+1.650.555.1212" and "1 (650) 555-1212" are all the same.
 
-    *text*, a ``text``, is an E.164 number in textual form.
+    *text*, a ``str``, is an E.164 number in textual form.
 
     *origin*, a ``dns.name.Name``, the domain in which the number
     should be constructed.  The default is ``e164.arpa.``.
@@ -62,7 +62,7 @@ def to_e164(name, origin=public_enum_domain, want_plus_prefix=True):
     *want_plus_prefix* is a ``bool``.  If True, add a '+' to the beginning of
     the returned number.
 
-    Returns a ``text``.
+    Returns a ``str``.
 
     """
     if origin is not None:
@@ -82,7 +82,7 @@ def query(number, domains, resolver=None):
 
     e.g. lookup('16505551212', ['e164.dnspython.org.', 'e164.arpa.'])
 
-    *number*, a ``text`` is the number to look for.
+    *number*, a ``str`` is the number to look for.
 
     *domains* is an iterable containing ``dns.name.Name`` values.
 
index 6618ccae2154b72d194b6292dff35a3d81ec0f99..c90b5aea4104269372fb3c4d5e73f3b9048cdb4b 100644 (file)
@@ -65,7 +65,7 @@ class Option(object):
 
         *otype*, an ``int``, is the option type.
 
-        *wire*, a ``binary``, is the wire-format message.
+        *wire*, a ``bytes``, is the wire-format message.
 
         *current*, an ``int``, is the offset in *wire* of the beginning
         of the rdata.
@@ -159,7 +159,7 @@ class ECSOption(Option):
     """EDNS Client Subnet (ECS, RFC7871)"""
 
     def __init__(self, address, srclen=None, scopelen=0):
-        """*address*, a ``text``, is the client address information.
+        """*address*, a ``str``, is the client address information.
 
         *srclen*, an ``int``, the source prefix length, which is the
         leftmost number of bits of the address to be used for the
@@ -309,7 +309,7 @@ def option_from_wire(otype, wire, current, olen):
 
     *otype*, an ``int``, is the option type.
 
-    *wire*, a ``binary``, is the wire-format message.
+    *wire*, a ``bytes``, is the wire-format message.
 
     *current*, an ``int``, is the offset in *wire* of the beginning
     of the rdata.
index 0119dec71feb20a0cc03d81defa734570beda9c8..e5fdd0750d6d23e7a2f2f10b4b4c06b7dea70ded 100644 (file)
@@ -104,7 +104,7 @@ def to_text(flags):
     """Convert a flags value into a space-separated list of flag text
     values.
 
-    Returns a ``text``.
+    Returns a ``str``.
     """
 
     return _to_text(flags, _by_value, _flags_order)
@@ -124,7 +124,7 @@ def edns_to_text(flags):
     """Convert an EDNS flags value into a space-separated list of EDNS flag
     text values.
 
-    Returns a ``text``.
+    Returns a ``str``.
     """
 
     return _to_text(flags, _edns_by_value, _edns_flags_order)
index a1e8f6484fb360ccc56bc8c394ce29ec94655f8e..a1b0c3e1176f9c92477b5e09d95d3bb3154384f0 100644 (file)
@@ -41,12 +41,12 @@ def inet_pton(family, text):
 
     *family* is an ``int``, the address family.
 
-    *text* is a ``text``, the textual address.
+    *text* is a ``str``, the textual address.
 
     Raises ``NotImplementedError`` if the address family specified is not
     implemented.
 
-    Returns a ``binary``.
+    Returns a ``bytes``.
     """
 
     if family == AF_INET:
@@ -62,12 +62,12 @@ def inet_ntop(family, address):
 
     *family* is an ``int``, the address family.
 
-    *address* is a ``binary``, the network address in binary form.
+    *address* is a ``bytes``, the network address in binary form.
 
     Raises ``NotImplementedError`` if the address family specified is not
     implemented.
 
-    Returns a ``text``.
+    Returns a ``str``.
     """
 
     if family == AF_INET:
@@ -81,7 +81,7 @@ def inet_ntop(family, address):
 def af_for_address(text):
     """Determine the address family of a textual-form network address.
 
-    *text*, a ``text``, the textual address.
+    *text*, a ``str``, the textual address.
 
     Raises ``ValueError`` if the address family cannot be determined
     from the input.
@@ -103,7 +103,7 @@ def af_for_address(text):
 def is_multicast(text):
     """Is the textual-form network address a multicast address?
 
-    *text*, a ``text``, the textual address.
+    *text*, a ``str``, the textual address.
 
     Raises ``ValueError`` if the address family cannot be determined
     from the input.
index 43934cd490075d73f708d2821bb7a23a481a55be..fca77912b220025a709b6675e11a8581d0d6e924 100644 (file)
@@ -99,7 +99,7 @@ _colon_colon_end = re.compile(br'.*::$')
 def inet_aton(text, ignore_scope=False):
     """Convert an IPv6 address in text form to binary form.
 
-    *text*, a ``text``, the IPv6 address in textual form.
+    *text*, a ``str``, the IPv6 address in textual form.
 
     *ignore_scope*, a ``bool``.  If ``True``, a scope will be ignored.
     If ``False``, the default, it is an error for a scope to be present.
index 72c16befb392d6319e798556377ce6998fe69aa1..4e5fec08d8b2965b422fc37591830b648b3933c8 100644 (file)
@@ -128,7 +128,7 @@ class Message(object):
         The *origin*, *relativize*, and any other keyword
         arguments are passed to the RRset ``to_wire()`` method.
 
-        Returns a ``text``.
+        Returns a ``str``.
         """
 
         s = io.StringIO()
@@ -406,7 +406,7 @@ class Message(object):
 
         Raises ``dns.exception.TooBig`` if *max_size* was exceeded.
 
-        Returns a ``binary``.
+        Returns a ``bytes``.
         """
 
         if max_size == 0:
@@ -464,7 +464,7 @@ class Message(object):
 
         *tsig_error*, an ``int``, the TSIG error code.
 
-        *other_data*, a ``binary``, the TSIG other data.
+        *other_data*, a ``bytes``, the TSIG other data.
 
         *algorithm*, a ``dns.name.Name``, the TSIG algorithm to use.
         """
@@ -769,7 +769,7 @@ def from_wire(wire, keyring=None, request_mac=b'', xfr=False, origin=None,
 
     *keyring*, a ``dict``, the keyring to use if the message is signed.
 
-    *request_mac*, a ``binary``.  If the message is a response to a
+    *request_mac*, a ``bytes``.  If the message is a response to a
     TSIG-signed request, *request_mac* should be set to the MAC of
     that request.
 
@@ -1017,7 +1017,7 @@ def from_text(text, idna_codec=None):
     facilitate reading multiple messages from a single file with
     ``dns.message.from_file()``.
 
-    *text*, a ``text``, the text format message.
+    *text*, a ``str``, the text format message.
 
     *idna_codec*, a ``dns.name.IDNACodec``, specifies the IDNA
     encoder/decoder.  If ``None``, the default IDNA 2003 encoder/decoder
@@ -1047,7 +1047,7 @@ def from_file(f):
 
     Message blocks are separated by a single blank line.
 
-    *f*, a ``file`` or ``text``.  If *f* is text, it is treated as the
+    *f*, a ``file`` or ``str``.  If *f* is text, it is treated as the
     pathname of a file to open.
 
     Raises ``dns.message.UnknownHeaderField`` if a header is unknown.
@@ -1074,11 +1074,11 @@ def make_query(qname, rdtype, rdclass=dns.rdataclass.IN, use_edns=None,
     The query will have a randomly chosen query id, and its DNS flags
     will be set to dns.flags.RD.
 
-    qname, a ``dns.name.Name`` or ``text``, the query name.
+    qname, a ``dns.name.Name`` or ``str``, the query name.
 
-    *rdtype*, an ``int`` or ``text``, the desired rdata type.
+    *rdtype*, an ``int`` or ``str``, the desired rdata type.
 
-    *rdclass*, an ``int`` or ``text``,  the desired rdata class; the default
+    *rdclass*, an ``int`` or ``str``,  the desired rdata class; the default
     is class IN.
 
     *use_edns*, an ``int``, ``bool`` or ``None``.  The EDNS level to use; the
index 4fb067cf6a0ab5fa3d9ffb6a2387b36bc2016f7b..c5a64233cdee974dc825178f9190b5e72f95ae06 100644 (file)
@@ -291,8 +291,8 @@ def _validate_labels(labels):
 
 
 def _maybe_convert_to_binary(label):
-    """If label is ``text``, convert it to ``binary``.  If it is already
-    ``binary`` just return it.
+    """If label is ``str``, convert it to ``bytes``.  If it is already
+    ``bytes`` just return it.
 
     """
 
@@ -308,14 +308,14 @@ class Name(object):
     """A DNS name.
 
     The dns.name.Name class represents a DNS name as a tuple of
-    labels.  Each label is a `binary` in DNS wire format.  Instances
+    labels.  Each label is a ``bytes`` in DNS wire format.  Instances
     of the class are immutable.
     """
 
     __slots__ = ['labels']
 
     def __init__(self, labels):
-        """*labels* is any iterable whose values are ``text`` or ``binary``.
+        """*labels* is any iterable whose values are ``str`` or ``bytes``.
         """
 
         labels = [_maybe_convert_to_binary(x) for x in labels]
@@ -532,7 +532,7 @@ class Name(object):
         dot (denoting the root label) for absolute names.  The default
         is False.
 
-        Returns a ``text``.
+        Returns a ``str``.
         """
 
         if len(self.labels) == 0:
@@ -561,7 +561,7 @@ class Name(object):
         don't want checking for compliance, you can use this decoder
         for IDNA2008 as well.
 
-        Returns a ``text``.
+        Returns a ``str``.
         """
 
         if len(self.labels) == 0:
@@ -590,7 +590,7 @@ class Name(object):
         Raises ``dns.name.NeedAbsoluteNameOrOrigin`` if the name is
         relative and no origin was provided.
 
-        Returns a ``binary``.
+        Returns a ``bytes``.
         """
 
         if not self.is_absolute():
@@ -608,7 +608,7 @@ class Name(object):
         """Convert name to wire format, possibly compressing it.
 
         *file* is the file where the name is emitted (typically an
-        io.BytesIO file).  If ``None`` (the default), a ``binary``
+        io.BytesIO file).  If ``None`` (the default), a ``bytes``
         containing the wire name will be returned.
 
         *compress*, a ``dict``, is the compression table to use.  If
@@ -621,7 +621,7 @@ class Name(object):
         Raises ``dns.name.NeedAbsoluteNameOrOrigin`` if the name is
         relative and no origin was provided.
 
-        Returns a ``binary`` or ``None``.
+        Returns a ``bytes`` or ``None``.
         """
 
         if file is None:
@@ -793,7 +793,7 @@ def from_unicode(text, origin=root, idna_codec=None):
     Labels are encoded in IDN ACE form according to rules specified by
     the IDNA codec.
 
-    *text*, a ``text``, is the text to convert into a name.
+    *text*, a ``str``, is the text to convert into a name.
 
     *origin*, a ``dns.name.Name``, specifies the origin to
     append to non-absolute names.  The default is the root name.
@@ -870,7 +870,7 @@ def is_all_ascii(text):
 def from_text(text, origin=root, idna_codec=None):
     """Convert text into a Name object.
 
-    *text*, a ``text``, is the text to convert into a name.
+    *text*, a ``str``, is the text to convert into a name.
 
     *origin*, a ``dns.name.Name``, specifies the origin to
     append to non-absolute names.  The default is the root name.
@@ -953,7 +953,7 @@ def from_text(text, origin=root, idna_codec=None):
 def from_wire(message, current):
     """Convert possibly compressed wire format into a Name.
 
-    *message* is a ``binary`` containing an entire DNS message in DNS
+    *message* is a ``bytes`` containing an entire DNS message in DNS
     wire form.
 
     *current*, an ``int``, is the offset of the beginning of the name
index 4f8a16acae75ffd12e188162a0ac95c9a1dc229d..8c1802d5e291645d30ca5da7c059aa898554063c 100644 (file)
@@ -40,10 +40,10 @@ class Node(object):
         Each rdataset at the node is printed.  Any keyword arguments
         to this method are passed on to the rdataset's to_text() method.
 
-        *name*, a ``dns.name.Name`` or ``text``, the owner name of the
+        *name*, a ``dns.name.Name`` or ``str``, the owner name of the
         rdatasets.
 
-        Returns a ``text``.
+        Returns a ``str``.
 
         """
 
index c0735ba47b2cc4a43609a662955d4ff7b4cdd9da..dd7b61b1d7e3a3ca27b37d8526fbc387a9f3d1fe 100644 (file)
@@ -52,7 +52,7 @@ class UnknownOpcode(dns.exception.DNSException):
 def from_text(text):
     """Convert text into an opcode.
 
-    *text*, a ``text``, the textual opcode
+    *text*, a ``str``, the textual opcode
 
     Raises ``dns.opcode.UnknownOpcode`` if the opcode is unknown.
 
@@ -99,7 +99,7 @@ def to_text(value):
 
     Raises ``dns.opcode.UnknownOpcode`` if the opcode is unknown.
 
-    Returns a ``text``.
+    Returns a ``str``.
     """
 
     text = _by_value.get(value)
index 017dcba19d71d929aab163feb2fff5522b042f02..4559ba136e64ec73e4c8421f2df7f0e28e19b23c 100644 (file)
@@ -273,7 +273,7 @@ def https(q, where, timeout=None, port=443, af=None, source=None, source_port=0,
     *bootstrap_address*, a ``str``, the IP address to use to bypass the
     system's DNS resolver.
 
-    *verify*, a ``str`, containing a path to a certificate file or directory.
+    *verify*, a ``str``, containing a path to a certificate file or directory.
 
     Returns a ``dns.message.Message``.
     """
@@ -349,7 +349,7 @@ def send_udp(sock, what, destination, expiration=None):
 
     *sock*, a ``socket``.
 
-    *what*, a ``binary`` or ``dns.message.Message``, the message to send.
+    *what*, a ``bytes`` or ``dns.message.Message``, the message to send.
 
     *destination*, a destination tuple appropriate for the address family
     of the socket, specifying where to send the query.
@@ -391,7 +391,7 @@ def receive_udp(sock, destination, expiration=None,
 
     *keyring*, a ``dict``, the keyring to use for TSIG.
 
-    *request_mac*, a ``binary``, the MAC of the request (for TSIG).
+    *request_mac*, a ``bytes``, the MAC of the request (for TSIG).
 
     *ignore_trailing*, a ``bool``.  If ``True``, ignore trailing
     junk at end of the received message.
@@ -426,7 +426,7 @@ def udp(q, where, timeout=None, port=53, af=None, source=None, source_port=0,
 
     *q*, a ``dns.message.Message``, the query to send
 
-    *where*, a ``text`` containing an IPv4 or IPv6 address,  where
+    *where*, a ``str`` containing an IPv4 or IPv6 address,  where
     to send the message.
 
     *timeout*, a ``float`` or ``None``, the number of seconds to wait before the
@@ -439,7 +439,7 @@ def udp(q, where, timeout=None, port=53, af=None, source=None, source_port=0,
     *where*.  If the inference attempt fails, AF_INET is used.  This
     parameter is historical; you need never set it.
 
-    *source*, a ``text`` containing an IPv4 or IPv6 address, specifying
+    *source*, a ``str`` containing an IPv4 or IPv6 address, specifying
     the source address.  The default is the wildcard address.
 
     *source_port*, an ``int``, the port from which to send the message.
@@ -530,7 +530,7 @@ def send_tcp(sock, what, expiration=None):
 
     *sock*, a ``socket``.
 
-    *what*, a ``binary`` or ``dns.message.Message``, the message to send.
+    *what*, a ``bytes`` or ``dns.message.Message``, the message to send.
 
     *expiration*, a ``float`` or ``None``, the absolute time at which
     a timeout exception should be raised.  If ``None``, no timeout will
@@ -566,7 +566,7 @@ def receive_tcp(sock, expiration=None, one_rr_per_rrset=False,
 
     *keyring*, a ``dict``, the keyring to use for TSIG.
 
-    *request_mac*, a ``binary``, the MAC of the request (for TSIG).
+    *request_mac*, a ``bytes``, the MAC of the request (for TSIG).
 
     *ignore_trailing*, a ``bool``.  If ``True``, ignore trailing
     junk at end of the received message.
@@ -610,7 +610,7 @@ def tcp(q, where, timeout=None, port=53, af=None, source=None, source_port=0,
 
     *q*, a ``dns.message.Message``, the query to send
 
-    *where*, a ``text`` containing an IPv4 or IPv6 address,  where
+    *where*, a ``str`` containing an IPv4 or IPv6 address,  where
     to send the message.
 
     *timeout*, a ``float`` or ``None``, the number of seconds to wait before the
@@ -623,7 +623,7 @@ def tcp(q, where, timeout=None, port=53, af=None, source=None, source_port=0,
     *where*.  If the inference attempt fails, AF_INET is used.  This
     parameter is historical; you need never set it.
 
-    *source*, a ``text`` containing an IPv4 or IPv6 address, specifying
+    *source*, a ``str`` containing an IPv4 or IPv6 address, specifying
     the source address.  The default is the wildcard address.
 
     *source_port*, an ``int``, the port from which to send the message.
@@ -673,7 +673,7 @@ def tls(q, where, timeout=None, port=853, af=None, source=None, source_port=0,
 
     *q*, a ``dns.message.Message``, the query to send
 
-    *where*, a ``text`` containing an IPv4 or IPv6 address,  where
+    *where*, a ``str`` containing an IPv4 or IPv6 address,  where
     to send the message.
 
     *timeout*, a ``float`` or ``None``, the number of seconds to wait before the
@@ -686,7 +686,7 @@ def tls(q, where, timeout=None, port=853, af=None, source=None, source_port=0,
     *where*.  If the inference attempt fails, AF_INET is used.  This
     parameter is historical; you need never set it.
 
-    *source*, a ``text`` containing an IPv4 or IPv6 address, specifying
+    *source*, a ``str`` containing an IPv4 or IPv6 address, specifying
     the source address.  The default is the wildcard address.
 
     *source_port*, an ``int``, the port from which to send the message.
@@ -702,7 +702,7 @@ def tls(q, where, timeout=None, port=853, af=None, source=None, source_port=0,
     a TLS connection. If ``None``, the default, creates one with the default
     configuration.
 
-    *server_hostname*, a ``text`` containing the server's hostname.  The
+    *server_hostname*, a ``str`` containing the server's hostname.  The
     default is ``None``, which means that no hostname is known, and if an
     SSL context is created, hostname checking will be disabled.
 
@@ -760,13 +760,13 @@ def xfr(where, zone, rdtype=dns.rdatatype.AXFR, rdclass=dns.rdataclass.IN,
     *where*.  If the inference attempt fails, AF_INET is used.  This
     parameter is historical; you need never set it.
 
-    *zone*, a ``dns.name.Name`` or ``text``, the name of the zone to transfer.
+    *zone*, a ``dns.name.Name`` or ``str``, the name of the zone to transfer.
 
-    *rdtype*, an ``int`` or ``text``, the type of zone transfer.  The
+    *rdtype*, an ``int`` or ``str``, the type of zone transfer.  The
     default is ``dns.rdatatype.AXFR``.  ``dns.rdatatype.IXFR`` can be
     used to do an incremental transfer instead.
 
-    *rdclass*, an ``int`` or ``text``, the class of the zone transfer.
+    *rdclass*, an ``int`` or ``str``, the class of the zone transfer.
     The default is ``dns.rdataclass.IN``.
 
     *timeout*, a ``float``, the number of seconds to wait for each
@@ -776,7 +776,7 @@ def xfr(where, zone, rdtype=dns.rdatatype.AXFR, rdclass=dns.rdataclass.IN,
 
     *keyring*, a ``dict``, the keyring to use for TSIG.
 
-    *keyname*, a ``dns.name.Name`` or ``text``, the name of the TSIG
+    *keyname*, a ``dns.name.Name`` or ``str``, the name of the TSIG
     key to use.
 
     *relativize*, a ``bool``.  If ``True``, all names in the zone will be
@@ -793,7 +793,7 @@ def xfr(where, zone, rdtype=dns.rdatatype.AXFR, rdclass=dns.rdataclass.IN,
     doing the transfer.  If ``None``, the default, then there is no
     limit on the time the transfer may take.
 
-    *source*, a ``text`` containing an IPv4 or IPv6 address, specifying
+    *source*, a ``str`` containing an IPv4 or IPv6 address, specifying
     the source address.  The default is the wildcard address.
 
     *source_port*, an ``int``, the port from which to send the message.
@@ -805,7 +805,7 @@ def xfr(where, zone, rdtype=dns.rdatatype.AXFR, rdclass=dns.rdataclass.IN,
 
     *use_udp*, a ``bool``.  If ``True``, use UDP (only meaningful for IXFR).
 
-    *keyalgorithm*, a ``dns.name.Name`` or ``text``, the TSIG algorithm to use.
+    *keyalgorithm*, a ``dns.name.Name`` or ``str``, the TSIG algorithm to use.
 
     Raises on errors, and so does the generator.
 
index 2215bef140dae010d1ae1427171687b1943c5f5b..85f8c2cb824497d5fa5fbe1bfde01faec0f82316 100644 (file)
@@ -73,7 +73,7 @@ class UnknownRcode(dns.exception.DNSException):
 def from_text(text):
     """Convert text into an rcode.
 
-    *text*, a ``text``, the textual rcode or an integer in textual form.
+    *text*, a ``str``, the textual rcode or an integer in textual form.
 
     Raises ``dns.rcode.UnknownRcode`` if the rcode mnemonic is unknown.
 
@@ -132,7 +132,7 @@ def to_text(value):
 
     Raises ``ValueError`` if rcode is < 0 or > 4095.
 
-    Returns a ``text``.
+    Returns a ``str``.
     """
 
     if value < 0 or value > 4095:
index dafd4c3be5b69d41746b961a89ff3745b5bcb220..dc2beccdf4c27107bdb7670e679ea3abb0d1b977 100644 (file)
@@ -153,7 +153,7 @@ class Rdata(object):
     def to_text(self, origin=None, relativize=True, **kw):
         """Convert an rdata to text format.
 
-        Returns a ``text``.
+        Returns a ``str``.
         """
 
         raise NotImplementedError
@@ -179,7 +179,7 @@ class Rdata(object):
         """Convert rdata to a format suitable for digesting in hashes.  This
         is also the DNSSEC canonical form.
 
-        Returns a ``binary``.
+        Returns a ``bytes``.
         """
 
         f = io.BytesIO()
@@ -403,14 +403,14 @@ def from_text(rdclass, rdtype, tok, origin=None, relativize=True,
     Once a class is chosen, its from_text() class method is called
     with the parameters to this function.
 
-    If *tok* is a ``text``, then a tokenizer is created and the string
+    If *tok* is a ``str``, then a tokenizer is created and the string
     is used as its input.
 
     *rdclass*, an ``int``, the rdataclass.
 
     *rdtype*, an ``int``, the rdatatype.
 
-    *tok*, a ``dns.tokenizer.Tokenizer`` or a ``text``.
+    *tok*, a ``dns.tokenizer.Tokenizer`` or a ``str``.
 
     *origin*, a ``dns.name.Name`` (or ``None``), the
     origin to use for relative names.
@@ -467,7 +467,7 @@ def from_wire(rdclass, rdtype, wire, current, rdlen, origin=None):
 
     *rdtype*, an ``int``, the rdatatype.
 
-    *wire*, a ``binary``, the wire-format message.
+    *wire*, a ``bytes``, the wire-format message.
 
     *current*, an ``int``, the offset in wire of the beginning of
     the rdata.
@@ -501,7 +501,7 @@ def register_type(implementation, rdtype, rdtype_text, is_singleton=False,
 
     *rdtype*, an ``int``, the rdatatype to register.
 
-    *rdtype_text*, a ``text``, the textual form of the rdatatype.
+    *rdtype_text*, a ``str``, the textual form of the rdatatype.
 
     *is_singleton*, a ``bool``, indicating if the type is a singleton (i.e.
     RRsets of the type can have only one member.)
index 63c8b5307d702bf517499563ae178f47e2f1f8e7..22fa4873ac90388e5feb678ae4144548f0e7ec4c 100644 (file)
@@ -280,7 +280,7 @@ def register_type(rdtype, rdtype_text, is_singleton=False):  # pylint: disable=r
 
     *rdtype*, an ``int``, the rdatatype to register.
 
-    *rdtype_text*, a ``text``, the textual form of the rdatatype.
+    *rdtype_text*, a ``str``, the textual form of the rdatatype.
 
     *is_singleton*, a ``bool``, indicating if the type is a singleton (i.e.
     RRsets of the type can have only one member.)
index 456bb6c469c4cc72cb0c31bd141eb54baabe1512..6e732947769072795a4eac7aec28f93b3e8da5a2 100644 (file)
@@ -494,7 +494,7 @@ class Resolver(object):
     """DNS stub resolver."""
 
     def __init__(self, filename='/etc/resolv.conf', configure=True):
-        """*filename*, a ``text`` or file object, specifying a file
+        """*filename*, a ``str`` or file object, specifying a file
         in standard /etc/resolv.conf format.  This parameter is meaningful
         only when *configure* is true and the platform is POSIX.
 
@@ -558,7 +558,7 @@ class Resolver(object):
 
     def read_resolv_conf(self, f):
         """Process *f* as a file in the /etc/resolv.conf format.  If f is
-        a ``text``, it is used as the name of the file to open; otherwise it
+        a ``str``, it is used as the name of the file to open; otherwise it
         is treated as the file itself.
 
         Interprets the following items:
@@ -814,15 +814,15 @@ class Resolver(object):
         of the appropriate type, or strings that can be converted into objects
         of the appropriate type.
 
-        *qname*, a ``dns.name.Name`` or ``text``, the query name.
+        *qname*, a ``dns.name.Name`` or ``str``, the query name.
 
-        *rdtype*, an ``int`` or ``text``,  the query type.
+        *rdtype*, an ``int`` or ``str``,  the query type.
 
-        *rdclass*, an ``int`` or ``text``,  the query class.
+        *rdclass*, an ``int`` or ``str``,  the query class.
 
         *tcp*, a ``bool``.  If ``True``, use TCP to make the query.
 
-        *source*, a ``text`` or ``None``.  If not ``None``, bind to this IP
+        *source*, a ``str`` or ``None``.  If not ``None``, bind to this IP
         address when making queries.
 
         *raise_on_no_answer*, a ``bool``.  If ``True``, raise
@@ -1166,7 +1166,7 @@ def query(qname, rdtype=dns.rdatatype.A, rdclass=dns.rdataclass.IN,
 def zone_for_name(name, rdclass=dns.rdataclass.IN, tcp=False, resolver=None):
     """Find the name of the zone which contains the specified name.
 
-    *name*, an absolute ``dns.name.Name`` or ``text``, the query name.
+    *name*, an absolute ``dns.name.Name`` or ``str``, the query name.
 
     *rdclass*, an ``int``, the query class.
 
index fd382a55b0be440fb387f493bc3655b4ec8b9770..e0beb03df95131b2bd258fef1d7d39d8ee135d05 100644 (file)
@@ -32,7 +32,7 @@ def from_address(text, v4_origin=ipv4_reverse_domain,
     """Convert an IPv4 or IPv6 address in textual form into a Name object whose
     value is the reverse-map domain name of the address.
 
-    *text*, a ``text``, is an IPv4 or IPv6 address in textual form
+    *text*, a ``str``, is an IPv4 or IPv6 address in textual form
     (e.g. '127.0.0.1', '::1')
 
     *v4_origin*, a ``dns.name.Name`` to append to the labels corresponding to
@@ -79,7 +79,7 @@ def to_address(name, v4_origin=ipv4_reverse_domain,
     Raises ``dns.exception.SyntaxError`` if the name does not have a
     reverse-map form.
 
-    Returns a ``text``.
+    Returns a ``str``.
     """
 
     if name.is_subdomain(v4_origin):
index 2b1ced0a5dcef3806c4db853e745e70f75bceabc..55ae5e1650362811993969ee62b1a6b5f942e499 100644 (file)
@@ -29,7 +29,7 @@ def from_text(text):
 
     The BIND 8 units syntax for TTLs (e.g. '1w6d4h3m10s') is supported.
 
-    *text*, a ``text``, the textual TTL.
+    *text*, a ``str``, the textual TTL.
 
     Raises ``dns.ttl.BadTTL`` if the TTL is not well-formed.
 
index 9e591ae3fa20e386837afbb17f9ea1bfc152f4ed..56471173b3f8b85fa1026a9a213f62300a95ff96 100644 (file)
@@ -36,10 +36,10 @@ class Update(dns.message.Message):
         See the documentation of the Message class for a complete
         description of the keyring dictionary.
 
-        *zone*, a ``dns.name.Name`` or ``text``, the zone which is being
+        *zone*, a ``dns.name.Name`` or ``str``, the zone which is being
         updated.
 
-        *rdclass*, an ``int`` or ``text``, the class of the zone.
+        *rdclass*, an ``int`` or ``str``, the class of the zone.
 
         *keyring*, a ``dict``, the TSIG keyring to use.  If a
         *keyring* is specified but a *keyname* is not, then the key
@@ -270,7 +270,7 @@ class Update(dns.message.Message):
         output; default is 0, which means "the message's request
         payload, if nonzero, or 65535".
 
-        Returns a ``binary``.
+        Returns a ``bytes``.
         """
 
         if origin is None: