diff --git a/dnspython-2.1.0.tar.gz b/dnspython-2.1.0.tar.gz deleted file mode 100644 index 3991c894d1d1c0fb2c6d65b3919bbda808d74a20..0000000000000000000000000000000000000000 Binary files a/dnspython-2.1.0.tar.gz and /dev/null differ diff --git a/dnspython-2.2.0.tar.gz b/dnspython-2.2.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..cb55a114cc5fae3bb60bb503c186a7d25945246c Binary files /dev/null and b/dnspython-2.2.0.tar.gz differ diff --git a/fix-failed-tests.patch b/fix-failed-tests.patch index 7ea6083b677dd100bc499c2ff4b759c7d4b2fb7c..56348264a3e3ad01d0c6c3e6e8a027cd5058a61d 100644 --- a/fix-failed-tests.patch +++ b/fix-failed-tests.patch @@ -1,17 +1,8 @@ -From e691f1219550ccda24276cbfffff5cf0d31d91d1 Mon Sep 17 00:00:00 2001 -From: yangl777 <1525652683@qq.com> -Date: Tue, 17 Nov 2020 10:36:08 +0800 -Subject: [PATCH] fix-failed-tests - ---- - tests/test_resolver.py | 6 +----- - 1 file changed, 1 insertion(+), 5 deletions(-) - -diff --git a/tests/test_resolver.py b/tests/test_resolver.py -index 1738c1a..1e0c727 100644 ---- a/tests/test_resolver.py -+++ b/tests/test_resolver.py -@@ -31,11 +31,7 @@ from dns._compat import xrange, PY3 +diff --git a/tests/test_async.py b/tests/test_async.py +index 4759b02..64f6249 100644 +--- a/tests/test_async.py ++++ b/tests/test_async.py +@@ -44,12 +44,7 @@ except Exception: # Some tests require the internet to be available to run, so let's # skip those if it's not there. @@ -20,15 +11,17 @@ index 1738c1a..1e0c727 100644 - socket.gethostbyname('dnspython.org') -except socket.gaierror: - _network_available = False +- +_network_available = False - # Some tests use a "nano nameserver" for testing. It requires trio - # and threading, so try to import it and if it doesn't work, skip -diff -ruNa dnspython-2.1.0-org/tests/test_resolver_override.py dnspython-2.1.0/tests/test_resolver_override.py ---- dnspython-2.1.0-org/tests/test_resolver_override.py 2021-07-07 10:04:01.861405149 +0800 -+++ dnspython-2.1.0/tests/test_resolver_override.py 2021-07-07 10:04:59.981489084 +0800 -@@ -11,11 +11,7 @@ import dns.resolver - + # Look for systemd-resolved, as it does dangling CNAME responses incorrectly. + # +diff --git a/tests/test_query.py b/tests/test_query.py +index 2cff377..4eb410e 100644 +--- a/tests/test_query.py ++++ b/tests/test_query.py +@@ -38,11 +38,7 @@ import dns.zone + # Some tests require the internet to be available to run, so let's # skip those if it's not there. -_network_available = True @@ -37,14 +30,15 @@ diff -ruNa dnspython-2.1.0-org/tests/test_resolver_override.py dnspython-2.1.0/t -except socket.gaierror: - _network_available = False +_network_available = False - - - @unittest.skipIf(not _network_available, "Internet not reachable") -diff -ruNa dnspython-2.1.0-org/tests/test_async.py dnspython-2.1.0/tests/test_async.py ---- dnspython-2.1.0-org/tests/test_async.py 2021-07-07 10:04:01.861405149 +0800 -+++ dnspython-2.1.0/tests/test_async.py 2021-07-07 10:04:59.981489084 +0800 -@@ -41,12 +41,8 @@ - + + # Some tests use a "nano nameserver" for testing. It requires trio + # and threading, so try to import it and if it doesn't work, skip +diff --git a/tests/test_resolver.py b/tests/test_resolver.py +index 16d9065..534f929 100644 +--- a/tests/test_resolver.py ++++ b/tests/test_resolver.py +@@ -35,11 +35,7 @@ import dns.tsigkeyring + # Some tests require the internet to be available to run, so let's # skip those if it's not there. -_network_available = True @@ -52,16 +46,16 @@ diff -ruNa dnspython-2.1.0-org/tests/test_async.py dnspython-2.1.0/tests/test_as - socket.gethostbyname('dnspython.org') -except socket.gaierror: - _network_available = False - +_network_available = False - - # Probe for IPv4 and IPv6 - query_addresses = [] -diff -ruNa dnspython-2.1.0-org/tests/test_query.py dnspython-2.1.0/tests/test_query.py ---- dnspython-2.1.0-org/tests/test_query.py 2021-07-07 10:04:01.861405149 +0800 -+++ dnspython-2.1.0/tests/test_query.py 2021-07-07 10:05:44.431553273 +0800 -@@ -38,11 +38,8 @@ - + + # Some tests use a "nano nameserver" for testing. It requires trio + # and threading, so try to import it and if it doesn't work, skip +diff --git a/tests/test_resolver_override.py b/tests/test_resolver_override.py +index ac93316..e73ee50 100644 +--- a/tests/test_resolver_override.py ++++ b/tests/test_resolver_override.py +@@ -11,11 +11,7 @@ import dns.resolver + # Some tests require the internet to be available to run, so let's # skip those if it's not there. -_network_available = True @@ -69,11 +63,7 @@ diff -ruNa dnspython-2.1.0-org/tests/test_query.py dnspython-2.1.0/tests/test_qu - socket.gethostbyname('dnspython.org') -except socket.gaierror: - _network_available = False -+ +_network_available = False - - # Some tests use a "nano nameserver" for testing. It requires trio - # and threading, so try to import it and if it doesn't work, skip --- -1.8.3.1 - + + + @unittest.skipIf(not _network_available, "Internet not reachable") diff --git a/python-dns.spec b/python-dns.spec index 24ae38cdcc0653a88ab6fb8897d4fb29a4285354..e80d168ffcb52d199c8502280609e261c47755c2 100644 --- a/python-dns.spec +++ b/python-dns.spec @@ -13,8 +13,8 @@ messages, names, and records. Name: python-dns Summary: %{sum} -Version: 2.1.0 -Release: 2 +Version: 2.2.0 +Release: 1 License: ISC and MIT URL: http://www.dnspython.org/ Source0: https://github.com/rthalley/dnspython/archive/v%{version}/dnspython-%{version}.tar.gz @@ -22,10 +22,11 @@ Source0: https://github.com/rthalley/dnspython/archive/v%{version}/dnspyt Patch0: fix-failed-tests.patch BuildArch: noarch - +BuildRequires: python3-pip python3-wheel +BuildRequires: python3-hatchling python3-hatch-vcs BuildRequires: python3-devel python3-setuptools python3-pycryptodome python3-ecdsa BuildRequires: python3-pytest - +BuildRequires: python3-poetry-core %description %{_description} @@ -44,23 +45,25 @@ Requires: python3-pycryptodome python3-ecdsa find examples -type f | xargs chmod a-x %build -%py3_build - +%pyproject_build %install -%py3_install - +%pyproject_install %check pytest %files -n python3-dns %doc LICENSE -%{python3_sitelib}/*egg-info %{python3_sitelib}/dns +%{python3_sitelib}/dnspython-2.2.0.dist-info/* %files help %doc examples %changelog +* Thu Apr 18 2024 wangjing - 2.2.0-1 +- update package of version 2.2.0 +- fix tests failed + * Sat Jan 08 2022 quanhongfei - 2.1.0-2 - fix tests failed