From 46aed81c34f9bcd57c23a3fe9ca6472b1c54eb44 Mon Sep 17 00:00:00 2001 From: RF-Tar-Railt Date: Sun, 1 Sep 2024 01:36:23 +0800 Subject: [PATCH] :bookmark: version 1.8.29 --- CHANGELOG.md | 28 ++++++++++++++++++++++++++++ pyproject.toml | 2 +- src/arclet/alconna/__init__.py | 2 +- 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f50c6a7..db57e071 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,33 @@ # 更新日志 +## 1.8.29 + +## 新增 + +- 内置行为器 `conflict`, 可以用来规定冲突选项/子命令/参数: + +```python +from arclet.alconna import Alconna, Option, conflict + +alc = Alconna("cmd", Option("--foo"), Option("--bar"), conflict("foo", "bar")) + +alc() +``` + +```shell +$ python conflict.py cmd --foo --bar +选项 foo 与 选项 bar 冲突 +``` + +## 改进 + +- 子节点的帮助现在会把前面的文本部分加上 +- 传入 `CommandMeta`, `behavior` 时现在不需要关键字 + +## 修复 + +- 升级 `Tarina` 依赖版本以避免特定python版本下特定字符串导致的 segfault 问题 + ## 1.8.28 ### 修复 diff --git a/pyproject.toml b/pyproject.toml index f3a994cd..ca00b931 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ authors = [ dependencies = [ "typing-extensions>=4.5.0", "nepattern<1.0.0,>=0.7.6", - "tarina>=0.5.5", + "tarina>=0.5.8", ] dynamic = ["version"] requires-python = ">=3.8" diff --git a/src/arclet/alconna/__init__.py b/src/arclet/alconna/__init__.py index 1c06f628..6baee32e 100644 --- a/src/arclet/alconna/__init__.py +++ b/src/arclet/alconna/__init__.py @@ -53,7 +53,7 @@ from .typing import Up as Up from .typing import StrMulti as StrMulti -__version__ = "1.8.28" +__version__ = "1.8.29" # backward compatibility AnyOne = ANY