馃敶 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:
- Install 'google-adk[db]' (tested with
v2.10.0); this needs to install sqlalchemy>=2.1
- Instantiate a DatabaseSessionService
- 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.
馃敶 Required Information
Describe the Bug:
With the recent new release of
sqlalchemy(v2.1),sqlalchemydoes no longer install thegreenletdependency by default. Consequently, with onlygoogle-adk[db]and an install after the release ofsqlalchemyinv2.1, the db-related async functionality is missing and instantiatingDatabaseSessionServiceresults inNameError: name 'create_async_engine' is not defined.Steps to Reproduce:
v2.10.0); this needs to installsqlalchemy>=2.1Expected Behavior:
Instantiating
DatabaseSessionServiceshould pass normally.Observed Behavior:
A
NameErroroccurs due to the missinggreenletdependency.Environment Details:
2.10.0(but earlier version should be affected alike)3.13.13Model Information:
gemini-3.7-flash馃煛 Optional Information
Regression:
This worked fine with
~v2.0ofsqlalchemy.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 installsqlalchemywith theasyncioextra.