Skip to content
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 2.0 #1177

Open
pmdevita opened this issue Aug 24, 2023 · 5 comments
Open

Upgrade to SQLAlchemy 2.0 #1177

pmdevita opened this issue Aug 24, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@pmdevita
Copy link
Contributor

pmdevita commented Aug 24, 2023

SQLAlchemy 2.0 brings full typing support, performance improvements, and some support for declarative model creation and dataclasses which might prove interesting. It also solves this security issue here https://pyup.io/v/51668/f17/ It would be ideal to upgrade to it to keep receiving support.

Currently, we need to wait on databases to add support for it, but it seems they have a mostly working PR here encode/databases#540

I'd be willing to put in a PR for it once that's ready.

@pmdevita pmdevita added the enhancement New feature or request label Aug 24, 2023
@zanieb
Copy link

zanieb commented Aug 29, 2023

Just a heads up that the referenced pull request isn't moving forward very quickly and databases is short on maintainers — I'm the only one reviewing things right now and am not a user. If someone is interested in helping out on that pull request it may be appreciated!

@pmdevita
Copy link
Contributor Author

At long last the PR is merged! I'll start taking a look at integrating it on our end.

It might also be worth looking at https://github.com/tarsil/databasez which is a more actively maintained fork

@alexol91
Copy link

alexol91 commented Mar 4, 2024

Please, we need an urgent update at least temporary support to SQLAlchemy==1.4.52

I know you're working on SQLAlchemy 2 and Pydantic 2, but we need ORMAR to support SQLAlchemy 1.4.52 at least.

I am receiving:
ormar 0.12.2 depends on SQLAlchemy<1.4.42 and >=1.3.18

Many external dependencies are waiting for this version and I'm stuck

@pmdevita
Copy link
Contributor Author

pmdevita commented Mar 4, 2024

If you need something right now, you can install Ormar from my SQLAlchemy 2 branch https://github.com/pmdevita/ormar/tree/feature/sqlalchemy2 Everything should be working now and a number of dependencies are updated since the minimum version of Python has been increased to 3.8

@jamesbraza
Copy link

@alexol91 as programmers, we must learn the dark arts of using workarounds :). In case you didn't know about these:

  • Direct install: pip install git+https://github.com/pmdevita/ormar.git@feature/sqlalchemy2
  • requirements.txt: ormar @ git+https://github.com/pmdevita/ormar.git@feature/sqlalchemy2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants