[moz] fix(ci): pin pydantic<2 for Python 3.9 compatibility
CI / lint (pull_request) Successful in 16s
CI / test (pull_request) Successful in 3m26s
CI / frontend (pull_request) Successful in 21s
CI / notify-on-failure (pull_request) Successful in 0s

CI runner 使用系统 Python 3.9.6,pydantic 2.x 需要 >=3.10。
不加约束时 pip 间歇性无法找到兼容版本(flaky)。
项目仅使用 BaseModel(1.x/2.x 均兼容),pin <2 安全。

Closes #98
This commit is contained in:
cfdaily
2026-06-20 11:06:45 +08:00
parent 23d8691b3f
commit 59c95d4125
+1 -1
View File
@@ -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: |