From 59c95d4125abced8bc6b959f65a097ab5560cc08 Mon Sep 17 00:00:00 2001 From: cfdaily Date: Sat, 20 Jun 2026 11:06:45 +0800 Subject: [PATCH] [moz] fix(ci): pin pydantic<2 for Python 3.9 compatibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CI runner 使用系统 Python 3.9.6,pydantic 2.x 需要 >=3.10。 不加约束时 pip 间歇性无法找到兼容版本(flaky)。 项目仅使用 BaseModel(1.x/2.x 均兼容),pin <2 安全。 Closes #98 --- .gitea/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index a7ed798..726bff2 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -51,7 +51,7 @@ jobs: rm -rf /tmp/ci-venv-test python3 -m venv /tmp/ci-venv-test /tmp/ci-venv-test/bin/pip install --quiet --upgrade pip - /tmp/ci-venv-test/bin/pip install --quiet --no-cache-dir fastapi pydantic pyyaml uvicorn requests pytest pytest-asyncio httpx + /tmp/ci-venv-test/bin/pip install --quiet --no-cache-dir 'fastapi' 'pydantic<2' pyyaml uvicorn requests pytest pytest-asyncio httpx - name: Debug environment run: | -- 2.45.4