]> git.ipfire.org Git - thirdparty/dnspython.git/log
thirdparty/dnspython.git
2 years agosupport qh3 as well as aioquic qh3
Bob Halley [Thu, 2 Nov 2023 18:29:16 +0000 (11:29 -0700)] 
support qh3 as well as aioquic

2 years agoWhen scanning interfaces with WMI, include networks without a domain. (#999)
noopbug [Wed, 1 Nov 2023 21:20:29 +0000 (16:20 -0500)] 
When scanning interfaces with WMI, include networks without a domain. (#999)

* When scanning interfaces with WMI, include networks without a domain.

* Ignore networks found via wmi that have no nameservers

---------

Co-authored-by: Me <me@shiranpuri.com>
2 years agoAdd QUIC TLS session ticket support.
Bob Halley [Sat, 28 Oct 2023 16:08:00 +0000 (09:08 -0700)] 
Add QUIC TLS session ticket support.

2 years agoFix a race condition in trio quic shutdown.
Bob Halley [Fri, 27 Oct 2023 15:55:10 +0000 (08:55 -0700)] 
Fix a race condition in trio quic shutdown.

It was possible to have a "lost wakeup" situation where we had stuff to
send but the trio worker was blocked indefinitely in the receive.

There is no test for this as the race is very race-y and I can't reproduce it
reliably in the test suite, though I was able to do reliable replication a different
way when debugging.

I also reordered event processing to happen after timer handling but before sending
in the trio and sync quic code.  The async code already worked this way due to its
different struture and needed no changes.

2 years agoThe asyncio quic code did not close politely in clean exit cases.
Bob Halley [Fri, 27 Oct 2023 02:23:27 +0000 (19:23 -0700)] 
The asyncio quic code did not close politely in clean exit cases.

2 years agoThe "address" passed to QUIC receive_datagram() should be a low-level tuple.
Bob Halley [Fri, 27 Oct 2023 01:41:36 +0000 (18:41 -0700)] 
The "address" passed to QUIC receive_datagram() should be a low-level tuple.

Previously we sent just the address part, i.e. lltuple[0], but the
aioquic code intends for the value to be the whole tuple.  This did
not break anything for dnspython as we were consistently wrong and
aioquic is flexible enough with its notion of NetworkAddress for our
purposes that dnspython's mistake had no effect.

2 years agoFix two QUIC issues:
Bob Halley [Sun, 22 Oct 2023 14:12:41 +0000 (07:12 -0700)] 
Fix two QUIC issues:

  1) We treated stream reset like connection terminated, which
     is just wrong.  We should send EOF to the stream but leave
     the connection alone.

  2) When we got an unexpected EOF on a stream, we raised the
     exception in the wrong place, killing the QUIC connection
     but leaving the stream blocked.  Now we deliver the exception
     to the stream and don't kill the connection.

2 years agoCheck that a relative name plus the zone's origin is not too long. (#997)
Bob Halley [Sat, 21 Oct 2023 13:38:54 +0000 (06:38 -0700)] 
Check that a relative name plus the zone's origin is not too long. (#997)

Previously it was possible to add very long relative names to a
relative zone which could never be rendered due to being too long for
wire format.  Now we check this as part of _validate_name().

This code also removes duplicated name validation code from Zone and
Version, consolidating it into one helper function.

Finally, we fix a few comments in get methods that have cut-and-paste
typos from the find variant indicating they can raise KeyError when
they cannot.

