Third-party stubs: import from collections.abc where possible (#7637)

This commit is contained in:
Alex Waygood
2022-04-16 14:52:57 +01:00
committed by GitHub
parent ee09d9eb19
commit 653f2c6ba4
146 changed files with 268 additions and 156 deletions

View File

@@ -1,4 +1,5 @@
from typing import Any, Mapping
from collections.abc import Mapping
from typing import Any
from urllib3 import exceptions as urllib3_exceptions, poolmanager, response
from urllib3.util import retry

View File

@@ -1,5 +1,6 @@
import sys
from typing import Any, MutableMapping
from collections.abc import MutableMapping
from typing import Any
if sys.version_info >= (3, 0):
from http.cookiejar import CookieJar

View File

@@ -1,7 +1,8 @@
import datetime
from _typeshed import Self
from collections.abc import Callable, Iterator
from json import JSONDecoder
from typing import Any, Callable, Iterator, TypeVar
from typing import Any, TypeVar
from urllib3 import exceptions as urllib3_exceptions, fields, filepost, util

View File

@@ -1,5 +1,6 @@
from _typeshed import Self, SupportsItems
from typing import IO, Any, Callable, Iterable, Mapping, MutableMapping, Union
from collections.abc import Callable, Iterable, Mapping, MutableMapping
from typing import IO, Any, Union
from typing_extensions import TypeAlias
from urllib3._collections import RecentlyUsedContainer

View File

@@ -1,4 +1,5 @@
from typing import Any, Generic, Iterable, Iterator, Mapping, MutableMapping, TypeVar
from collections.abc import Iterable, Iterator, Mapping, MutableMapping
from typing import Any, Generic, TypeVar
_VT = TypeVar("_VT")

View File

@@ -1,4 +1,5 @@
from typing import Any, AnyStr, Iterable, Mapping
from collections.abc import Iterable, Mapping
from typing import Any, AnyStr
from . import compat, cookies, exceptions, structures