f(*args, **kwargs)
finally:
if not previous:
- # If we started the initialzation, establish immutability
+ # If we started the initialization, establish immutability
# by removing the attribute that allows mutation
object.__delattr__(args[0], '_immutable_init')
nf.__signature__ = inspect.signature(f)
return total & 0xffff
class DSDigest(dns.enum.IntEnum):
- """DNSSEC Delgation Signer Digest Algorithm"""
+ """DNSSEC Delegation Signer Digest Algorithm"""
SHA1 = 1
SHA256 = 2
expected to return a key.
*keyname*, a ``dns.name.Name``, ``str`` or ``None``, the name of
- thes TSIG key to use; defaults to ``None``. If *keyring* is a
+ this TSIG key to use; defaults to ``None``. If *keyring* is a
``dict``, the key must be defined in it. If *keyring* is a
``dns.tsig.Key``, this is ignored.
*udp_mode*, a ``dns.query.UDPMode``, determines how UDP is used
for IXFRs. The default is ``dns.UDPMode.NEVER``, i.e. only use
- TCP. Other possibilites are ``dns.UDPMode.TRY_FIRST``, which
+ TCP. Other possibilities are ``dns.UDPMode.TRY_FIRST``, which
means "try UDP but fallback to TCP if needed", and
``dns.UDPMode.ONLY``, which means "try UDP and raise
- ``dns.xfr.UseTCP`` if it does not succeeed.
+ ``dns.xfr.UseTCP`` if it does not succeed.
Raises on errors.
"""
def processing_order(self):
"""Return rdatas in a valid processing order according to the type's
specification. For example, MX records are in preference order from
- lowest to highest preferences, with items of the same perference
+ lowest to highest preferences, with items of the same preference
shuffled.
For types that do not define a processing order, the rdatas are
if not isinstance(v, Param) and v is not None:
raise ValueError("not a Param")
self.params = dns.immutable.Dict(params)
- # Make sure any paramater listed as mandatory is present in the
+ # Make sure any parameter listed as mandatory is present in the
# record.
mandatory = params.get(ParamKey.MANDATORY)
if mandatory:
r.add_rrset(dns.renderer.ANSWER, rrset_2)
r.add_rrset(dns.renderer.AUTHORITY, ns_rrset)
r.add_edns(0, 0, 4096)
- r.add_rrset(dns.renderer.ADDTIONAL, ad_rrset_1)
- r.add_rrset(dns.renderer.ADDTIONAL, ad_rrset_2)
+ r.add_rrset(dns.renderer.ADDITIONAL, ad_rrset_1)
+ r.add_rrset(dns.renderer.ADDITIONAL, ad_rrset_2)
r.write_header()
r.add_tsig(keyname, secret, 300, 1, 0, '', request_mac)
wire = r.get_wire()
"""Query nameservers to find the answer to the question.
This method calls resolve() with ``search=True``, and is
- provided for backwards compatbility with prior versions of
+ provided for backwards compatibility with prior versions of
dnspython. See the documentation for the resolve() method for
further details.
"""
"""Query nameservers to find the answer to the question.
This method calls resolve() with ``search=True``, and is
- provided for backwards compatbility with prior versions of
+ provided for backwards compatibility with prior versions of
dnspython. See the documentation for the resolve() method for
further details.
"""
root servers in your network and they are misconfigured.)
Raises ``dns.resolver.LifetimeTimeout`` if the answer could not be
- found in the alotted lifetime.
+ found in the allotted lifetime.
Returns a ``dns.name.Name``.
"""
*commit*, a bool. If ``True``, commit the transaction, otherwise
roll it back.
- If committing adn the commit fails, then roll back and raise an
+ If committing and the commit fails, then roll back and raise an
exception.
"""
raise NotImplementedError # pragma: no cover
#
# We only wake one sleeper at a time, so it's important
# that no event waiter can exit this method (e.g. via
- # cancelation) without returning a transaction or waking
+ # cancellation) without returning a transaction or waking
# someone else up.
#
# This is not a problem with Threading module threads as
EDNS allows for larger messages and also provides an extension
mechanism for the protocol. EDNS *options* are typed data, and are
-treated much like Rdata. For example, if dnsython encouters the EDNS
+treated much like Rdata. For example, if dnsython encounters the EDNS
``ECS`` option code when parsing a DNS wire format message, it
will create a ``dns.edns.ECSOption`` object to represent it.
An ``int``, the flags.
- .. attribute:: interations:
+ .. attribute:: iterations:
An ``int``, the number of iterations.
An ``int``, the flags.
- .. attribute:: interations:
+ .. attribute:: iterations:
An ``int``, the number of iterations.
.. autoclass:: dns.rdtypes.ANY.URI.URI
:members:
- .. attribute:: priorty
+ .. attribute:: priority
An ``int``, the priority.
.. attribute:: port
- An ``int``, the default DNS port to send to if not overriden by
+ An ``int``, the default DNS port to send to if not overridden by
*nameserver_ports*. The default value is 53.
.. attribute:: nameserver_ports
Dnspython's resolver module implements a "stub resolver", which does DNS
recursion with the aid of a remote "full resolver" provided by an ISP
or other service provider. By default, dnspython will use the full
-resolver specifed by its host system, but another resolver can easily
+resolver specified by its host system, but another resolver can easily
be used simply by setting the *nameservers* attribute.
.. toctree::
them together. It's not a statement that DNSSEC isn't part of the "Core"
of the DNS.
-The IANA `DNS Parameters <http://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml>`_ registry is the offical reference site for all DNS
+The IANA `DNS Parameters <http://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml>`_ registry is the official reference site for all DNS
constants.
except Exception:
# We could try to make a response from only the header
# if dnspython had a header_only option to
- # from_wire(), or if we truncated wire outselves, but
+ # from_wire(), or if we truncated wire ourselves, but
# for now we just drop.
return
try:
self.assertEqual(te.message(), q)
def test_bad_opt(self):
- # Not in addtional
+ # Not in additional
q = dns.message.Message(id=1)
opt = dns.rdtypes.ANY.OPT.OPT(1200, dns.rdatatype.OPT, ())
rrs = dns.rrset.from_rdata(dns.name.root, 0, opt)
def test_bad_tsig(self):
keyname = dns.name.from_text('key.')
- # Not in addtional
+ # Not in additional
q = dns.message.Message(id=1)
tsig = dns.rdtypes.ANY.TSIG.TSIG(dns.rdataclass.ANY, dns.rdatatype.TSIG,
dns.tsig.HMAC_SHA256, 0, 300, b'1234',
def testBadConcatenateRemaining(self):
with self.assertRaises(dns.exception.SyntaxError):
- tok = dns.tokenizer.Tokenizer('a b "not an identifer" c')
+ tok = dns.tokenizer.Tokenizer('a b "not an identifier" c')
tok.concatenate_remaining_identifiers()
def testStdinFilename(self):
self.assertEqual(rrs[0].target, n2008)
def testZoneMiscCases(self):
- # test that leading whitespace folllowed by EOL is treated like
+ # test that leading whitespace followed by EOL is treated like
# a blank line, and that out-of-zone names are dropped.
z1 = dns.zone.from_text(misc_cases_input, 'example.')
z2 = dns.zone.from_text(misc_cases_expected, 'example.')