-
Notifications
You must be signed in to change notification settings - Fork 332
Introduce sqlalchemy 2.0 compatibility #614
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
Conversation
2d0fcab to
6c3e7f7
Compare
|
Resolved merge conflicts |
|
thank you for adding this! any plans to release a new version of |
|
I uploaded new version to PyPi |
|
Thanks @kvesteri! |
|
I am unable to use this package with the beta releases of SQL Alchemy 2.0. from sqlalchemy_utils import Ltree, LtreeType, force_auto_coercion
../../../../venvs/pkg-py-postgres-crud/lib/python3.10/site-packages/sqlalchemy_utils/__init__.py:59: in <module>
from .types import ( # noqa
../../../../venvs/pkg-py-postgres-crud/lib/python3.10/site-packages/sqlalchemy_utils/types/__init__.py:42: in <module>
from .uuid import UUIDType # noqa
../../../../venvs/pkg-py-postgres-crud/lib/python3.10/site-packages/sqlalchemy_utils/types/uuid.py:8: in <module>
sqlalchemy_version = tuple([int(v) for v in __version__.split(".")])
../../../../venvs/pkg-py-postgres-crud/lib/python3.10/site-packages/sqlalchemy_utils/types/uuid.py:8: in <listcomp>
sqlalchemy_version = tuple([int(v) for v in __version__.split(".")])
E ValueError: invalid literal for int() with base 10: '0b3'Seems to be just a minor version check. I assume this is intentional? I was hoping to see how many things would break with the beta version and I can't tell because SQLAlchemy-Utils fails out |
This patch introduces the following changes:
Most of the warnings revolved around the following incompatibilities:
sqlalchemy.text().Query.get()calls must migrate toSession.get().select()calls must use positional parameters and must use generative method calls instead of keyword arguments (e.g.select(..., fromobj=...)must becomeselect(...).select_from(...)).Closes #513.