Skip to content

fix(deps): refresh dependencies and stabilize linting and SQLite pooling - #531

Merged
liujuanjuan1984 merged 2 commits into
mainfrom
dependabot/uv/uv-all-updates-290157a06b
Sep 29, 2026
Merged

liujuanjuan1984 merged 2 commits into
mainfrom
dependabot/uv/uv-all-updates-290157a06b

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

问题与结果

原依赖升级将 Ruff 锁定版本更新为 0.16.9,但 pre-commit 仍单独固定在 0.16.8,导致 lint 检查与开发环境版本再次漂移。同时,SQLAlchemy 2.1 对 mode=memory SQLite URI 自动选择 StaticPool 的行为发出弃用警告,未来默认变化可能影响内存数据库连接和状态。

本 PR 统一 Ruff 的版本来源,并在升级 SQLAlchemy/greenlet 的同时显式保留现有内存数据库连接池行为。

变更

  • 保留 Dependabot 的升级:click 8.4.2 → 8.5.0、uvicorn 0.53.0 → 0.54.0、Ruff 0.16.8 → 0.16.9。
  • 追加锁定版本升级:SQLAlchemy 2.0.54 → 2.1.1、greenlet 3.5.5 → 3.5.6;其余包版本不因追加调整而改变。
  • Ruff 改用 local hooks,通过 uv run --locked --extra dev 执行检查和格式化,以 uv.lock 为单一版本来源。保留原来的自动修复、--force-exclude、串行执行及各 hook 的文件类型筛选。
  • 空 SQLite URL、:memory: URL 和 mode=memory URI 显式选择 StaticPool;文件数据库保留默认连接池及既有文件加固逻辑。
  • 扩充数据库回归:四种内存 URL 无弃用警告、重叠取用连接时共享实际连接并保留状态、不执行文件加固;文件数据库仍可使用不同连接并保持 SQLite PRAGMA 设置。
  • 同步 lint 工具链和数据库行为文档。

验证

  • ./scripts/doctor.sh 完整通过:pre-commit 无自动修改、mypy(88 个源文件)、831 项测试、93.33% 覆盖率及门槛、构建和独立 wheel 安装冒烟。
  • 新增内存 URI 回归在修复前有 2 项因 SQLAlchemy 弃用警告失败;修复后数据库测试 17/17 通过。
  • 原 SQLAlchemy 2.0.54 环境的数据库与 task-store 回归 48/48 通过。
  • scripts/dependency_health.sh 通过,运行时与开发依赖未发现已知漏洞。
  • uv run --locked --extra dev ruff --version 确认为 0.16.9;pre-commit validate-config、uv lock --check、git diff --check 通过。

最新提交 10593d0 的远端 5 项检查全部通过:默认工具链(含运行时审计、wheel/sdist 安装冒烟)、Python 3.11/3.12/3.13 矩阵及 protobuf 6 兼容性检查。未执行真实 OpenCode 上游集成测试,本次没有更改上游调用或 A2A wire contract。

Closes #532

Bumps the uv-all-updates group with 3 updates: [click](https://github.com/pallets/click), [uvicorn](https://github.com/Kludex/uvicorn) and [ruff](https://github.com/astral-sh/ruff).


Updates `click` from 8.4.2 to 8.5.0
- [Release notes](https://github.com/pallets/click/releases)
- [Changelog](https://github.com/pallets/click/blob/main/CHANGES.md)
- [Commits](pallets/click@8.4.2...8.5.0)

Updates `uvicorn` from 0.53.0 to 0.54.0
- [Release notes](https://github.com/Kludex/uvicorn/releases)
- [Changelog](https://github.com/Kludex/uvicorn/blob/main/docs/release-notes.md)
- [Commits](Kludex/uvicorn@0.53.0...0.54.0)

Updates `ruff` from 0.16.8 to 0.16.9
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](astral-sh/ruff@0.16.8...0.16.9)

---
updated-dependencies:
- dependency-name: click
  dependency-version: 8.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: uv-all-updates
- dependency-name: uvicorn
  dependency-version: 0.54.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: uv-all-updates
- dependency-name: ruff
  dependency-version: 0.16.9
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: uv-all-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
@liujuanjuan1984

Copy link
Copy Markdown
Collaborator

评估结论

本 PR 的三项升级总体合理,属于现有版本范围内的常规依赖维护;建议补齐 Ruff 版本来源的一致性后合并。未发现本 PR 引入的运行时阻断问题,也没有证据表明这是必须紧急发布的安全修复。

本次升级

  • click 8.4.2 → 8.5.0:项目 CLI 使用 argparse,通过程序化接口启动 uvicorn;Click 功能变化的直接影响较小。lockfile 中移除 Click 对 colorama 的 Windows 依赖符合上游变更。
  • uvicorn 0.53.0 → 0.54.0:主要新增实验性、显式启用的 HTTP/2 能力;本项目没有启用该路径,不会因版本升级自动开启 HTTP/2。
  • Ruff 0.16.8 → 0.16.9:修复规则误报等问题,适合升级。

建议随本 PR 处理:消除 Ruff 双重版本配置

uv.lock 已变为 0.16.9,但 .pre-commit-config.yaml:16 仍为 0.16.8;doctor/CI 的 lint 使用 pre-commit,所以 CI 通过不代表新版 Ruff 已参与检查。我已独立运行 0.16.9 的 check/format,均通过。

推荐将 Ruff hooks 改为仓库 local hooks,通过 uv run --locked --extra dev ruff check --fix 与 uv run --locked --extra dev ruff format 使用锁定版本,保留现有 Python/pyi/notebook 文件筛选语义。这样后续 Dependabot 升级只需更新 uv.lock。若选择最小修改,也应把 hook rev 同步到 v0.16.9,但仍需持续人工维护两个版本来源。

其他依赖候选

SQLAlchemy 2.0.54 → 2.1.1、greenlet 3.5.5 → 3.5.6 值得跟进,可缩小锁定环境与独立发布安装之间的版本差异。已在独立环境安装这两项并禁用 uv 自动同步,完整回归 829 项通过,但出现一条 SADeprecationWarning:

src/opencode_a2a/server/database.py:165 对 file:...?mode=memory&... SQLite URI 依赖自动选择 StaticPool,SQLAlchemy 提示未来改用 AsyncAdaptedQueuePool。若纳入这组升级,应同时显式保留内存 URI 的 StaticPool 行为,并补充无弃用警告及跨连接内存状态的回归;这不是 #531 新引入的故障。

其余过期版本不等同于安全问题。本次运行时+开发依赖审计未发现已知漏洞,不建议仅为追新而批量扩展范围;保留现有 SDK pin、protobuf 6/7 范围和发布包安全下限。

验证

评估基于 PR head 11bb369:

  • 远端 5 项检查全部通过,包含 Python 3.11/3.12/3.13 及 protobuf 6。
  • 本地 ./scripts/doctor.sh 全通过:829 项测试、93.33% 覆盖率、构建和独立 wheel 安装冒烟。
  • scripts/dependency_health.sh 通过:依赖兼容性正常,运行时+开发依赖未发现已知漏洞。
  • Ruff 0.16.9 check 和 format --check 均通过。
  • SQLAlchemy 2.1.1 / greenlet 3.5.6 候选环境:829 passed, 1 warning(上述内存 URI 弃用提示)。

本次仅评估并记录建议,未修改 PR 代码或合并 PR。

Use the locked Ruff toolchain and upgrade SQLAlchemy/greenlet while retaining explicit in-memory connection reuse.

Refs #532
@liujuanjuan1984 liujuanjuan1984 changed the title deps: bump the uv-all-updates group with 3 updates fix(deps): refresh dependencies and stabilize linting and SQLite pooling Sep 29, 2026
@liujuanjuan1984
liujuanjuan1984 merged commit 2b6efa7 into main Sep 29, 2026
5 checks passed
@liujuanjuan1984
liujuanjuan1984 deleted the dependabot/uv/uv-all-updates-290157a06b branch September 29, 2026 11:44
@liujuanjuan1984

Copy link
Copy Markdown
Collaborator

已完成 v1.3.4 发布:

  • 标签基于合并后的 main(2b6efa7)创建并推送。
  • 自动发布流程完整成功:doctor.sh、运行时依赖安全审计、版本校验、wheel/sdist 安装验证以及 PyPI 发布均通过。
  • GitHub Release 已发布,wheel、sdist 和 SHA256SUMS 附件齐全;发布说明已按此前风格精简为依赖及 SQLite 兼容性、Ruff 版本统一两条重点。
  • 已确认开发分支内容完整合并并清理对应本地分支及 worktree;主工作目录保持干净并停留在最新 main。关联 统一 Ruff 版本来源并完善 SQLAlchemy 2.1 内存数据库兼容性 #532 已关闭。

查看 v1.3.4 · 发布验证记录

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

统一 Ruff 版本来源并完善 SQLAlchemy 2.1 内存数据库兼容性

1 participant