Commit fb06bbd0b5 for bind
commit fb06bbd0b537a8a019174e15a9266e62b7a0998d
Author: Michal Nowak <mnowak@isc.org>
Date: Fri Oct 9 09:41:50 2026 +0000
Require dnspython 2.9.0 for the system tests
dnspython 2.9.0 parses the legacy SIG type from text, supports the BRID
and HHIT types and reads an APL record with no items, so the
RRSIG-to-SIG re-wrapping workaround and the xfer zone filters for those
records can go. The DSYNC, RESINFO and WALLET filters were already
unnecessary with 2.8.0; the records all of them dropped are added to
the expected AXFR responses.
SIG rdatas now report their covered type, so dnspython refuses to keep
SIGs covering different types in one RRset. ans11 serves them as
separate RRsets, which is the same set of RRs on the wire.
dnspython 2.9.0 needs Python 3.11, so raise that minimum, and request
the dnssec extra so that dnspython carries its own cryptography
minimum.
Assisted-by: Claude:claude-opus-5-5
diff --git a/bin/tests/system/README.md b/bin/tests/system/README.md
index 8f201f36dc..9c1678c844 100644
--- a/bin/tests/system/README.md
+++ b/bin/tests/system/README.md
@@ -72,7 +72,7 @@ compiled build directory.
To run system tests, make sure you have the following dependencies installed:
-- python3 (3.10 and newer)
+- python3 (3.11 and newer)
- pytest (7.0 and newer)
- pytest-xdist
- perl (still needed by the test runner internals; some legacy tests
diff --git a/bin/tests/system/conftest.py b/bin/tests/system/conftest.py
index 6ca1e38589..96a67f25e9 100644
--- a/bin/tests/system/conftest.py
+++ b/bin/tests/system/conftest.py
@@ -25,7 +25,20 @@ import pytest
pytest.register_assert_rewrite("isctest")
+# Check the prerequisites before importing isctest, which itself fails to
+# import on an older Python or misbehaves with an older dnspython.
+if sys.version_info < (3, 11):
+ raise RuntimeError("Python 3.11 or newer is required to run system tests.")
+
# pylint: disable=wrong-import-position
+import dns.version
+
+if (dns.version.MAJOR, dns.version.MINOR, dns.version.MICRO) < (2, 9, 0):
+ raise RuntimeError(
+ "dnspython 2.9.0 or newer is required to run system tests "
+ f"(found {dns.version.version})."
+ )
+
from isctest.vars.build import SYSTEM_TEST_DIR_GIT_PATH
import isctest
@@ -91,9 +104,6 @@ except ImportError:
def pytest_configure(config): # pylint: disable=unused-argument
- if sys.version_info < (3, 10):
- raise RuntimeError("Python 3.10 or newer is required to run system tests.")
-
isctest.log.init_conftest_logger()
isctest.log.avoid_duplicated_logs()
isctest.check.is_executable(
diff --git a/bin/tests/system/nsupdate/ans11/ans.py b/bin/tests/system/nsupdate/ans11/ans.py
index 8cc8cf80d1..318501b793 100644
--- a/bin/tests/system/nsupdate/ans11/ans.py
+++ b/bin/tests/system/nsupdate/ans11/ans.py
@@ -10,7 +10,6 @@
# information regarding copyright ownership.
import dns.rcode
-import dns.rdata
import dns.rdataclass
import dns.rdatatype
import dns.rrset
@@ -36,24 +35,14 @@ def soa() -> dns.rrset.RRset:
)
-def sig_rdata(covers: dns.rdatatype.RdataType) -> dns.rdata.Rdata:
- """
- dnspython cannot parse the legacy SIG (24) type from text; parse the
- text as RRSIG (46), which shares its wire format, and re-wrap as SIG.
- """
+def sig(covers: dns.rdatatype.RdataType) -> dns.rrset.RRset:
covered = dns.rdatatype.to_text(covers)
- text = f"{covered} 6 2 600 20260331170000 20260318160000 21831 . 0000"
- rrsig = dns.rdata.from_text(dns.rdataclass.IN, dns.rdatatype.RRSIG, text)
- wire = rrsig.to_digestable()
- return dns.rdata.from_wire(dns.rdataclass.IN, dns.rdatatype.SIG, wire, 0, len(wire))
-
-
-def sig(owner: str = f"host.{ZONE}") -> dns.rrset.RRset:
- return dns.rrset.from_rdata(
- owner,
+ return dns.rrset.from_text(
+ f"host.{ZONE}",
600,
- sig_rdata(dns.rdatatype.A),
- sig_rdata(dns.rdatatype.MX),
+ dns.rdataclass.IN,
+ dns.rdatatype.SIG,
+ f"{covered} 6 2 600 20260331170000 20260318160000 21831 . 0000",
)
@@ -75,7 +64,10 @@ class SigAxfrHandler(AxfrHandler):
zone_contents = [
rrset(ZONE, dns.rdatatype.NS, NS_NAME),
rrset(NS_NAME, dns.rdatatype.A, ANS11.ip),
- sig(),
+ # dnspython rejects SIG rdatas with different covered types in one
+ # RRset, so each gets its own; on the wire they are separate RRs anyway.
+ sig(dns.rdatatype.A),
+ sig(dns.rdatatype.MX),
]
final_soa = soa()
diff --git a/bin/tests/system/nsupdate/tests_update_sig.py b/bin/tests/system/nsupdate/tests_update_sig.py
index 8cc20f6e39..5cc0a73821 100644
--- a/bin/tests/system/nsupdate/tests_update_sig.py
+++ b/bin/tests/system/nsupdate/tests_update_sig.py
@@ -63,19 +63,6 @@ pytestmark = pytest.mark.extra_artifacts(
)
-def _make_sig_rdata(text):
- """
- Create a SIG rdata from text.
-
- dnspython has no native text parser for the legacy SIG type (24),
- but the wire format is identical to RRSIG (46). Parse as RRSIG,
- then re-wrap as SIG via the wire representation.
- """
- rrsig = dns.rdata.from_text(dns.rdataclass.IN, dns.rdatatype.RRSIG, text)
- wire = rrsig.to_digestable()
- return dns.rdata.from_wire(dns.rdataclass.IN, dns.rdatatype.SIG, wire, 0, len(wire))
-
-
def _make_nxt_rdata():
"""
Create a minimal NXT rdata.
@@ -107,7 +94,11 @@ def test_tcp_self_sig_record(ns6):
)
assert response.rcode() == dns.rcode.NOERROR
- sig = _make_sig_rdata("A 6 0 86400 20260331170000 20260318160000 21831 . 0000")
+ sig = dns.rdata.from_text(
+ dns.rdataclass.IN,
+ dns.rdatatype.SIG,
+ "A 6 0 86400 20260331170000 20260318160000 21831 . 0000",
+ )
rds = dns.rdataset.Rdataset(dns.rdataclass.IN, dns.rdatatype.SIG)
rds.update_ttl(600)
rds.add(sig)
@@ -272,7 +263,11 @@ def test_prereq_sig_record(ns1):
# Now require a SIG record at the same node — this triggers the
# dns_db_findrdataset() call with type=SIG and covers=A.
- sig = _make_sig_rdata("A 6 0 86400 20260331170000 20260318160000 21831 . 0000")
+ sig = dns.rdata.from_text(
+ dns.rdataclass.IN,
+ dns.rdatatype.SIG,
+ "A 6 0 86400 20260331170000 20260318160000 21831 . 0000",
+ )
rds = dns.rdataset.Rdataset(dns.rdataclass.IN, dns.rdatatype.SIG)
rds.update_ttl(0)
rds.add(sig)
diff --git a/bin/tests/system/requirements.txt b/bin/tests/system/requirements.txt
index 1d694afb3d..9153581cbb 100644
--- a/bin/tests/system/requirements.txt
+++ b/bin/tests/system/requirements.txt
@@ -1,6 +1,6 @@
### Test requirements
-dnspython==2.8.0
+dnspython[dnssec]==2.9.0
cryptography
gssapi
diff --git a/bin/tests/system/xfer/response1.good b/bin/tests/system/xfer/response1.good
index e031deaad2..a597b4d13d 100644
--- a/bin/tests/system/xfer/response1.good
+++ b/bin/tests/system/xfer/response1.good
@@ -19,11 +19,13 @@ amtrelay03.example. 3600 IN AMTRELAY 0 0 1 0.0.0.0
amtrelay04.example. 3600 IN AMTRELAY 0 0 2 ::
amtrelay05.example. 3600 IN AMTRELAY 0 0 3 example.net.
apl01.example. 3600 IN APL !1:10.0.0.1/32 1:10.0.0.0/24
+apl02.example. 3600 IN APL \# 0
atma01.example. 3600 IN TYPE34 \# 12 013631323030303030303030
atma02.example. 3600 IN TYPE34 \# 12 013631323030303030303030
atma03.example. 3600 IN TYPE34 \# 9 001234567890abcdef
atma04.example. 3600 IN TYPE34 \# 9 00fedcba0987654321
avc.example. 3600 IN AVC "foo:bar"
+brid.example. 3600 IN BRID abcd
caa01.example. 3600 IN CAA 0 issue "ca.example.net; policy=ev"
caa02.example. 3600 IN CAA 128 tbs "Unknown"
caa03.example. 3600 IN CAA 128 tbs ""
@@ -55,11 +57,13 @@ ds01.example. 3600 IN DS 12892 5 2 26584835ca80c81c91999f31cfaf2a0e89d4ff1c8fafd
ds01.example. 3600 IN NS ns42.example.
ds02.example. 3600 IN DS 12892 5 1 7aa4a3f416c2f2391fb7ab0d434f762cd62d1390
ds02.example. 3600 IN NS ns43.example.
+dsync01.example. 3600 IN DSYNC CDS NOTIFY 53 .
eid01.example. 3600 IN TYPE31 \# 3 1289ab
eui48.example. 3600 IN EUI48 01-23-45-67-89-ab
eui64.example. 3600 IN EUI64 01-23-45-67-89-ab-cd-ef
gid01.example. 3600 IN TYPE102 \# 1 03
gpos01.example. 3600 IN GPOS -22.6882 116.8652 250.0
+hhit.example. 3600 IN HHIT abcd
hinfo01.example. 3600 IN HINFO "Generic PC clone" "NetBSD-1.4"
hinfo02.example. 3600 IN HINFO "PC" "NetBSD"
hip1.example. 3600 IN HIP 2 200100107b1a74df365639cc39f1d578 AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQb1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D
@@ -128,6 +132,7 @@ openpgpkey.example. 3600 IN OPENPGPKEY AQMFD5raczCJHViKtLYhWGz8hMY9UGRuniJDBzC7w
ptr01.example. 3600 IN PTR example.
px01.example. 3600 IN PX 65535 foo. bar.
px02.example. 3600 IN PX 65535 . .
+resinfo.example. 3600 IN RESINFO "qnamemin" "exterr=15,16,17" "infourl=https://resolver.example.com/guide"
rkey01.example. 3600 IN TYPE57 \# 111 0000ff010103050f9ada7330891d588a b4b621586cfc84c63d50646e9e224307 30bbc34691cb3599ae23ba8b6a1d1965 9056e719a8a56c10d5bdd48396e2faae 76780f66c6371af43fc5503cffba7216 3e9bec4b206bad33c865ba2c57bdafc9 faa5a1eb946e688ea7f405aa874fef
rp01.example. 3600 IN RP mbox-dname.example. txt-dname.example.
rp02.example. 3600 IN RP . .
@@ -171,6 +176,10 @@ unspec01.example. 3600 IN UNSPEC \# 1 04
uri01.example. 3600 IN URI 10 20 "https://www.isc.org/"
uri02.example. 3600 IN URI 30 40 "https://www.isc.org/HolyCowThisSureIsAVeryLongURIRecordIDontEvenKnowWhatSomeoneWouldEverWantWithSuchAThingButTheSpecificationRequiresThatWesupportItSoHereWeGoTestingItLaLaLaLaLaLaLaSeriouslyThoughWhyWouldYouEvenConsiderUsingAURIThisLongItSeemsLikeASillyIdeaButEnhWhatAreYouGonnaDo/"
uri03.example. 3600 IN URI 30 40 " "
+wallet.example. 3600 IN WALLET "currency-identifer" "wallet-identifier"
+wallet-multiple.example. 3600 IN WALLET "currency-identifer1" "wallet-identifier1"
+wallet-multiple.example. 3600 IN WALLET "currency-identifer1" "wallet-identifier2"
+wallet-multiple.example. 3600 IN WALLET "currency-identifer2" "wallet-identifier3"
wks01.example. 3600 IN WKS 10.0.0.1 6 0 1 2 21 23
wks02.example. 3600 IN WKS 10.0.0.1 17 0 1 2 53
wks03.example. 3600 IN WKS 10.0.0.2 6 65535
diff --git a/bin/tests/system/xfer/response2.good b/bin/tests/system/xfer/response2.good
index ac3b7ea47b..1716c07081 100644
--- a/bin/tests/system/xfer/response2.good
+++ b/bin/tests/system/xfer/response2.good
@@ -19,11 +19,13 @@ amtrelay03.example. 3600 IN AMTRELAY 0 0 1 0.0.0.1
amtrelay04.example. 3600 IN AMTRELAY 0 0 2 ::
amtrelay05.example. 3600 IN AMTRELAY 0 0 3 example.net.
apl01.example. 3600 IN APL !1:10.0.0.1/32 1:10.0.0.0/24
+apl02.example. 3600 IN APL \# 0
atma01.example. 3600 IN TYPE34 \# 12 013631323030303030303030
atma02.example. 3600 IN TYPE34 \# 12 013631323030303030303030
atma03.example. 3600 IN TYPE34 \# 9 001234567890abcdef
atma04.example. 3600 IN TYPE34 \# 9 00fedcba0987654321
avc.example. 3600 IN AVC "foo:bar"
+brid.example. 3600 IN BRID abcd
caa01.example. 3600 IN CAA 0 issue "ca.example.net; policy=ev"
caa02.example. 3600 IN CAA 128 tbs "Unknown"
caa03.example. 3600 IN CAA 128 tbs ""
@@ -55,11 +57,13 @@ ds01.example. 3600 IN DS 12892 5 2 26584835ca80c81c91999f31cfaf2a0e89d4ff1c8fafd
ds01.example. 3600 IN NS ns42.example.
ds02.example. 3600 IN DS 12892 5 1 7aa4a3f416c2f2391fb7ab0d434f762cd62d1390
ds02.example. 3600 IN NS ns43.example.
+dsync01.example. 3600 IN DSYNC CDS NOTIFY 53 .
eid01.example. 3600 IN TYPE31 \# 3 1289ab
eui48.example. 3600 IN EUI48 01-23-45-67-89-ab
eui64.example. 3600 IN EUI64 01-23-45-67-89-ab-cd-ef
gid01.example. 3600 IN TYPE102 \# 1 03
gpos01.example. 3600 IN GPOS -22.6882 116.8652 250.0
+hhit.example. 3600 IN HHIT abcd
hinfo01.example. 3600 IN HINFO "Generic PC clone" "NetBSD-1.4"
hinfo02.example. 3600 IN HINFO "PC" "NetBSD"
hip1.example. 3600 IN HIP 2 200100107b1a74df365639cc39f1d578 AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQb1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D
@@ -128,6 +132,7 @@ openpgpkey.example. 3600 IN OPENPGPKEY AQMFD5raczCJHViKtLYhWGz8hMY9UGRuniJDBzC7w
ptr01.example. 3600 IN PTR example.
px01.example. 3600 IN PX 65535 foo. bar.
px02.example. 3600 IN PX 65535 . .
+resinfo.example. 3600 IN RESINFO "qnamemin" "exterr=15,16,17" "infourl=https://resolver.example.com/guide"
rkey01.example. 3600 IN TYPE57 \# 111 0000ff010103050f9ada7330891d588a b4b621586cfc84c63d50646e9e224307 30bbc34691cb3599ae23ba8b6a1d1965 9056e719a8a56c10d5bdd48396e2faae 76780f66c6371af43fc5503cffba7216 3e9bec4b206bad33c865ba2c57bdafc9 faa5a1eb946e688ea7f405aa874fef
rp01.example. 3600 IN RP mbox-dname.example. txt-dname.example.
rp02.example. 3600 IN RP . .
@@ -171,6 +176,10 @@ unspec01.example. 3600 IN UNSPEC \# 1 04
uri01.example. 3600 IN URI 10 20 "https://www.isc.org/"
uri02.example. 3600 IN URI 30 40 "https://www.isc.org/HolyCowThisSureIsAVeryLongURIRecordIDontEvenKnowWhatSomeoneWouldEverWantWithSuchAThingButTheSpecificationRequiresThatWesupportItSoHereWeGoTestingItLaLaLaLaLaLaLaSeriouslyThoughWhyWouldYouEvenConsiderUsingAURIThisLongItSeemsLikeASillyIdeaButEnhWhatAreYouGonnaDo/"
uri03.example. 3600 IN URI 30 40 " "
+wallet.example. 3600 IN WALLET "currency-identifer" "wallet-identifier"
+wallet-multiple.example. 3600 IN WALLET "currency-identifer1" "wallet-identifier1"
+wallet-multiple.example. 3600 IN WALLET "currency-identifer1" "wallet-identifier2"
+wallet-multiple.example. 3600 IN WALLET "currency-identifer2" "wallet-identifier3"
wks01.example. 3600 IN WKS 10.0.0.1 6 0 1 2 21 23
wks02.example. 3600 IN WKS 10.0.0.1 17 0 1 2 53
wks03.example. 3600 IN WKS 10.0.0.2 6 65535
diff --git a/bin/tests/system/xfer/setup.sh b/bin/tests/system/xfer/setup.sh
index cb037d3871..c50e3c4494 100644
--- a/bin/tests/system/xfer/setup.sh
+++ b/bin/tests/system/xfer/setup.sh
@@ -15,22 +15,13 @@
dnspython_genzone() (
servers="$@"
- # Drop unusual RR sets and RR types (AMTRELAY, GPOS, apl02) that dnspython
- # can't handle. For more information see
+ # Drop unusual RR sets (AMTRELAY, GPOS) that dnspython can't handle.
+ # For more information see
# https://github.com/rthalley/dnspython/issues/1034#issuecomment-1896541899.
- # - BRID and HHIT are not supported by dnspython at all.
- # - dnspython v2.8.0 adds support for DSYNC RR type
- # - dnspython v2.7.0 adds support for RESINFO and WALLET RR types
$SHELL "${TOP_SRCDIR}/bin/tests/system/genzone.sh" $servers \
| sed \
-e '/AMTRELAY.*\# 2 0004/d' \
- -e '/BRID/d' \
- -e '/DSYNC/d' \
-e '/GPOS.*"" "" ""/d' \
- -e '/HHIT/d' \
- -e '/RESINFO/d' \
- -e '/WALLET/d' \
- -e '/apl02/d' \
| tr "\t" " "
)
diff --git a/pyproject.toml b/pyproject.toml
index acd54a5d27..49f0178327 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -96,7 +96,7 @@ ignore_names = [
]
[tool.ruff]
-target-version = "py310"
+target-version = "py311"
lint.select = [
# import order
"I",