]> git.ipfire.org Git - thirdparty/dnspython.git/commit
Resolver "nameserver" object support. (#897)
authorBob Halley <halley@dnspython.org>
Sat, 25 Feb 2023 19:43:26 +0000 (11:43 -0800)
committerGitHub <noreply@github.com>
Sat, 25 Feb 2023 19:43:26 +0000 (11:43 -0800)
commitf7daeb87eac0a2727d5366cdff02fe08843678dd
treec38eab2e322ec02cde716a1aa9b70271a4594174
parentc76de3e1f2de416694353aa158545689f72cedca
Resolver "nameserver" object support. (#897)

* Resolver "nameserver" object support.

This turns the list of nameserver strings in the resolver into a tuple
of nameserver objects, which abstract away making queries to a
nameserver of a given type.

The resolver's legacy nameserver list is "enriched" into a tuple of
nameserver objects whenever it is set.  Note that you cannot mutate
the object other than by setting,
e.g. res.nameservers.append("1.2.3.4") will not work.

Error message accumulation has been updated to refer to the
nameservers using a descriptive text form.

* doco fix

* more doco fixes

* do enrichment at Resolution time

* require a later mypy, fix type issues

* add nameserver doc
dns/asyncresolver.py
dns/nameserver.py [new file with mode: 0644]
dns/resolver.py
doc/resolver-class.rst
doc/resolver-nameserver.rst [new file with mode: 0644]
doc/resolver.rst
doc/whatsnew.rst
pyproject.toml
tests/test_resolution.py
tests/test_resolver.py