Wrong dependencies resolving for SQLAlchemy[postgresql_asyncpg]
See original GitHub issue- I am on the latest Poetry version.
- I have searched the issues of this repo and believe that this is not a duplicate.
- If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option).
- OS version and name: MacOS 12.2.1 on Apple M1 chip
- Poetry version: 1.1.13
- Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/evgen231/1cda84fbf99b826f9ed611d969fdd01e
Issue
After installing SQLAlchemy with postgresql_asyncpg extra there is no greenlet dependency.
# poetry update
Creating virtualenv example-OWA4dUH3-py3.9 in /Users/.../Library/Caches/pypoetry/virtualenvs
Updating dependencies
Resolving dependencies... (0.1s)
Writing lock file
Package operations: 2 installs, 0 updates, 0 removals
• Installing asyncpg (0.25.0)
• Installing sqlalchemy (1.4.35)
# poetry run pip freeze
asyncpg @ .../asyncpg-0.25.0.tar.gz
SQLAlchemy @ .../SQLAlchemy-1.4.35.tar.gz
Using pip:
# python -m pip install 'sqlalchemy[postgresql_asyncpg]'
...
# python -m pip freeze
asyncpg==0.25.0
greenlet==1.1.2
SQLAlchemy==1.4.35
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:12 (7 by maintainers)
Top Results From Across the Web
python - SQLAlchemy with asyncpg crashing with error ...
The error disappeared after adding poolclass=NullPool to create_async_engine, so here's what engine creation looks like now:
Read more >Problems with await in async dependencies (when ... - GitHub
After close' in console). If you run this code as it is and use curl or aiohttp to send request, then "await db.close()"...
Read more >Asynchronous I/O (asyncio) - SQLAlchemy 1.4 Documentation
To install SQLAlchemy while ensuring the greenlet dependency is present ... "postgresql+asyncpg://scott:tiger@localhost/test", echo=True, ...
Read more >SqlAlchemy 1.4 async ORM with FastAPI - rogulski.it
This tutorial will present how to set up a production-ready application running on FastAPI, PostgreSQL, SQLAlchemy 1.4, and alembic.
Read more >Flask by Example – Setting up Postgres, SQLAlchemy, and ...
In part two, we'll set up our PostgreSQL database along with SQLAlchemy and ... app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False db = SQLAlchemy(app) ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I don’t see anything much to agree or disagree with…
Per this comment I do believe that it’s a bug. I’ve a half-memory of taking a closer look back then and deciding that it was likely to be painful. But I haven’t tried again and, you never know, maybe it’ll turn out to be easy.
I already have
sqlalchemy[asyncio]
… I seegreenlet
in the lock file as a dependency but it does not get installed - this is the part that’s not workingbut explicitly adding greenlet via
poetry add greenlet
does fix it for me