diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b6e43e9..989f6294 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # 更新日志 +## Alconna 1.7.10 + +### 修复: +- 修复类型导致的 py3.8 兼容性问题 + ## Alconna 1.7.9 ### 改进: diff --git a/src/arclet/alconna/__init__.py b/src/arclet/alconna/__init__.py index dc75c9a2..51dcd73d 100644 --- a/src/arclet/alconna/__init__.py +++ b/src/arclet/alconna/__init__.py @@ -21,7 +21,7 @@ from .duplication import Duplication from .stub import ArgsStub, OptionStub, SubcommandStub -__version__ = "1.7.9" +__version__ = "1.7.10" # backward compatibility Arpamar = Arparma diff --git a/src/arclet/alconna/args.py b/src/arclet/alconna/args.py index a5e72483..1fd7ad42 100644 --- a/src/arclet/alconna/args.py +++ b/src/arclet/alconna/args.py @@ -7,7 +7,7 @@ from copy import deepcopy from enum import Enum from functools import partial -from typing import Any, Callable, Generic, Iterable, Sequence, TypeVar, Union +from typing import Any, Callable, Generic, Iterable, Sequence, TypeVar, Union, Type from nepattern import AllParam, AnyOne, BasePattern, RawStr, UnionPattern, all_patterns, type_parser from tarina import Empty, get_signature, lang @@ -24,7 +24,7 @@ def safe_dcls_kw(**kwargs): _T = TypeVar("_T") -TAValue: TypeAlias = Union[BasePattern[_T], type[_T], str] +TAValue: TypeAlias = Union[BasePattern[_T], Type[_T], str] STRING = all_patterns()[str]