From 6866e8c50c301347d9668c045f15817ed4e6a5cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=82=85=E7=AB=8B=E4=B8=9A=EF=BC=88Chris=20Fu=EF=BC=89?= <17433201@qq.com> Date: Tue, 23 Sep 2025 14:15:08 +0800 Subject: [PATCH 1/2] Bump version to 0.1.7 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 = [ From 74ee9f141ed371929320fad9d79346faa3a4d0ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=82=85=E7=AB=8B=E4=B8=9A=EF=BC=88Chris=20Fu=EF=BC=89?= <17433201@qq.com> Date: Tue, 23 Sep 2025 14:18:26 +0800 Subject: [PATCH 2/2] No longer depends on `typing_extensions` --- runtime_keypath/_core.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) 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)