public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/dnspython/, dev-python/dnspython/files/
@ 2024-01-28  3:51 Michał Górny
  0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2024-01-28  3:51 UTC (permalink / raw
  To: gentoo-commits

commit:     448c5a045d47fe5cac56c30e4ff4bcab4d5627b7
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 28 02:29:33 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Jan 28 02:29:33 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=448c5a04

dev-python/dnspython: Backport musl test fix

Closes: https://bugs.gentoo.org/923004
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/dnspython/dnspython-2.5.0.ebuild        |  6 ++
 .../files/dnspython-2.5.0-musl-test.patch          | 67 ++++++++++++++++++++++
 2 files changed, 73 insertions(+)

diff --git a/dev-python/dnspython/dnspython-2.5.0.ebuild b/dev-python/dnspython/dnspython-2.5.0.ebuild
index fa76df91c401..c942143466ba 100644
--- a/dev-python/dnspython/dnspython-2.5.0.ebuild
+++ b/dev-python/dnspython/dnspython-2.5.0.ebuild
@@ -38,6 +38,12 @@ BDEPEND="
 
 distutils_enable_tests pytest
 
+PATCHES=(
+	# https://github.com/rthalley/dnspython/issues/1035
+	# https://github.com/rthalley/dnspython/commit/1b22985f2d67b6dd43259e3c6b853498f1cff712
+	"${FILESDIR}/${P}-musl-test.patch"
+)
+
 python_install_all() {
 	distutils-r1_python_install_all
 	if use examples; then

diff --git a/dev-python/dnspython/files/dnspython-2.5.0-musl-test.patch b/dev-python/dnspython/files/dnspython-2.5.0-musl-test.patch
new file mode 100644
index 000000000000..a5aec3378fdd
--- /dev/null
+++ b/dev-python/dnspython/files/dnspython-2.5.0-musl-test.patch
@@ -0,0 +1,67 @@
+From 1b22985f2d67b6dd43259e3c6b853498f1cff712 Mon Sep 17 00:00:00 2001
+From: Bob Halley <halley@dnspython.org>
+Date: Sat, 27 Jan 2024 12:38:03 -0800
+Subject: [PATCH] In tests, work around musl libc and docker issues.
+
+Specifically: musl libc's getaddrinfo behavior always returns
+a canonical name.
+
+Docker's resolver proxy doesn't do dangling CNAMEs correctly
+and also answers NXDOMAIN in some cases where it should say
+no error, no data.
+---
+ tests/test_async.py             | 14 +++++++++++---
+ tests/test_resolver.py          | 21 +++++++++++++++------
+ tests/test_resolver_override.py | 19 ++++++++++++-------
+ tests/util.py                   | 10 +++++++++-
+ 4 files changed, 47 insertions(+), 17 deletions(-)
+
+diff --git a/tests/test_resolver_override.py b/tests/test_resolver_override.py
+index aed7a53d..be9e53f2 100644
+--- a/tests/test_resolver_override.py
++++ b/tests/test_resolver_override.py
+@@ -69,7 +69,7 @@ def test_override(self):
+         dns.resolver.restore_system_resolver()
+         self.assertTrue(socket.getaddrinfo is dns.resolver._original_getaddrinfo)
+ 
+-    def equivalent_info(self, a, b):
++    def equivalent_info(self, a, b, q):
+         if len(a) != len(b):
+             return False
+         for x in a:
+@@ -78,16 +78,21 @@ def equivalent_info(self, a, b):
+                 # looking for a zero protocol.
+                 y = (x[0], x[1], 0, x[3], x[4])
+                 if y not in b:
+-                    print("NOT EQUIVALENT")
+-                    print(a)
+-                    print(b)
+-                    return False
++                    # musl libc insists on always providing a canonical name, so
++                    # accept that too.
++                    y = (x[0], x[1], x[2], q, x[4])
++                    if y not in b:
++                        print("NOT EQUIVALENT")
++                        print(a)
++                        print(b)
++                        return False
+         return True
+ 
+     def equivalent(self, *args, **kwargs):
++        q = args[0]
+         a = socket.getaddrinfo(*args, **kwargs)
+         b = dns.resolver._original_getaddrinfo(*args, **kwargs)
+-        return self.equivalent_info(a, b)
++        return self.equivalent_info(a, b, q)
+ 
+     @unittest.skipIf(
+         sys.platform == "win32", "avoid windows original getaddrinfo issues"
+@@ -139,7 +144,7 @@ def test_getaddrinfo_nxdomain(self):
+     def test_getaddrinfo_service(self):
+         a = socket.getaddrinfo("dns.google", "domain")
+         b = socket.getaddrinfo("dns.google", 53)
+-        self.assertTrue(self.equivalent_info(a, b))
++        self.assertTrue(self.equivalent_info(a, b, "dns.google"))
+         try:
+             socket.getaddrinfo("dns.google", "domain", flags=socket.AI_NUMERICSERV)
+             self.assertTrue(False)  # should not happen!


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/dnspython/, dev-python/dnspython/files/
@ 2024-03-07 16:15 Michał Górny
  0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2024-03-07 16:15 UTC (permalink / raw
  To: gentoo-commits

commit:     8b1afd7865feb903041b9a258da591f058813e7f
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Mar  7 16:12:36 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Mar  7 16:12:36 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b1afd78

dev-python/dnspython: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/dnspython/Manifest                      |  2 -
 dev-python/dnspython/dnspython-2.5.0.ebuild        | 53 -----------------
 dev-python/dnspython/dnspython-2.6.0.ebuild        | 47 ---------------
 .../files/dnspython-2.5.0-musl-test.patch          | 67 ----------------------
 4 files changed, 169 deletions(-)

diff --git a/dev-python/dnspython/Manifest b/dev-python/dnspython/Manifest
index 55bfab4265de..69ffca18b716 100644
--- a/dev-python/dnspython/Manifest
+++ b/dev-python/dnspython/Manifest
@@ -1,3 +1 @@
-DIST dnspython-2.5.0.gh.tar.gz 366093 BLAKE2B f8e3d8632a74b0421f7c77316dc80e01936277d701c282239ed60e79952755d34c673f15e19d4da812883e33d5f2cb54a8faa419185d8d198de923a2f3861095 SHA512 8ed207f9cee88dc1deb626d727c510dabace327586911e340df435c8cce5936efee51937b52881b4b4452d9c8c5bd903044bfef5a4effa95aaf05f24c0213b07
-DIST dnspython-2.6.0.gh.tar.gz 372953 BLAKE2B c35a994ff0573a175a8011ef84291ea9de3450e4e57ae059c756cdb5e3163a736057b994e0d370b3c237eff7cf2650b7faae1f11071c53e9c953e655f539f8f3 SHA512 68361d624af6b308669a20316c9046e23135fdaec69f0dd0580f865b363565b813d836aaf9ddd1db5c51a831bd34ddbf6136b6bf72d2e91833d4c7c209528c2b
 DIST dnspython-2.6.1.gh.tar.gz 373684 BLAKE2B 63ac506d528a9e3684daf4888b51d732d9a12c3439ff1c353250a7bad78781f9f12bb13509e69093d5585a4a04bf2fbb1b8eb690a39f27e5d58e8f0f3b3b36a8 SHA512 77e9c69ac70e9e31a11188b968d28b8f2890b053b2cce0e608eefad7fd2c2b0f30c074222b2e5e85c0b4b8705f2e45acfa8b016a7808cc421df1d77f2561d978

diff --git a/dev-python/dnspython/dnspython-2.5.0.ebuild b/dev-python/dnspython/dnspython-2.5.0.ebuild
deleted file mode 100644
index 76ebb1afdd58..000000000000
--- a/dev-python/dnspython/dnspython-2.5.0.ebuild
+++ /dev/null
@@ -1,53 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=hatchling
-PYTHON_COMPAT=( python3_{10..12} pypy3 )
-
-inherit distutils-r1
-
-DESCRIPTION="DNS toolkit for Python"
-HOMEPAGE="
-	https://www.dnspython.org/
-	https://github.com/rthalley/dnspython/
-	https://pypi.org/project/dnspython/
-"
-SRC_URI="
-	https://github.com/rthalley/dnspython/archive/v${PV}.tar.gz
-		-> ${P}.gh.tar.gz
-"
-
-LICENSE="ISC"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
-IUSE="dnssec examples"
-
-RDEPEND="
-	dnssec? (
-		>=dev-python/cryptography-41[${PYTHON_USEDEP}]
-	)
-	>=dev-python/idna-2.1[${PYTHON_USEDEP}]
-"
-BDEPEND="
-	test? (
-		>=dev-python/cryptography-41[${PYTHON_USEDEP}]
-	)
-"
-
-distutils_enable_tests pytest
-
-PATCHES=(
-	# https://github.com/rthalley/dnspython/issues/1035
-	# https://github.com/rthalley/dnspython/commit/1b22985f2d67b6dd43259e3c6b853498f1cff712
-	"${FILESDIR}/${P}-musl-test.patch"
-)
-
-python_install_all() {
-	distutils-r1_python_install_all
-	if use examples; then
-		dodoc -r examples
-		docompress -x /usr/share/doc/${PF}/examples
-	fi
-}

diff --git a/dev-python/dnspython/dnspython-2.6.0.ebuild b/dev-python/dnspython/dnspython-2.6.0.ebuild
deleted file mode 100644
index fa76df91c401..000000000000
--- a/dev-python/dnspython/dnspython-2.6.0.ebuild
+++ /dev/null
@@ -1,47 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=hatchling
-PYTHON_COMPAT=( python3_{10..12} pypy3 )
-
-inherit distutils-r1
-
-DESCRIPTION="DNS toolkit for Python"
-HOMEPAGE="
-	https://www.dnspython.org/
-	https://github.com/rthalley/dnspython/
-	https://pypi.org/project/dnspython/
-"
-SRC_URI="
-	https://github.com/rthalley/dnspython/archive/v${PV}.tar.gz
-		-> ${P}.gh.tar.gz
-"
-
-LICENSE="ISC"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
-IUSE="dnssec examples"
-
-RDEPEND="
-	dnssec? (
-		>=dev-python/cryptography-41[${PYTHON_USEDEP}]
-	)
-	>=dev-python/idna-2.1[${PYTHON_USEDEP}]
-"
-BDEPEND="
-	test? (
-		>=dev-python/cryptography-41[${PYTHON_USEDEP}]
-	)
-"
-
-distutils_enable_tests pytest
-
-python_install_all() {
-	distutils-r1_python_install_all
-	if use examples; then
-		dodoc -r examples
-		docompress -x /usr/share/doc/${PF}/examples
-	fi
-}

diff --git a/dev-python/dnspython/files/dnspython-2.5.0-musl-test.patch b/dev-python/dnspython/files/dnspython-2.5.0-musl-test.patch
deleted file mode 100644
index a5aec3378fdd..000000000000
--- a/dev-python/dnspython/files/dnspython-2.5.0-musl-test.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From 1b22985f2d67b6dd43259e3c6b853498f1cff712 Mon Sep 17 00:00:00 2001
-From: Bob Halley <halley@dnspython.org>
-Date: Sat, 27 Jan 2024 12:38:03 -0800
-Subject: [PATCH] In tests, work around musl libc and docker issues.
-
-Specifically: musl libc's getaddrinfo behavior always returns
-a canonical name.
-
-Docker's resolver proxy doesn't do dangling CNAMEs correctly
-and also answers NXDOMAIN in some cases where it should say
-no error, no data.
----
- tests/test_async.py             | 14 +++++++++++---
- tests/test_resolver.py          | 21 +++++++++++++++------
- tests/test_resolver_override.py | 19 ++++++++++++-------
- tests/util.py                   | 10 +++++++++-
- 4 files changed, 47 insertions(+), 17 deletions(-)
-
-diff --git a/tests/test_resolver_override.py b/tests/test_resolver_override.py
-index aed7a53d..be9e53f2 100644
---- a/tests/test_resolver_override.py
-+++ b/tests/test_resolver_override.py
-@@ -69,7 +69,7 @@ def test_override(self):
-         dns.resolver.restore_system_resolver()
-         self.assertTrue(socket.getaddrinfo is dns.resolver._original_getaddrinfo)
- 
--    def equivalent_info(self, a, b):
-+    def equivalent_info(self, a, b, q):
-         if len(a) != len(b):
-             return False
-         for x in a:
-@@ -78,16 +78,21 @@ def equivalent_info(self, a, b):
-                 # looking for a zero protocol.
-                 y = (x[0], x[1], 0, x[3], x[4])
-                 if y not in b:
--                    print("NOT EQUIVALENT")
--                    print(a)
--                    print(b)
--                    return False
-+                    # musl libc insists on always providing a canonical name, so
-+                    # accept that too.
-+                    y = (x[0], x[1], x[2], q, x[4])
-+                    if y not in b:
-+                        print("NOT EQUIVALENT")
-+                        print(a)
-+                        print(b)
-+                        return False
-         return True
- 
-     def equivalent(self, *args, **kwargs):
-+        q = args[0]
-         a = socket.getaddrinfo(*args, **kwargs)
-         b = dns.resolver._original_getaddrinfo(*args, **kwargs)
--        return self.equivalent_info(a, b)
-+        return self.equivalent_info(a, b, q)
- 
-     @unittest.skipIf(
-         sys.platform == "win32", "avoid windows original getaddrinfo issues"
-@@ -139,7 +144,7 @@ def test_getaddrinfo_nxdomain(self):
-     def test_getaddrinfo_service(self):
-         a = socket.getaddrinfo("dns.google", "domain")
-         b = socket.getaddrinfo("dns.google", 53)
--        self.assertTrue(self.equivalent_info(a, b))
-+        self.assertTrue(self.equivalent_info(a, b, "dns.google"))
-         try:
-             socket.getaddrinfo("dns.google", "domain", flags=socket.AI_NUMERICSERV)
-             self.assertTrue(False)  # should not happen!


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-03-07 16:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-07 16:15 [gentoo-commits] repo/gentoo:master commit in: dev-python/dnspython/, dev-python/dnspython/files/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2024-01-28  3:51 Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox