]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Replace deprecated typing imports
authorŠtěpán Balážik <stepan@isc.org>
Tue, 10 Feb 2026 15:12:57 +0000 (16:12 +0100)
committerŠtěpán Balážik <stepan@isc.org>
Fri, 20 Feb 2026 14:17:32 +0000 (15:17 +0100)
More specific modules (like collections.abc) can now be used.

Generated with: ruff check --extend-select UP035 --fix

34 files changed:
bin/tests/system/bailiwick/ans1/ans.py
bin/tests/system/bailiwick/ans2/ans.py
bin/tests/system/chain/ans3/ans.py
bin/tests/system/chain/ans4/ans.py
bin/tests/system/cookie/cookie_ans.py
bin/tests/system/digdelv/ans5/ans.py
bin/tests/system/digdelv/ans6/ans.py
bin/tests/system/digdelv/ans7/ans.py
bin/tests/system/dispatch/ans3/ans.py
bin/tests/system/dnssec/ans10/ans.py
bin/tests/system/fetchlimit/ans4/ans.py
bin/tests/system/forward/ans11/ans.py
bin/tests/system/forward/ans6/ans.py
bin/tests/system/isctest/asyncserver.py
bin/tests/system/isctest/log/watchlog.py
bin/tests/system/isctest/name.py
bin/tests/system/isctest/query.py
bin/tests/system/isctest/text.py
bin/tests/system/ixfr/ans2/ans.py
bin/tests/system/nsec3-answer/tests_nsec3.py
bin/tests/system/qmin/ans2/ans.py
bin/tests/system/qmin/ans4/ans.py
bin/tests/system/qmin/qmin_ans.py
bin/tests/system/resolver/ans10/ans.py
bin/tests/system/resolver/ans2/ans.py
bin/tests/system/resolver/ans3/ans.py
bin/tests/system/resolver/ans8/ans.py
bin/tests/system/resolver/resolver_ans.py
bin/tests/system/rpzrecurse/ans5/ans.py
bin/tests/system/statistics/ans4/ans.py
bin/tests/system/tsig/ans2/ans.py
bin/tests/system/xfer/ans9/ans.py
bin/tests/system/zero/ans5/ans.py
pyproject.toml

index 7606236fdaa3667c4de42ff3ebf999ea8bae40c5..75bf8790b249d2102cc85f1a3a624c03ebdeef2e 100644 (file)
@@ -11,7 +11,7 @@ See the COPYRIGHT file distributed with this work for additional
 information regarding copyright ownership.
 """
 
-from typing import AsyncGenerator
+from collections.abc import AsyncGenerator
 
 import dns.rdatatype
 import dns.rrset
index 187816735703be5f9750216cd4bb083e1a3bee85..a1010cc5d6d2af54c73e8a26ed5d6ee059f14958 100644 (file)
@@ -11,7 +11,7 @@ See the COPYRIGHT file distributed with this work for additional
 information regarding copyright ownership.
 """
 
-from typing import AsyncGenerator
+from collections.abc import AsyncGenerator
 
 import dns.rdatatype
 import dns.rrset
index f10387fbf4459f0aa7690173a03f54e610065190..a36ab41c70b673c0703c7a71a8d86b1834e8b7ca 100755 (executable)
@@ -11,7 +11,7 @@ See the COPYRIGHT file distributed with this work for additional
 information regarding copyright ownership.
 """
 
-from typing import AsyncGenerator
+from collections.abc import AsyncGenerator
 
 import dns.name
 import dns.rcode
index 3e1aeea7435fdb6723a0f7fe73b5277cc1235368..b21ba81fefc761466280274a84a7980ab3eb08c6 100755 (executable)
@@ -11,9 +11,9 @@ See the COPYRIGHT file distributed with this work for additional
 information regarding copyright ownership.
 """
 
+from collections.abc import AsyncGenerator
 from dataclasses import dataclass
 from enum import Enum
-from typing import AsyncGenerator
 
 import abc
 import logging
index 84d3f7011c7caff21cbb065334f730d8dac0ca06..3b6f0406f2af4061d5683167d1e791166b198e83 100644 (file)
@@ -9,7 +9,7 @@
 # See the COPYRIGHT file distributed with this work for additional
 # information regarding copyright ownership.
 
-from typing import AsyncGenerator
+from collections.abc import AsyncGenerator
 
 import dns.edns
 import dns.name
index e13f95227914067335eeb45f0ab89ba1889c8974..1d7375791e9173d0369eb8197cccd21f08b94b28 100644 (file)
@@ -9,7 +9,7 @@
 # See the COPYRIGHT file distributed with this work for additional
 # information regarding copyright ownership.
 
-from typing import AsyncGenerator
+from collections.abc import AsyncGenerator
 
 import logging
 
index e723d96c16e337c0c7e3f2121ffe3650489a09bd..78b9ce7040719c759e56d86bc8736fd50f443a99 100644 (file)
@@ -9,7 +9,7 @@
 # See the COPYRIGHT file distributed with this work for additional
 # information regarding copyright ownership.
 
-from typing import AsyncGenerator
+from collections.abc import AsyncGenerator
 
 import dns.opcode
 import dns.rcode
index 0dde43c6a801b3e74ceaf9656cfc4ff544e7360a..a9a8a0966c3b882cd0ccff676847980ea8838021 100644 (file)
@@ -9,7 +9,7 @@
 # See the COPYRIGHT file distributed with this work for additional
 # information regarding copyright ownership.
 
-from typing import AsyncGenerator
+from collections.abc import AsyncGenerator
 
 import dns.rcode
 
index 97b1f2cf1fb6ec4354ff53e6320e9980919b9fb7..1099928b08a6f375f3fadf1b01a7913b3c740e99 100644 (file)
@@ -9,7 +9,7 @@
 # See the COPYRIGHT file distributed with this work for additional
 # information regarding copyright ownership.
 
-from typing import AsyncGenerator
+from collections.abc import AsyncGenerator
 
 import dns.flags
 import dns.rcode
index d5d22e621e29f356e3326e0317d80a8df93cbb61..b584151f0d668860a7ca7e5391ab44eb31d115b3 100644 (file)
@@ -9,7 +9,7 @@
 # See the COPYRIGHT file distributed with this work for additional
 # information regarding copyright ownership.
 
-from typing import AsyncGenerator
+from collections.abc import AsyncGenerator
 
 import dns.rdatatype
 import dns.rrset
index cd7602366b6da177c5b31ade8d102481f85dafdc..3b01eaa6a6a5831a3e37276f92e32a0598df6c0a 100644 (file)
@@ -11,7 +11,7 @@ See the COPYRIGHT file distributed with this work for additional
 information regarding copyright ownership.
 """
 
-from typing import AsyncGenerator
+from collections.abc import AsyncGenerator
 
 import dns.rcode
 import dns.rdatatype
index b5b590aabf4fbafef5840624225678bb687b6837..9c854a6b76bcab1c00dc281476cb04de8b873b42 100644 (file)
@@ -11,7 +11,7 @@ See the COPYRIGHT file distributed with this work for additional
 information regarding copyright ownership.
 """
 
-from typing import AsyncGenerator
+from collections.abc import AsyncGenerator
 
 import dns.rdatatype
 import dns.rrset
index fdcbe7d392d0a7a46ab301e79b8ce2abe7c62d57..271439b37c7ba80d5aa1ebdf39cda51af940d018 100644 (file)
@@ -11,7 +11,7 @@ See the COPYRIGHT file distributed with this work for additional
 information regarding copyright ownership.
 """
 
-from typing import AsyncGenerator
+from collections.abc import AsyncGenerator
 
 import dns.name
 import dns.rcode
index 453751629f0217875e2d795ff6511067f8732550..080c08c380684af2e497fcfd679b0261a48bfce6 100644 (file)
@@ -11,8 +11,9 @@ See the COPYRIGHT file distributed with this work for additional
 information regarding copyright ownership.
 """
 
+from collections.abc import AsyncGenerator, Callable, Coroutine, Sequence
 from dataclasses import dataclass, field
-from typing import Any, AsyncGenerator, Callable, Coroutine, Sequence, cast
+from typing import Any, cast
 
 import abc
 import asyncio
index f1fc0ec8fa971288e48c8828e16f2ed1d0c8041a..22f81b94fa87652a5031d18f112d69b76417f2a9 100644 (file)
@@ -9,7 +9,8 @@
 # See the COPYRIGHT file distributed with this work for additional
 # information regarding copyright ownership.
 
-from typing import Any, Match, Pattern, TextIO, TypeAlias, TypeVar
+from re import Match, Pattern
+from typing import Any, TextIO, TypeAlias, TypeVar
 
 import abc
 import os
index e0b23805ac0c7b150b3ff8a216d82a5251258706..02b43059a77aff8dbce42a1fd2aa7b6bf8dae76c 100644 (file)
@@ -9,7 +9,7 @@
 # See the COPYRIGHT file distributed with this work for additional
 # information regarding copyright ownership.
 
-from typing import Iterable
+from collections.abc import Iterable
 
 from dns.name import Name
 
index 7c767be167d60317633fd6f35a5e6ee57c74c0b2..57af8254c90fe2205fec3459f4ee0e3150211d37 100644 (file)
@@ -9,7 +9,8 @@
 # See the COPYRIGHT file distributed with this work for additional
 # information regarding copyright ownership.
 
-from typing import Any, Callable
+from collections.abc import Callable
+from typing import Any
 
 import os
 import time
index d305aee77592009552dba341bbb4a468252785f7..a60c1bbae3a54753eb3da03d1f238b878f01b673 100644 (file)
 # See the COPYRIGHT file distributed with this work for additional
 # information regarding copyright ownership.
 
+from collections.abc import Iterator
+from re import Match, Pattern
 from re import compile as Re
-from typing import Iterator, Match, Pattern, TextIO
+from typing import TextIO
 
 import abc
 import re
index 37b22917216e68666c37638fb8c14afe8fb02db0..5c9268a193f0db2dfb4fdab7f83ac12adc02096f 100644 (file)
@@ -11,7 +11,7 @@ See the COPYRIGHT file distributed with this work for additional
 information regarding copyright ownership.
 """
 
-from typing import AsyncGenerator, Collection, Iterable
+from collections.abc import AsyncGenerator, Collection, Iterable
 
 import abc
 
index bed0aadc280ed3362019f61c34f1a4baeba5e74b..f339813cedcdfd92b23d7dad96caed1d519dc191 100755 (executable)
@@ -15,9 +15,9 @@
 # https://github.com/pylint-dev/pylint/issues/10785#issuecomment-3677224217
 # pylint: disable=unreachable
 
+from collections.abc import Container, Iterable
 from dataclasses import dataclass
 from pathlib import Path
-from typing import Container, Iterable
 
 import os
 
index 5d35903da83ae4337b446916e1b40f6b91f75198..a8e7d7cd97bf1758acbe7e33d776738808ece0dd 100644 (file)
@@ -11,7 +11,7 @@ See the COPYRIGHT file distributed with this work for additional
 information regarding copyright ownership.
 """
 
-from typing import AsyncGenerator
+from collections.abc import AsyncGenerator
 
 import dns.name
 import dns.rcode
index 08286a4bba1b925d6239094a7dbfe6e7345511af..c3c5547258189c6637d6dd9bc4416a9533b88c45 100644 (file)
@@ -11,7 +11,7 @@ See the COPYRIGHT file distributed with this work for additional
 information regarding copyright ownership.
 """
 
-from typing import AsyncGenerator
+from collections.abc import AsyncGenerator
 
 import dns.rcode
 import dns.rdatatype
index 6185e15a1090477f552a06b1c4af08389ec6c089..74c4891b6e0d87bbae14cc19fb7ab72a5953238f 100644 (file)
@@ -11,7 +11,7 @@ See the COPYRIGHT file distributed with this work for additional
 information regarding copyright ownership.
 """
 
-from typing import AsyncGenerator
+from collections.abc import AsyncGenerator
 
 import abc
 
index e2810e9252e8f49a62c71414b17a053e7d9b3b09..0abb52c54c25c461c78cc8076be2a01ce372dc6b 100644 (file)
@@ -9,7 +9,7 @@
 # See the COPYRIGHT file distributed with this work for additional
 # information regarding copyright ownership.
 
-from typing import AsyncGenerator
+from collections.abc import AsyncGenerator
 
 import dns.rcode
 import dns.rdatatype
index 88413d14e9b49c30d712c54f49d5187db1761f65..9d27310527d878a1e6ab3df044c884d209ea9d8c 100644 (file)
@@ -11,7 +11,7 @@ See the COPYRIGHT file distributed with this work for additional
 information regarding copyright ownership.
 """
 
-from typing import AsyncGenerator
+from collections.abc import AsyncGenerator
 
 import dns.edns
 import dns.name
index 36172f768512379fd9a568e79f3f4d0b16bc1a05..8913186a7028c97fabcdbc40bbb6c60e53f7b62e 100644 (file)
@@ -11,7 +11,7 @@ See the COPYRIGHT file distributed with this work for additional
 information regarding copyright ownership.
 """
 
-from typing import AsyncGenerator
+from collections.abc import AsyncGenerator
 
 import dns.name
 import dns.rcode
index 6ef65f21571ff996cc42bb7d12d9e3ba581a4650..98929085bcbf4e885d74754d9b8784ce3794d8dd 100644 (file)
@@ -11,7 +11,7 @@ See the COPYRIGHT file distributed with this work for additional
 information regarding copyright ownership.
 """
 
-from typing import AsyncGenerator
+from collections.abc import AsyncGenerator
 
 import abc
 
index 285cf44b97507e665ecbc74456faba18829919a6..e2bf2dc30b234ca5a60a032cf44918c071551907 100644 (file)
@@ -11,7 +11,8 @@ See the COPYRIGHT file distributed with this work for additional
 information regarding copyright ownership.
 """
 
-from typing import AsyncGenerator, NamedTuple
+from collections.abc import AsyncGenerator
+from typing import NamedTuple
 
 import abc
 
index 6eed86d7f4515ab23e32f4c21fbcc051ff29d6ea..576f9d0f06e6751771dfc2b058fe7fefe2d1e4bb 100644 (file)
@@ -11,7 +11,7 @@ See the COPYRIGHT file distributed with this work for additional
 information regarding copyright ownership.
 """
 
-from typing import AsyncGenerator
+from collections.abc import AsyncGenerator
 
 import dns.rcode
 import dns.rdatatype
index 52e0a00d50e43faaa85b40a3640e53d4126c9a47..dd16e4c4712fec3e1b8c71699a9a2f2de6ae6f7e 100644 (file)
@@ -11,7 +11,7 @@ See the COPYRIGHT file distributed with this work for additional
 information regarding copyright ownership.
 """
 
-from typing import AsyncGenerator
+from collections.abc import AsyncGenerator
 
 import dns.rcode
 import dns.rdatatype
index 677a57cf8f8b4e91a19131d944fe5b200033f809..fe91046d510a729b10541bc394b6442faa24af85 100644 (file)
@@ -11,7 +11,7 @@ See the COPYRIGHT file distributed with this work for additional
 information regarding copyright ownership.
 """
 
-from typing import AsyncGenerator
+from collections.abc import AsyncGenerator
 
 import dns.flags
 
index 269afafe228018759dfd62c866b2e891c02a6bbb..25da6b7d43dbb32e444fc9a89bb1c61ce8568811 100644 (file)
@@ -11,7 +11,7 @@ See the COPYRIGHT file distributed with this work for additional
 information regarding copyright ownership.
 """
 
-from typing import AsyncGenerator
+from collections.abc import AsyncGenerator
 
 import dns.rcode
 import dns.rdatatype
index ad4a4e3ffdac901e04da353c5d0b5e41700c9554..5ff475d801a7328369a3c4494b3baf0bf3fe19eb 100644 (file)
@@ -11,7 +11,7 @@ See the COPYRIGHT file distributed with this work for additional
 information regarding copyright ownership.
 """
 
-from typing import AsyncGenerator
+from collections.abc import AsyncGenerator
 
 import ipaddress
 
index 916b886cdaff1a6456bc8386e958523db77dd2f2..308c1275685c6a7bee46d15deb02e6be35069d45 100644 (file)
@@ -101,6 +101,7 @@ lint.select = [
   # unnecessary `typing` imports
   "UP006",
   "UP007",
+  "UP035",
   "UP045",
   # f-strings
   "UP031",