Will the project be updated with SQLAlchemy version 2.0? #547
-
First Check
Commit to Help
Example Code[tool.poetry]
name = "sqlmodel"
version = "0"
description = "SQLModel, SQL databases in Python, designed for simplicity, compatibility, and robustness."
authors = ["Sebastián Ramírez <[email protected]>"]
readme = "README.md"
homepage = "https://github.com/tiangolo/sqlmodel"
documentation = "https://sqlmodel.tiangolo.com"
repository = "https://github.com/tiangolo/sqlmodel"
license = "MIT"
exclude = ["sqlmodel/sql/expression.py.jinja2"]
classifiers = [
"Development Status :: 4 - Beta",
"Framework :: AsyncIO",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Topic :: Database",
"Topic :: Database :: Database Engines/Servers",
"Topic :: Internet",
"Topic :: Internet :: WWW/HTTP :: HTTP Servers",
"Topic :: Internet :: WWW/HTTP",
"Typing :: Typed",
]
[tool.poetry.dependencies]
python = "^3.6.1"
SQLAlchemy = ">=1.4.17,<=1.4.41"
pydantic = "^1.8.2"
sqlalchemy2-stubs = {version = "*", allow-prereleases = true} DescriptionUsing FastAPI and SQLModel in my projects, I was wondering if the SQLAlchemy package used in SQLModel was going to be updated to the latest version 2.0.0 which was released on 26 January 2023 in order to use the latest features? Thank you very much for your feedback. Operating SystemLinux Operating System DetailsFedora Linux 36 SQLModel Version0.0.8 Python Version3.9.14 Additional ContextNo response |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 19 replies
-
Yes, it will. SQLModel 0.0.14 now has support for Pydantic v2, and it also keeps support for Pydantic v1. 🎉 |
Beta Was this translation helpful? Give feedback.
-
Tried to use SQLALchemy 2.0 without SQLModel (without writing both models and pydantic schemas) in Declerative Mapping style, and it turns out that it's not possible for edge cases. More info: sqlalchemy/sqlalchemy#10027 So, IMO SQLModel have still a role to play in a SQLAlchemy 2.0 context |
Beta Was this translation helpful? Give feedback.
-
There is no information about migrating to SQLAlchemy 2.0 and Pydantic v2. |
Beta Was this translation helpful? Give feedback.
Yes, it will.
But there are other things I have to update do first.SQLModel 0.0.14 now has support for Pydantic v2, and it also keeps support for Pydantic v1. 🎉