Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

google-adk[db] is missing greenlet

未关闭 适合新手
#7,341 0 条评论 2 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 5 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
76/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
python, sqlalchemy
领域
databases

调研方向

通过使用 SQLAlchemy 2.1 安装 google-adk[db] 并实例化 DatabaseSessionService 来重现该失败。检查 package dependency metadata 以及 create_async_engine 调用附近的 database_session_service.py。当 db extra 安装所需的异步依赖,并且 DatabaseSessionService 能够在不出现所报告的 NameError 的情况下完成实例化时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

services

🔴 Required Information

Describe the Bug:
With the recent new release of sqlalchemy (v2.1), sqlalchemy does no longer install the greenlet dependency by default. Consequently, with only google-adk[db] and an install after the release of sqlalchemy in v2.1, the db-related async functionality is missing and instantiating DatabaseSessionService results in NameError: name 'create_async_engine' is not defined.

Steps to Reproduce:

  1. Install 'google-adk[db]' (tested with v2.10.0); this needs to install sqlalchemy>=2.1
  2. Instantiate a DatabaseSessionService
  3. Observe the error
db_engine = create_async_engine(db_url, **engine_kwargs)
                      ^^^^^^^^^^^^^^^^^^^
E         NameError: name 'create_async_engine' is not defined

.venv/lib/python3.13/site-packages/google/adk/sessions/database_session_service.py:393: NameError

Expected Behavior:
Instantiating DatabaseSessionService should pass normally.

Observed Behavior:
A NameError occurs due to the missing greenlet dependency.

Environment Details:

  • ADK Library Version (pip show google-adk): 2.10.0 (but earlier version should be affected alike)
  • Desktop OS:** Ubuntu 24.04 on WSL under Windows 11
  • Python Version (python -V): 3.13.13

Model Information:

  • Are you using LiteLLM: No
  • Which model is being used: gemini-3.7-flash

🟡 Optional Information

Regression:
This worked fine with ~v2.0 of sqlalchemy.

Additional Context:
Additionally installing greenlet (resp. sqlalchemy[asyncio]) solves the issue, but since ADK relies on async session so heavily, google-adk[db] really just should install sqlalchemy with the asyncio extra.

主要语言
Python
星标
21.6k
派生
4k
平均合并
12 小时 6 分钟
30 天内合并 PR
4

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

google/adk-python 的其他 Issue

查看 google/adk-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。