saghul / pycares

Python interface for c-ares
https://pypi.org/project/pycares/
MIT License
162 stars 74 forks source link

Update c-ares to 1.24 #193

Open kitterma opened 7 months ago

kitterma commented 7 months ago

There's only one test result affected by using the newer c-ares. see below for a patch to fix this to an issue. I'm providing it as an issue rather than submitting a PR since this needs to be done in tandem with updating the vendored c-ares. Let me know if you'd prefer a PR.

diff --git a/tests/test_all.py b/tests/test_all.py
index 3538823..355c892 100755
--- a/tests/test_all.py
+++ b/tests/test_all.py
@@ -569,7 +569,7 @@ class DNSTest(unittest.TestCase):
         # try encoding it as utf-8
         self.channel.query(host.encode(), pycares.QUERY_TYPE_A, cb)
         self.wait()
-        self.assertEqual(self.errorno, pycares.errno.ARES_ENOTFOUND)
+        self.assertEqual(self.errorno, pycares.errno.ARES_EBADNAME)
         self.assertEqual(self.result, None)
         # use it as is (it's IDNA encoded internally)
         self.channel.query(host, pycares.QUERY_TYPE_A, cb)

Scott K

saghul commented 7 months ago

Do send a PR please, thank you!