Package: src:dnspython
Version: 2.8.0-5
User: [email protected]
Usertags: python3.15
Tags: patch, ftbfs, forky, sid
Hi!
While rebuilding the python related packages against the Python 3.15rc1
version we found that dnspython fails to build from source [1].
I've applied a couple of upstream patches to solve the issue:
- fix testInvalidDigestLengthCDS0 for 3.15 [2]
- IDNA 2008 transitional is even more deprecated in idna 3.19; remove
tests [3]
And I've also added an additional patch to avoid testing the network
against cloudflare as only google is used in the tests.
I applied these fixes in the sandbox [4] to be able to build the
packages that depend on dnspython, please consider applying these
patches to support the upcoming 3.15 version.
Happy hacking,
[1]:
https://debusine.debian.net/debian/r-python-python3.15/work-request/1111989/
[2]:
https://github.com/rthalley/dnspython/commit/d91f1ee30bcc68cb356d13b7c5f14b49e63c58bc
[3]:
https://github.com/rthalley/dnspython/commit/6af77d7e6762f951dd6fcc4018a2cf25a06700cd
[4]: https://debusine.debian.net/debian/r-python-python3.15/
--
"Can you imagine what I would do if I could do all I can?" -- Sun Tzu
Saludos /\/\ /\ >< `/
From: Bob Halley <[email protected]>
Date: Sun, 12 Apr 2026 10:47:20 -0700
Subject: fix testInvalidDigestLengthCDS0 for 3.15
---
tests/test_dnssec.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tests/test_dnssec.py b/tests/test_dnssec.py
index 77bd4fef..b1995034 100644
--- a/tests/test_dnssec.py
+++ b/tests/test_dnssec.py
@@ -1246,11 +1246,12 @@ class DNSSECMakeDSTestCase(unittest.TestCase):
"digest length inconsistent with digest type": ["0 0 0 0000"],
"Odd-length string": ["0 0 0 0", "0 0 0 000"],
}
- for msg, records in test_records.items():
+ for _, records in test_records.items():
for record in records:
with self.assertRaises(dns.exception.SyntaxError) as cm:
dns.rdata.from_text(dns.rdataclass.IN, dns.rdatatype.CDS, record)
- self.assertEqual(msg, str(cm.exception))
+ # we don't test the message because it varies between pre=3.15 and 3.15
+ #self.assertEqual(msg, str(cm.exception))
def testMakeCDS(self): # type: () -> None
name = dns.name.from_text("example.com")
From: Bob Halley <[email protected]>
Date: Thu, 20 Aug 2026 18:06:56 -0700
Subject: IDNA 2008 transitional is even more deprecated in idna 3.19; remove tests
---
tests/test_name.py | 19 -------------------
1 file changed, 19 deletions(-)
diff --git a/tests/test_name.py b/tests/test_name.py
index 40a409c3..dff7b25e 100644
--- a/tests/test_name.py
+++ b/tests/test_name.py
@@ -817,9 +817,6 @@ class NameTestCase(unittest.TestCase):
self.assertRaises(dns.name.IDNAException, bad)
e1 = dns.name.from_unicode(t, idna_codec=dns.name.IDNA_2008)
self.assertEqual(str(e1), "xn--knigsgchen-b4a3dun.")
- c2 = dns.name.IDNA_2008_Transitional
- e2 = dns.name.from_unicode(t, idna_codec=c2)
- self.assertEqual(str(e2), "xn--knigsgsschen-lcb0w.")
@unittest.skipUnless(
dns.name.have_idna_2008, "Python idna cannot be imported; no IDNA2008"
@@ -828,7 +825,7 @@ class NameTestCase(unittest.TestCase):
# the IDN rules for names are very restrictive, disallowing
# practical names like '_sip._tcp.Königsgäßchen'. Dnspython
# has a "practical" mode which permits labels which are purely
- # ASCII to go straight through, and thus not invalid useful
+ # ASCII to go straight through, and thus not invalidate useful
# things in the real world.
t = "_sip._tcp.Königsgäßchen"
@@ -840,13 +837,8 @@ class NameTestCase(unittest.TestCase):
codec = dns.name.IDNA_2008_UTS_46
return dns.name.from_unicode(t, idna_codec=codec)
- def bad3():
- codec = dns.name.IDNA_2008_Transitional
- return dns.name.from_unicode(t, idna_codec=codec)
-
self.assertRaises(dns.name.IDNAException, bad1)
self.assertRaises(dns.name.IDNAException, bad2)
- self.assertRaises(dns.name.IDNAException, bad3)
e = dns.name.from_unicode(t, idna_codec=dns.name.IDNA_2008_Practical)
self.assertEqual(str(e), "_sip._tcp.xn--knigsgchen-b4a3dun.")
@@ -879,17 +871,6 @@ class NameTestCase(unittest.TestCase):
self.assertEqual(str(n), "xn--eckwd4c7c.xn--zckzah.")
self.assertEqual(s, "ドメイン.テスト.")
- @unittest.skipUnless(
- dns.name.have_idna_2008, "Python idna cannot be imported; no IDNA2008"
- )
- def testToUnicode5(self):
- # Exercise UTS 46 remapping in decode. This doesn't normally happen
- # as you can see from us having to instantiate the codec as
- # transitional with strict decoding, not one of our usual choices.
- codec = dns.name.IDNA2008Codec(True, True, False, True)
- n = dns.name.from_text("xn--gro-7ka.com")
- self.assertEqual(n.to_unicode(idna_codec=codec), "gross.com.")
-
@unittest.skipUnless(
dns.name.have_idna_2008, "Python idna cannot be imported; no IDNA2008"
)
Description: Check exact test addresses for network availability
Origin: vendor
Forwarded: no
Index: dnspython/tests/util.py
===================================================================
--- dnspython.orig/tests/util.py
+++ dnspython/tests/util.py
@@ -86,11 +86,9 @@ def is_internet_reachable():
_internet_reachable = False
else:
global _have_ipv4
- _have_ipv4 = check_networking(["8.8.8.8", "1.1.1.1"])
+ _have_ipv4 = check_networking(["8.8.8.8"])
global _have_ipv6
- _have_ipv6 = check_networking(
- ["2001:4860:4860::8888", "2606:4700:4700::1111"]
- )
+ _have_ipv6 = check_networking(["2001:4860:4860::8888"])
_internet_reachable = _have_ipv4 or _have_ipv6
return _internet_reachable