diff --git a/falcon/_typing_extensions.py b/falcon/_typing_extensions.py deleted file mode 100644 index e87d3af0e..000000000 --- a/falcon/_typing_extensions.py +++ /dev/null @@ -1,6 +0,0 @@ -import sys - -if sys.version_info < (3, 8): # pragma: nocover - from typing_extensions import Protocol as Protocol -else: - from typing import Protocol as Protocol diff --git a/falcon/hooks.py b/falcon/hooks.py index 9634e4a11..1b2b2ea6d 100644 --- a/falcon/hooks.py +++ b/falcon/hooks.py @@ -27,13 +27,13 @@ cast, Dict, List, + Protocol, Tuple, TYPE_CHECKING, TypeVar, Union, ) -from falcon._typing_extensions import Protocol from falcon.constants import COMBINED_METHODS from falcon.util.misc import get_argnames from falcon.util.sync import _wrap_non_coroutine_unsafe diff --git a/falcon/typing.py b/falcon/typing.py index 8d2785853..1c92686c7 100644 --- a/falcon/typing.py +++ b/falcon/typing.py @@ -22,13 +22,12 @@ Dict, List, Pattern, + Protocol, Tuple, TYPE_CHECKING, Union, ) -from falcon._typing_extensions import Protocol - if TYPE_CHECKING: import falcon as wsgi from falcon import asgi