From ebf1067b08d94ee9758684cdef9ea5f5716ab73a Mon Sep 17 00:00:00 2001 From: wuzhaomin Date: Thu, 9 May 2024 17:54:06 +0800 Subject: [PATCH] Fix some pylint lint for xfr refactor --- ...ix-some-pylint-lint-for-xfr-refactor.patch | 49 +++++++++++++++++++ python-dns.spec | 6 ++- 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 0007-Fix-some-pylint-lint-for-xfr-refactor.patch diff --git a/0007-Fix-some-pylint-lint-for-xfr-refactor.patch b/0007-Fix-some-pylint-lint-for-xfr-refactor.patch new file mode 100644 index 0000000..8671631 --- /dev/null +++ b/0007-Fix-some-pylint-lint-for-xfr-refactor.patch @@ -0,0 +1,49 @@ +From e4ef755b31448869cbe09c56a479c4af996b4354 Mon Sep 17 00:00:00 2001 +From: Bob Halley +Date: Thu, 29 Feb 2024 15:27:58 -0800 +Subject: [PATCH] Fix some pylint lint for xfr refactor. + +--- + dns/query.py | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +diff --git a/dns/query.py b/dns/query.py +index ed92ee3..39eee0e 100644 +--- a/dns/query.py ++++ b/dns/query.py +@@ -29,7 +29,7 @@ import socket + import struct + import time + import urllib.parse +-from typing import Any, Dict, List, Optional, Tuple, Union, cast ++from typing import Any, Dict, Optional, Tuple, Union, cast + + import dns._features + import dns.exception +@@ -1572,9 +1572,15 @@ def xfr( + def origin_information(self): + return self.info + ++ def get_class(self) -> dns.rdataclass.RdataClass: ++ raise NotImplementedError # pragma: no cover ++ ++ def reader(self): ++ raise NotImplementedError # pragma: no cover ++ + def writer(self, replacement: bool = False) -> dns.transaction.Transaction: + class DummyTransaction(object): +- def nop(*args, **kw): ++ def nop(self, *args, **kw): + pass + + def __getattr__(self, _): +@@ -1650,7 +1656,7 @@ def inbound_xfr( + + Raises on errors. + """ +- for msg in _inbound_xfr( ++ for _ in _inbound_xfr( + where, + txn_manager, + query, +-- diff --git a/python-dns.spec b/python-dns.spec index 4b99be8..4dd74c8 100644 --- a/python-dns.spec +++ b/python-dns.spec @@ -14,7 +14,7 @@ messages, names, and records. Name: python-dns Summary: %{sum} Version: 2.4.2 -Release: 2 +Release: 3 License: ISC and MIT URL: http://www.dnspython.org/ Source0: https://github.com/rthalley/dnspython/archive/v%{version}/dnspython-%{version}.tar.gz @@ -26,6 +26,7 @@ Patch0003: 0003-test-IgnoreErrors.patch Patch0004: 0004-Further-improve-CVE-fix-coverage-to-100-for-sync-and.patch Patch0005: 0005-Ensure-asyncio-datagram-sockets-on-windows-have-had-.patch Patch0006: 0006-The-Tudoor-fix-should-not-eat-valid-Truncated-except.patch +Patch0007: 0007-Fix-some-pylint-lint-for-xfr-refactor.patch BuildArch: noarch @@ -68,6 +69,9 @@ pytest %doc examples %changelog +* Thu May 9 2024 wuzhaomin - 2.4.2-3 +- Fix some pylint lint for xfr refactor + * Thu Apr 18 2024 wangguochun - 2.4.2-2 - fix CVE-2023-29483 -- Gitee