summaryrefslogtreecommitdiff
path: root/dns
diff options
context:
space:
mode:
authorBob Halley <halley@dnspython.org>2020-05-08 07:02:48 -0700
committerBob Halley <halley@dnspython.org>2020-05-08 07:02:48 -0700
commitc8484ecb460ef90a9db6d32eef09542d3e850c57 (patch)
treee27ee464c97472d21e393fa234a7db9af5946423 /dns
parent91adcbf570bf5e00373ae47ceee0cefe684d5b70 (diff)
downloaddnspython-c8484ecb460ef90a9db6d32eef09542d3e850c57.tar.gz
in doco, text->str, binary->bytes
Diffstat (limited to 'dns')
-rw-r--r--dns/e164.py6
-rw-r--r--dns/edns.py6
-rw-r--r--dns/flags.py4
-rw-r--r--dns/inet.py12
-rw-r--r--dns/ipv6.py2
-rw-r--r--dns/message.py18
-rw-r--r--dns/name.py24
-rw-r--r--dns/node.py4
-rw-r--r--dns/opcode.py4
-rw-r--r--dns/query.py36
-rw-r--r--dns/rcode.py4
-rw-r--r--dns/rdata.py12
-rw-r--r--dns/rdatatype.py2
-rw-r--r--dns/resolver.py14
-rw-r--r--dns/reversename.py4
-rw-r--r--dns/ttl.py2
-rw-r--r--dns/update.py6
17 files changed, 80 insertions, 80 deletions
diff --git a/dns/e164.py b/dns/e164.py
index ab14041..d6e695b 100644
--- a/dns/e164.py
+++ b/dns/e164.py
@@ -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.
diff --git a/dns/edns.py b/dns/edns.py
index 6618cca..c90b5ae 100644
--- a/dns/edns.py
+++ b/dns/edns.py
@@ -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.
diff --git a/dns/flags.py b/dns/flags.py
index 0119dec..e5fdd07 100644
--- a/dns/flags.py
+++ b/dns/flags.py
@@ -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)
diff --git a/dns/inet.py b/dns/inet.py
index a1e8f64..a1b0c3e 100644
--- a/dns/inet.py
+++ b/dns/inet.py
@@ -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.
diff --git a/dns/ipv6.py b/dns/ipv6.py
index 43934cd..fca7791 100644
--- a/dns/ipv6.py
+++ b/dns/ipv6.py
@@ -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.
diff --git a/dns/message.py b/dns/message.py
index 72c16be..4e5fec0 100644
--- a/dns/message.py
+++ b/dns/message.py
@@ -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
diff --git a/dns/name.py b/dns/name.py
index 4fb067c..c5a6423 100644
--- a/dns/name.py
+++ b/dns/name.py
@@ -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
diff --git a/dns/node.py b/dns/node.py
index 4f8a16a..8c1802d 100644
--- a/dns/node.py
+++ b/dns/node.py
@@ -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``.
"""
diff --git a/dns/opcode.py b/dns/opcode.py
index c0735ba..dd7b61b 100644
--- a/dns/opcode.py
+++ b/dns/opcode.py
@@ -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)
diff --git a/dns/query.py b/dns/query.py
index 017dcba..4559ba1 100644
--- a/dns/query.py
+++ b/dns/query.py
@@ -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.
diff --git a/dns/rcode.py b/dns/rcode.py
index 2215bef..85f8c2c 100644
--- a/dns/rcode.py
+++ b/dns/rcode.py
@@ -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:
diff --git a/dns/rdata.py b/dns/rdata.py
index dafd4c3..dc2becc 100644
--- a/dns/rdata.py
+++ b/dns/rdata.py
@@ -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.)
diff --git a/dns/rdatatype.py b/dns/rdatatype.py
index 63c8b53..22fa487 100644
--- a/dns/rdatatype.py
+++ b/dns/rdatatype.py
@@ -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.)
diff --git a/dns/resolver.py b/dns/resolver.py
index 456bb6c..6e73294 100644
--- a/dns/resolver.py
+++ b/dns/resolver.py
@@ -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.
diff --git a/dns/reversename.py b/dns/reversename.py
index fd382a5..e0beb03 100644
--- a/dns/reversename.py
+++ b/dns/reversename.py
@@ -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):
diff --git a/dns/ttl.py b/dns/ttl.py
index 2b1ced0..55ae5e1 100644
--- a/dns/ttl.py
+++ b/dns/ttl.py
@@ -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.
diff --git a/dns/update.py b/dns/update.py
index 9e591ae..5647117 100644
--- a/dns/update.py
+++ b/dns/update.py
@@ -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: