fix(deps): declare sqlalchemy[asyncio] extra for greenlet compatibility - #528
Draft
liujuanjuan1984 wants to merge 1 commit into
Draft
liujuanjuan1984 wants to merge 1 commit into
liujuanjuan1984 wants to merge 1 commit into
Conversation
SQLAlchemy 2.1 (released 2026-09-24) made greenlet an optional dependency, so asyncio usage now requires the explicit sqlalchemy[asyncio] install target. The wheel smoke test installs the built wheel without repository constraints and picked up sqlalchemy 2.1.1, causing 'ImportError: The SQLAlchemy asyncio module requires that the Python greenlet library is installed.' during server startup (opencode-a2a#527 CI failure on Validate Default Toolchain / Smoke test built wheel). Declaring the extra in project dependencies carries greenlet into the wheel metadata for all install paths. Verified locally: uv build + scripts/smoke_test_built_cli.sh passes with sqlalchemy 2.1.1 + greenlet 3.5.6, and ./scripts/doctor.sh is green.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CI 修复:wheel 冒烟测试因 SQLAlchemy 2.1 缺失 greenlet 而失败
根因(来自真实 CI 日志)
Validate Default Toolchain检查在Smoke test built wheel步骤失败:冒烟脚本以uv tool install <wheel>安装构建产物(不带仓库 uv.lock / constraint-dependencies),解析到 2026-09-24 发布的 SQLAlchemy 2.1.0。sqlalchemy[asyncio]。服务启动时抛出:ImportError: The SQLAlchemy asyncio module requires that the Python 'greenlet' library is installed.→
Application startup failed. Exiting.→/health健康检查失败。修复
pyproject.toml项目依赖声明由sqlalchemy>=2.0,<3.0改为sqlalchemy[asyncio]>=2.0,<3.0,使 greenlet 进入 wheel 元数据,覆盖所有安装路径(包括不读 lock 的uv tool install冒烟路径)。uv.lock(因合并了上游 deps: bump the uv-all-updates group with 3 updates #526 的 uv-all-updates 组更新而重新解析)。本地验证
uv build --no-sources构建 wheel,METADATA 确认为Requires-Dist: sqlalchemy[asyncio]<3.0,>=2.0。bash ./scripts/smoke_test_built_cli.sh dist/*.whl通过:安装 sqlalchemy 2.1.1 + greenlet 3.5.6,服务正常启动并通过 /health 检查(即 CI 失败的同一场景)。./scripts/doctor.sh全绿(exit 0)。关联