| 1 |
From: Bob Halley <[email protected]> |
| 2 |
Date: Thu, 20 Aug 2026 18:06:56 -0700 |
| 3 |
Subject: IDNA 2008 transitional is even more deprecated in idna 3.19; |
| 4 |
remove tests |
| 5 |
|
| 6 |
--- |
| 7 |
tests/test_name.py | 21 +-------------------- |
| 8 |
1 file changed, 1 insertion(+), 20 deletions(-) |
| 9 |
|
| 10 |
diff --git a/tests/test_name.py b/tests/test_name.py |
| 11 |
index 96c0345..ff1a405 100644 |
| 12 |
--- a/tests/test_name.py |
| 13 |
+++ b/tests/test_name.py |
| 14 |
@@ -822,9 +822,6 @@ class NameTestCase(unittest.TestCase): |
| 15 |
self.assertRaises(dns.name.IDNAException, bad) |
| 16 |
e1 = dns.name.from_unicode(t, idna_codec=dns.name.IDNA_2008) |
| 17 |
self.assertEqual(str(e1), "xn--knigsgchen-b4a3dun.") |
| 18 |
- c2 = dns.name.IDNA_2008_Transitional |
| 19 |
- e2 = dns.name.from_unicode(t, idna_codec=c2) |
| 20 |
- self.assertEqual(str(e2), "xn--knigsgsschen-lcb0w.") |
| 21 |
|
| 22 |
@unittest.skipUnless( |
| 23 |
dns.name.have_idna_2008, "Python idna cannot be imported; no IDNA2008" |
| 24 |
@@ -833,7 +830,7 @@ class NameTestCase(unittest.TestCase): |
| 25 |
# the IDN rules for names are very restrictive, disallowing |
| 26 |
# practical names like '_sip._tcp.Königsgäßchen'. Dnspython |
| 27 |
# has a "practical" mode which permits labels which are purely |
| 28 |
- # ASCII to go straight through, and thus not invalid useful |
| 29 |
+ # ASCII to go straight through, and thus not invalidate useful |
| 30 |
# things in the real world. |
| 31 |
t = "_sip._tcp.Königsgäßchen" |
| 32 |
|
| 33 |
@@ -845,13 +842,8 @@ class NameTestCase(unittest.TestCase): |
| 34 |
codec = dns.name.IDNA_2008_UTS_46 |
| 35 |
return dns.name.from_unicode(t, idna_codec=codec) |
| 36 |
|
| 37 |
- def bad3(): |
| 38 |
- codec = dns.name.IDNA_2008_Transitional |
| 39 |
- return dns.name.from_unicode(t, idna_codec=codec) |
| 40 |
- |
| 41 |
self.assertRaises(dns.name.IDNAException, bad1) |
| 42 |
self.assertRaises(dns.name.IDNAException, bad2) |
| 43 |
- self.assertRaises(dns.name.IDNAException, bad3) |
| 44 |
e = dns.name.from_unicode(t, idna_codec=dns.name.IDNA_2008_Practical) |
| 45 |
self.assertEqual(str(e), "_sip._tcp.xn--knigsgchen-b4a3dun.") |
| 46 |
|
| 47 |
@@ -884,17 +876,6 @@ class NameTestCase(unittest.TestCase): |
| 48 |
self.assertEqual(str(n), "xn--eckwd4c7c.xn--zckzah.") |
| 49 |
self.assertEqual(s, "ドメイン.テスト.") |
| 50 |
|
| 51 |
- @unittest.skipUnless( |
| 52 |
- dns.name.have_idna_2008, "Python idna cannot be imported; no IDNA2008" |
| 53 |
- ) |
| 54 |
- def testToUnicode5(self): |
| 55 |
- # Exercise UTS 46 remapping in decode. This doesn't normally happen |
| 56 |
- # as you can see from us having to instantiate the codec as |
| 57 |
- # transitional with strict decoding, not one of our usual choices. |
| 58 |
- codec = dns.name.IDNA2008Codec(True, True, False, True) |
| 59 |
- n = dns.name.from_text("xn--gro-7ka.com") |
| 60 |
- self.assertEqual(n.to_unicode(idna_codec=codec), "gross.com.") |
| 61 |
- |
| 62 |
@unittest.skipUnless( |
| 63 |
dns.name.have_idna_2008, "Python idna cannot be imported; no IDNA2008" |
| 64 |
) |