-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to SQLAlchemy 1.4 and convert endpoints to asyncio #359
Conversation
0bce50f
to
16788ca
Compare
{{cookiecutter.project_slug}}/backend/app/app/tests/utils/user.py
Outdated
Show resolved
Hide resolved
yield db | ||
finally: | ||
db.close() | ||
async def get_db() -> Generator: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AsyncGenerator
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pytest = "^5.4.1" | ||
python-jose = {extras = ["cryptography"], version = "^3.1.0"} | ||
asyncpg = "^0.22.0" | ||
httpx = "^0.17.1" | ||
SQLAlchemy = "^1.4.5" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1.4.10 or just ^1.4?
@jianyuan This branch is an excellent reference! |
Missed a couple in the start-up. |
Celery doesn't yet have a way to queue tasks without blocking the asyncio loop or resorting to |
As a warning for others, the |
I think it's compatible with SQLAlchemy, but Pyright doesn't make use of sqla mypy extension. If you want VS Code to show SQLAlchemy typing errors you're better off using the mypy extension for VS Code which has gotten better lately. I configured it and it works nicely, but I disabled default typing errors in VS Code. |
Thanks @jianyuan! 🙇 I wanted to migrate to SQLModel, it was done in another PR, that is based on SQLAlchemy 2.0. 🎉 So, now I'll close this one, but thanks for all the effort! 🍰 |
@tiangolo , if you were even remotely grateful for the effort you would have signalled something before 3 YEARS after the PR. I know, you are busy, but there were plenty of people submitting PRs and presumably many who could have spent a little effort to keep things updated without you having to spend time. But no, a single (big name) maintainer who just ghosts everyone and their PRs for YEARS, then comes back as if it were last week... |
* 🧱 Add failed status for docker builder when it fails * 🧱 Add support for uv on builder * 🚚 Rename Dockerfile.uv to Dockerfile.requirements
Addresses: #315