Bob Halley [Sat, 5 Aug 2023 20:35:29 +0000 (13:35 -0700)]
Fix unintended "wait forever" behavior with zero timeouts [#976].
In a few places we did "if timeout:" or "if expiration:" when we
really meant "if timeout is not None:". This meant that in the zero
timeout case we fell into the "wait forever" path instead of
immediately timing out. In the case of UDP queries, we'd be waiting
on recvfrom() and if a packet was lost, then the code would never wake
up.
Use `Sequence` instead of `List` for nameservers, as List is invariant (#961)
without this, resolver.nameservers = string.split() produces mypy error, see
https://mypy.readthedocs.io/en/stable/common_issues.html#invariance-vs-covariance
Scott Kitterman [Sat, 8 Jul 2023 20:02:31 +0000 (16:02 -0400)]
Clarify skip test message in test_doq.py (#952)
While the current message is technically correct, nanoquic isn't actually what's missing, so it would be clearer to point to the fact that aioquic isn't found, since that's the issue someone can actually do something about.
Bob Halley [Fri, 7 Jul 2023 14:29:08 +0000 (07:29 -0700)]
In async TLS do not ignore a ssl_context given as an argument [#951].
The async TLS code would always fail if given an ssl_context instead
of making one, as it set the passed paramter to None and then called
into the async socket backend, which would make a regular TCP socket
(i.e. no TLS), which would be rejected by the server as it wasn't
using TLS.
Scott Kitterman [Fri, 7 Jul 2023 13:29:39 +0000 (09:29 -0400)]
Add shebang for ecs.py (#950)
I know this is trivial, but the Debian QA tools get slightly grumpy when there's no shebang for an executable script, so it would make things slightly easier for me if you would add this.
Bob Halley [Sat, 24 Jun 2023 14:27:25 +0000 (07:27 -0700)]
Fix three problems with DNSSEC: (#946)
* Fix three problems with DNSSEC:
1) Signing a relative zone didn't quite work.
2) The signer generated the wrong RRSIG labels length for a wild name.
3) The validator failed to detect 2).
dependabot[bot] [Fri, 9 Jun 2023 21:58:10 +0000 (14:58 -0700)]
Bump sphinx-rtd-theme from 1.2.1 to 1.2.2 (#941)
Bumps [sphinx-rtd-theme](https://github.com/readthedocs/sphinx_rtd_theme) from 1.2.1 to 1.2.2.
- [Changelog](https://github.com/readthedocs/sphinx_rtd_theme/blob/master/docs/changelog.rst)
- [Commits](https://github.com/readthedocs/sphinx_rtd_theme/compare/1.2.1...1.2.2)
dependabot[bot] [Wed, 31 May 2023 17:06:47 +0000 (10:06 -0700)]
Update cryptography requirement from >=2.6,<41.0 to >=2.6,<42.0 (#937)
Updates the requirements on [cryptography](https://github.com/pyca/cryptography) to permit the latest version.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/2.6...41.0.0)
dependabot[bot] [Sun, 28 May 2023 21:00:32 +0000 (14:00 -0700)]
Bump sphinx-rtd-theme from 1.2.0 to 1.2.1 (#933)
Bumps [sphinx-rtd-theme](https://github.com/readthedocs/sphinx_rtd_theme) from 1.2.0 to 1.2.1.
- [Changelog](https://github.com/readthedocs/sphinx_rtd_theme/blob/master/docs/changelog.rst)
- [Commits](https://github.com/readthedocs/sphinx_rtd_theme/compare/1.2.0...1.2.1)
Bob Halley [Sun, 28 May 2023 20:58:27 +0000 (13:58 -0700)]
Httpx now has a socket_options parameter in its NetworkBackends.
We accept this parameter if it is given, but do not actually do
anything with it. In theory this shouldn't be a problem as we're
never passing it either in the cases where we use our backends.
Bob Halley [Sat, 6 May 2023 18:21:36 +0000 (11:21 -0700)]
Deal with "in" changes for enums in python 3.12
In python 3.12, "in" for enums tests values as well, so something
like "12345 in dns.rdatatype.RdataType" will now return True. This
broke some logic guarding against registering a known-but-unimplmemented
type code point with a class that didn't have the right name. We now
just give up on this test as it will never be a real problem. We change
a few related tests to be more sensible.
The NSEC3 next name field is defined as base32 with no padding, but the
code was doing base32 decoding with padding. This wouldn't have any
effect in the normal case, since the only defined NSEC3 hashing
algorithm is SHA1, and that generates a 160 bit hash that doesn't
require padding when encoded in base32.
This change removes generated padding after encode, rejects padded input
on decode, and adds necessary padding for decode.
This changes make() to always return an instance of the subclass,
creating one on the fly if the value is not known, and updates the typ
registration code to deal with this. It also adds typing annotations to
make().
* Add missing int check.
Some older versions of python weren't rejecting non-int values.
* Fix int check.
Raise TypeError for non-int, not ValueError, to make tests happy.
* Annotate to_text/from_text.
* Remove many the_ prefixed variables.
These were needed in the past to work around typing issues.
dependabot[bot] [Fri, 24 Mar 2023 17:58:39 +0000 (10:58 -0700)]
Update cryptography requirement from >=2.6,<40.0 to >=2.6,<41.0 (#917)
Updates the requirements on [cryptography](https://github.com/pyca/cryptography) to permit the latest version.
- [Release notes](https://github.com/pyca/cryptography/releases)
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/2.6...40.0.0)
dependabot[bot] [Tue, 14 Mar 2023 20:26:35 +0000 (13:26 -0700)]
Update wheel requirement from ^0.38.1 to ^0.40.0 (#910)
Updates the requirements on [wheel](https://github.com/pypa/wheel) to permit the latest version.
- [Release notes](https://github.com/pypa/wheel/releases)
- [Changelog](https://github.com/pypa/wheel/blob/main/docs/news.rst)
- [Commits](https://github.com/pypa/wheel/compare/0.38.1...0.40.0)
Bob Halley [Tue, 7 Mar 2023 15:20:46 +0000 (07:20 -0800)]
Remove the DSA signature test, as it can fail in certain
OpenSSL 3 with the FIPS 140-3 module, as the module will not
generate keys with a "q" size that is representable in DNSSEC.
Bob Halley [Sat, 25 Feb 2023 19:43:26 +0000 (11:43 -0800)]
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.
dependabot[bot] [Wed, 1 Feb 2023 16:27:14 +0000 (08:27 -0800)]
Update black requirement from ^22.1.0 to ^23.1.0 (#892)
Updates the requirements on [black](https://github.com/psf/black) to permit the latest version.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/22.1.0...23.1.0)
---
updated-dependencies:
- dependency-name: black
dependency-type: direct:development
...
Dennis Værum [Wed, 25 Jan 2023 17:06:49 +0000 (18:06 +0100)]
The DS digest_type field is now made a DSDigest instance by the constructor (#890)
Hey @rthalley
I found another place in the code there, you may have gotten "distracted" 😉 as you phrased it in
https://github.com/rthalley/dnspython/issues/888#issuecomment-1402198449