diff --git a/pyproject.toml b/pyproject.toml index 3dbf2bd..1748fa1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "runtime-keypath" -version = "0.1.6" +version = "0.1.7" authors = [{ name = "Chris Fu", email = "17433201@qq.com" }] description = "Supports runtime key-path recording/accessing for Python." classifiers = [ diff --git a/runtime_keypath/_core.py b/runtime_keypath/_core.py index a0770c4..d5d0ac0 100644 --- a/runtime_keypath/_core.py +++ b/runtime_keypath/_core.py @@ -8,8 +8,7 @@ import threading from collections.abc import Sequence - -from typing_extensions import ( +from typing import ( TYPE_CHECKING, Any, Final, @@ -17,11 +16,18 @@ Protocol, TypeVar, cast, - deprecated, final, - override, ) +try: + from typing_extensions import deprecated, override +except ImportError: + if TYPE_CHECKING: + assert False + else: + deprecated = lambda *args, **kwargs: lambda x: x + override = lambda x: x + _T = TypeVar("_T") _Value_co = TypeVar("_Value_co", covariant=True)