2 years agoadd example reading TCP-like stream of wire formats from a file (#995)
Petr Špaček [Fri, 13 Oct 2023 12:08:02 +0000 (14:08 +0200)] 
add example reading TCP-like stream of wire formats from a file (#995)

2 years agogive up on codecov v4 action
Bob Halley [Tue, 10 Oct 2023 19:01:56 +0000 (12:01 -0700)] 
give up on codecov v4 action

2 years agoFix enum inversion.
Brian Wellington [Tue, 10 Oct 2023 18:29:27 +0000 (11:29 -0700)] 
Fix enum inversion.

A change in Python 3.11's enum module caused IntEnum inversion to only
invert the bits associated with the (inferred) range of the flag,
meaning that ~dns.flags.DO only inverted 16 bits.  This meant that
calling want_dnssec(False) on a message would unconditionally set the
EDNS version field to 0.

2 years agoupdate pylint
Bob Halley [Sat, 7 Oct 2023 18:35:56 +0000 (11:35 -0700)] 
update pylint

2 years agoBump codecov/codecov-action from 3 to 4 (#990)
dependabot[bot] [Fri, 29 Sep 2023 16:17:14 +0000 (09:17 -0700)] 
Bump codecov/codecov-action from 3 to 4 (#990)

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2 years agoTest latest 3.12 release and add classifiers (#989)
Hugo van Kemenade [Wed, 13 Sep 2023 01:48:42 +0000 (19:48 -0600)] 
Test latest 3.12 release and add classifiers (#989)

* Test latest 3.12 release

* Update classifiers

2 years agoBump actions/checkout from 3 to 4 (#988)
dependabot[bot] [Mon, 4 Sep 2023 16:26:56 +0000 (09:26 -0700)] 
Bump actions/checkout from 3 to 4 (#988)

Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2 years agotry to fix broken docs
Bob Halley [Tue, 29 Aug 2023 21:11:10 +0000 (14:11 -0700)] 
try to fix broken docs

2 years agodrop cryptography limit (#984)
Jakob Schlyter [Thu, 24 Aug 2023 21:47:33 +0000 (23:47 +0200)] 
drop cryptography limit (#984)

2 years agobuild on 3.12.0rc1 (#979)
Jakob Schlyter [Fri, 11 Aug 2023 01:00:57 +0000 (03:00 +0200)] 
build on 3.12.0rc1 (#979)

2 years agoAdd helpers to reduce seeking boilerplate when rendering. (#980)
Bob Halley [Fri, 11 Aug 2023 00:32:36 +0000 (17:32 -0700)] 
Add helpers to reduce seeking boilerplate when rendering. (#980)

2 years agoadd 2.4.2 changes to whatsnew
Bob Halley [Wed, 9 Aug 2023 13:55:41 +0000 (06:55 -0700)] 
add 2.4.2 changes to whatsnew

2 years agoEnsure async https() requests are bounded in total time
Bob Halley [Tue, 8 Aug 2023 01:16:42 +0000 (18:16 -0700)] 
Ensure async https() requests are bounded in total time
according to the timeout [#978].

Unfortunately we do not currently have a good way to
make this guarantee for sync https() calls.

2 years agotest inception, expiration, and lifetime when signing
Bob Halley [Sun, 6 Aug 2023 17:46:22 +0000 (10:46 -0700)] 
test inception, expiration, and lifetime when signing

2 years agoDNSSEC rrsig_expiration calculation (#977)
Shaft Inc [Sun, 6 Aug 2023 17:33:32 +0000 (19:33 +0200)] 
DNSSEC rrsig_expiration calculation (#977)

The 'rrsig_expiration' calculation did not take into account inception date when using 'lifetime' in the '_sign()' function

2 years agoFix unintended "wait forever" behavior with zero timeouts [#976].
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.

2 years agoUse HTTP2 when possible in https() [#973].
Bob Halley [Sat, 5 Aug 2023 16:42:44 +0000 (09:42 -0700)] 
Use HTTP2 when possible in https() [#973].

This fixes a regression in 2.4.x where we would only
use HTTP/1.1.

2 years agorevert dependabot sphinx change as it is too recent for RTD
Bob Halley [Tue, 25 Jul 2023 19:05:35 +0000 (12:05 -0700)] 
revert dependabot sphinx change as it is too recent for RTD

2 years agoBump sphinx from 4.3.2 to 7.1.0 (#967)
dependabot[bot] [Tue, 25 Jul 2023 18:58:13 +0000 (11:58 -0700)] 
Bump sphinx from 4.3.2 to 7.1.0 (#967)

Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 4.3.2 to 7.1.0.
- [Release notes](https://github.com/sphinx-doc/sphinx/releases)
- [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES)
- [Commits](https://github.com/sphinx-doc/sphinx/compare/v4.3.2...v7.1.0)

---
updated-dependencies:
- dependency-name: sphinx
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2 years agoprepare 2.4.1 whatsnew
Bob Halley [Tue, 25 Jul 2023 14:05:56 +0000 (07:05 -0700)] 
prepare 2.4.1 whatsnew

2 years agoEnsure candidate DNSKEYs have protocol 3 and the ZONE flag set [#966].
Bob Halley [Tue, 25 Jul 2023 14:04:35 +0000 (07:04 -0700)] 
Ensure candidate DNSKEYs have protocol 3 and the ZONE flag set [#966].

2 years agoUpdate wheel requirement from ^0.40.0 to ^0.41.0 (#965)
dependabot[bot] [Mon, 24 Jul 2023 18:17:44 +0000 (11:17 -0700)] 
Update wheel requirement from ^0.40.0 to ^0.41.0 (#965)

Updates the requirements on [wheel](https://github.com/pypa/wheel) to permit the latest version.
- [Changelog](https://github.com/pypa/wheel/blob/main/docs/news.rst)
- [Commits](https://github.com/pypa/wheel/compare/0.40.0...0.41.0)

---
updated-dependencies:
- dependency-name: wheel
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2 years agoDependency cleanups [#963].
Bob Halley [Thu, 20 Jul 2023 20:31:35 +0000 (13:31 -0700)] 
Dependency cleanups [#963].

2 years agowork around windows port binding issues
Bob Halley [Wed, 19 Jul 2023 19:33:22 +0000 (12:33 -0700)] 
work around windows port binding issues

2 years agoFix more issues with asyncio and timeouts [#962].
Bob Halley [Wed, 19 Jul 2023 15:42:58 +0000 (08:42 -0700)] 
Fix more issues with asyncio and timeouts [#962].

2 years agoUse `Sequence` instead of `List` for nameservers, as List is invariant (#961)
av223119 [Wed, 19 Jul 2023 13:44:09 +0000 (15:44 +0200)] 
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

2 years agowhatsnew update for 2.5.0
Bob Halley [Tue, 18 Jul 2023 11:31:23 +0000 (04:31 -0700)] 
whatsnew update for 2.5.0

2 years agosimplify event set
Bob Halley [Tue, 18 Jul 2023 01:19:50 +0000 (18:19 -0700)] 
simplify event set

2 years agoFix DoQ for asyncio IPv6 [#958].
Bob Halley [Mon, 17 Jul 2023 22:24:59 +0000 (15:24 -0700)] 
Fix DoQ for asyncio IPv6 [#958].

2 years agoMake importing dns.dnssecalgs work if cryptography is not installed
Bob Halley [Mon, 17 Jul 2023 12:58:50 +0000 (05:58 -0700)] 
Make importing dns.dnssecalgs work if cryptography is not installed
[#957].

2 years agodisable test failing due to expired certificate
Bob Halley [Sat, 15 Jul 2023 16:14:20 +0000 (09:14 -0700)] 
disable test failing due to expired certificate

2 years ago2.5.0 development versioning.
Bob Halley [Sat, 15 Jul 2023 16:08:51 +0000 (09:08 -0700)] 
2.5.0 development versioning.

2 years agoDo all httpx imports before setting _have_httpx.
Bob Halley [Sat, 15 Jul 2023 15:26:21 +0000 (08:26 -0700)] 
Do all httpx imports before setting _have_httpx.

This gives us the expected test skipping when httpx isn't available
or is too old, vs. the test failures that were happening before
this change.

2 years agoasyncio close could wait forever [#956].
Bob Halley [Fri, 14 Jul 2023 11:50:50 +0000 (04:50 -0700)] 
asyncio close could wait forever [#956].

2 years agoadd some missing DNSSEC RFCs (#955)
Jakob Schlyter [Thu, 13 Jul 2023 00:06:21 +0000 (02:06 +0200)] 
add some missing DNSSEC RFCs (#955)

2 years agoFix a number of timeout bugs with QUIC [#954].
Bob Halley [Thu, 13 Jul 2023 00:05:18 +0000 (17:05 -0700)] 
Fix a number of timeout bugs with QUIC [#954].

2 years agoClarify skip test message in test_doq.py (#952)
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.

2 years agolint
Bob Halley [Sat, 8 Jul 2023 20:00:40 +0000 (13:00 -0700)] 
lint

2 years agoTest passing ssl_context to tls query functions.
Bob Halley [Sat, 8 Jul 2023 19:58:12 +0000 (12:58 -0700)] 
Test passing ssl_context to tls query functions.

2 years agoAvoid mypy checking woes by always using new enough httpcore.
Bob Halley [Fri, 7 Jul 2023 14:59:24 +0000 (07:59 -0700)] 
Avoid mypy checking woes by always using new enough httpcore.

2 years agoIn async TLS do not ignore a ssl_context given as an argument [#951].
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.

2 years agoCope with recent versions of httpcore.
Bob Halley [Fri, 7 Jul 2023 14:25:22 +0000 (07:25 -0700)] 
Cope with recent versions of httpcore.

2 years agoAdd shebang for ecs.py (#950)
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.

Thanks,

Scott K

2 years agoAdd EDE RFC to list.
Bob Halley [Fri, 7 Jul 2023 13:29:05 +0000 (06:29 -0700)] 
Add EDE RFC to list.

2 years agocope with missing httpcore type info
Bob Halley [Thu, 6 Jul 2023 14:55:12 +0000 (07:55 -0700)] 
cope with missing httpcore type info

2 years agoUpdate to Sphinx 7.
Bob Halley [Wed, 5 Jul 2023 22:07:52 +0000 (15:07 -0700)] 
Update to Sphinx 7.

2 years agoFix build from source in README.md [#948].
Bob Halley [Wed, 5 Jul 2023 12:26:02 +0000 (05:26 -0700)] 
Fix build from source in README.md [#948].

2 years agoupdate CI
Bob Halley [Tue, 4 Jul 2023 20:49:01 +0000 (13:49 -0700)] 
update CI

2 years agotry to fix workflow typo
Bob Halley [Tue, 4 Jul 2023 19:28:24 +0000 (12:28 -0700)] 
try to fix workflow typo

2 years agoadd workflow_dispatch for manual start option
Bob Halley [Tue, 4 Jul 2023 19:26:22 +0000 (12:26 -0700)] 
add workflow_dispatch for manual start option

2 years agorun CI on 2.4 branch
Bob Halley [Tue, 4 Jul 2023 19:22:34 +0000 (12:22 -0700)] 
run CI on 2.4 branch

2 years ago2.4 prep: new dirs and python 3.7 is EOL
Bob Halley [Tue, 4 Jul 2023 19:02:24 +0000 (12:02 -0700)] 
2.4 prep: new dirs and python 3.7 is EOL

2 years agouse isort
Bob Halley [Sun, 25 Jun 2023 21:18:10 +0000 (14:18 -0700)] 
use isort

2 years agoDeal with pylint being confused.
Bob Halley [Sun, 25 Jun 2023 21:09:22 +0000 (14:09 -0700)] 
Deal with pylint being confused.

2 years agoAdd dnssecalgs.
Bob Halley [Sun, 25 Jun 2023 21:05:02 +0000 (14:05 -0700)] 
Add dnssecalgs.

2 years agoDNSSEC Algorithm Refactor (#944)
Jakob Schlyter [Sun, 25 Jun 2023 21:01:00 +0000 (23:01 +0200)] 
DNSSEC Algorithm Refactor (#944)

* Split DNSSEC algorithms into separate classes with a registration mechanism.
* Add DNSSEC private algorithm support.

2 years agoFix three problems with DNSSEC: (#946)
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).

* fix issues detected by mypy

2 years agoFix setup race condition in nanoquic.
Bob Halley [Sun, 18 Jun 2023 15:24:29 +0000 (08:24 -0700)] 
Fix setup race condition in nanoquic.

2 years agoBump sphinx-rtd-theme from 1.2.1 to 1.2.2 (#941)
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)

---
updated-dependencies:
- dependency-name: sphinx-rtd-theme
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2 years agoSupport <class> <ttl> <type> in zonefiles [#942].
Bob Halley [Fri, 9 Jun 2023 21:56:29 +0000 (14:56 -0700)] 
Support <class> <ttl> <type> in zonefiles [#942].

2 years agopass policy to rrset_signer (#932)
Jakob Schlyter [Sun, 4 Jun 2023 16:52:37 +0000 (18:52 +0200)] 
pass policy to rrset_signer (#932)

2 years agoUpdate cryptography requirement from >=2.6,<41.0 to >=2.6,<42.0 (#937)
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)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2 years agoBump sphinx-rtd-theme from 1.2.0 to 1.2.1 (#933)
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)

---
updated-dependencies:
- dependency-name: sphinx-rtd-theme
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2 years agoHttpx now has a socket_options parameter in its NetworkBackends.
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.

2 years agotry again to make doco builds work again by upgrading the build image
Bob Halley [Sun, 7 May 2023 16:33:25 +0000 (09:33 -0700)] 
try again to make doco builds work again by upgrading the build image

2 years agotry to make doco builds work again by upgrading the build image
Bob Halley [Sun, 7 May 2023 16:31:00 +0000 (09:31 -0700)] 
try to make doco builds work again by upgrading the build image

2 years agomore requests cleanup
Bob Halley [Sun, 7 May 2023 16:30:44 +0000 (09:30 -0700)] 
more requests cleanup

2 years agoDeal with "in" changes for enums in python 3.12
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.

2 years agoAdd support for ruff linter.
Bob Halley [Sat, 6 May 2023 14:16:32 +0000 (07:16 -0700)] 
Add support for ruff linter.

2 years agoFix NSEC3 base32 processing. (#929)
Brian Wellington [Sat, 6 May 2023 14:15:32 +0000 (07:15 -0700)] 
Fix NSEC3 base32 processing. (#929)

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.

2 years agoresolve_at() type fixes
Bob Halley [Wed, 19 Apr 2023 15:55:51 +0000 (08:55 -0700)] 
resolve_at() type fixes

2 years agoAdd make_resolver_at() and resolve_at(). (#926)
Bob Halley [Wed, 19 Apr 2023 15:51:16 +0000 (08:51 -0700)] 
Add make_resolver_at() and resolve_at(). (#926)

2 years agosimplify DDR text
Bob Halley [Sun, 9 Apr 2023 18:19:54 +0000 (11:19 -0700)] 
simplify DDR text

2 years agoRemove unnecessary string concatenation.
Brian Wellington [Tue, 11 Apr 2023 18:05:16 +0000 (11:05 -0700)] 
Remove unnecessary string concatenation.

2 years agoNote 3.8 as the minimum for 2.4 (3.7 is EOL at the end of June).
Bob Halley [Fri, 7 Apr 2023 13:51:36 +0000 (06:51 -0700)] 
Note 3.8 as the minimum for 2.4 (3.7 is EOL at the end of June).

2 years agoAdd basic DDR support. (#919)
Bob Halley [Fri, 7 Apr 2023 13:44:22 +0000 (06:44 -0700)] 
Add basic DDR support. (#919)

* Add basic DDR support.

2 years agoMessage get_rrset() needs to pass idna_codec to find_rrset().
Bob Halley [Thu, 6 Apr 2023 13:06:24 +0000 (06:06 -0700)] 
Message get_rrset() needs to pass idna_codec to find_rrset().
Also removes some lint about "section = section" being a no-op.

2 years agorun black on enum.py
Bob Halley [Thu, 6 Apr 2023 13:04:18 +0000 (06:04 -0700)] 
run black on enum.py

2 years agoEnum typing (#923)
Brian Wellington [Thu, 6 Apr 2023 13:03:07 +0000 (06:03 -0700)] 
Enum typing (#923)

* IntEnum improvements.

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.

2 years agoImprove get_rrset/find_rrset API. (#922)
Brian Wellington [Thu, 6 Apr 2023 13:01:59 +0000 (06:01 -0700)] 
Improve get_rrset/find_rrset API. (#922)

* Improve get_rrset/find_rrset API.

This allows most of the parameters to be specified as strings, matching
the interface for dns.message.make_query().

* Remove unneeded "the_section".

There's no need to use a separate internal variable for the section;
mypy doesn't complain about reuse.

2 years agoBump readthedocs-sphinx-search from 0.2.0 to 0.3.1 (#920)
dependabot[bot] [Sun, 2 Apr 2023 15:41:47 +0000 (08:41 -0700)] 
Bump readthedocs-sphinx-search from 0.2.0 to 0.3.1 (#920)

Bumps [readthedocs-sphinx-search](https://github.com/readthedocs/readthedocs-sphinx-search) from 0.2.0 to 0.3.1.
- [Release notes](https://github.com/readthedocs/readthedocs-sphinx-search/releases)
- [Changelog](https://github.com/readthedocs/readthedocs-sphinx-search/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/readthedocs/readthedocs-sphinx-search/commits)

---
updated-dependencies:
- dependency-name: readthedocs-sphinx-search
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2 years agoAdd some missing resolver doco.
Bob Halley [Sun, 2 Apr 2023 15:41:23 +0000 (08:41 -0700)] 
Add some missing resolver doco.

2 years agorun black
Bob Halley [Thu, 30 Mar 2023 13:29:20 +0000 (06:29 -0700)] 
run black

2 years agoClean up the NoDOH exception.
Brian Wellington [Tue, 28 Mar 2023 17:53:18 +0000 (10:53 -0700)] 
Clean up the NoDOH exception.

The docstring/default should refer to httpx, not requests, and the
callers should use it rather than providing alternate (and different)
strings.

2 years agoAdd server_hostname to DoQNameserver.
Bob Halley [Sun, 26 Mar 2023 19:34:32 +0000 (12:34 -0700)] 
Add server_hostname to DoQNameserver.

2 years agolint
Bob Halley [Sun, 26 Mar 2023 19:29:51 +0000 (12:29 -0700)] 
lint

2 years agoOptionally allow server hostname to be checked by QUIC.
Bob Halley [Sun, 26 Mar 2023 19:28:02 +0000 (12:28 -0700)] 
Optionally allow server hostname to be checked by QUIC.

2 years agoUpdate cryptography requirement from >=2.6,<40.0 to >=2.6,<41.0 (#917)
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)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2 years agoNote DNSSEC zone signing (NSEC) is now available.
Bob Halley [Tue, 21 Mar 2023 21:04:16 +0000 (14:04 -0700)] 
Note DNSSEC zone signing (NSEC) is now available.

2 years agoZone signer (#911)
Jakob Schlyter [Tue, 21 Mar 2023 01:14:59 +0000 (02:14 +0100)] 
Zone signer (#911)

* first cut at NSEC support

* use transactions, fix delegations

* rename to add_nsec_to_zone

* optimize NSEC generation

* split out function to get all secure names (could be useful for NSEC3 later)

* add `Bitmap.from_rdtypes()` and add missing typing

* more typing

* add missing import

* add more typing

* fix tok type

* remove _get_secure_names, optimize

* better zone testing (compare as text)
add test example with delegation below other delegation

* include NSEC itself in the bitmap

* lint

* Add names iteration to transactions via iterate_names().

Also make rdataset iteration more obvious by adding an
explicit iterate_rdatasets() API.

* use iterate_names()

* typo

* black

* use single iteration

* better type fix

* add optional transaction to add_nsec_to_zone

* idea for zone signer

* do not sign RRSIGs

* fix signer

* correctly sign DS

* simplify

* simplify by passing rrset to signer

* fix typing

* nit

* add DS

* add more test

* rewrite zone signer

* compact

* simplify

* make easier to read

* bring back rrset_signer

* move default RRset signer

* more

* more

* prettier context handling (mypy issue pending)

* make NSEC zone signer less complex

* update

* fix txn, sign as defined by SEP

* docs

* add back missing dnskey_include

* rename dnskey_include to add_dnskey

* check KSK/ZSK key tags in signed zone

---------

Co-authored-by: Bob Halley <halley@dnspython.org>
2 years agolinting + have asyncio HTTP code actually connect to right address
Bob Halley [Sun, 19 Mar 2023 16:49:25 +0000 (09:49 -0700)] 
linting + have asyncio HTTP code actually connect to right address

2 years agore-run black
Bob Halley [Sun, 19 Mar 2023 16:31:03 +0000 (09:31 -0700)] 
re-run black