Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

google-adk[db] is missing greenlet

未關閉 適合新手
#7,341 0 則留言 2 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 5 天內回覆

還沒有人認領這個 Issue。

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
76/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
python, sqlalchemy
領域
databases

研究方向

透過使用 SQLAlchemy 2.1 安裝 google-adk[db] 並實例化 DatabaseSessionService 來重現此失敗。檢查套件相依性中繼資料,以及 create_async_engine 呼叫附近的 database_session_service.py。當 db extra 安裝必要的非同步相依性,且 DatabaseSessionService 能夠在不出現所回報的 NameError 的情況下完成實例化時,即表示完成。

由索引模型根據 Issue 內容生成。

描述

🔴 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 摘要。