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

Flask-SQLAlchemy-3.0.0 breaks sqlalchemy-oso #1631

Open
snstanton opened this issue Oct 4, 2022 · 7 comments
Open

Flask-SQLAlchemy-3.0.0 breaks sqlalchemy-oso #1631

snstanton opened this issue Oct 4, 2022 · 7 comments

Comments

@snstanton
Copy link
Contributor

Installing Flask-SQLAlchemy-3.0.0 breaks sqlalchemy-oso queries. The policy does not appear to be applied at all.

@gj
Copy link
Member

gj commented Oct 7, 2022

Hi @snstanton, thanks for opening the issue. I'm not sure we're going to have time to enable support for Flask-SQLAlchemy 3 soon, but we definitely want to prevent sqlalchemy-oso users from accidentally using an incompatible version of Flask-SQLAlchemy. I'll look into that (need to shift back to my Python shoes from the Rust and TypeScript ones I've been wearing recently 😄), but we'd also definitely accept a PR if you're feeling up to a contribution!

@kkirsche
Copy link
Contributor

kkirsche commented Feb 1, 2023

I believe this may be related in part to #1667 as 3.0.0 was rewritten to the new query styles used in SQLAlchemy 2. I could be wrong here, but that'd be my expectation based on what's changed in each of the various libraries.

There certainly are more changes, but based on what I've seen in the sqlalchemy-oso library it's not integrating on most of the Flask-specific integrations.

Reference:

https://github.com/pallets-eco/flask-sqlalchemy/releases/tag/3.0.0

https://flask-sqlalchemy.palletsprojects.com/en/3.0.x/changes/#version-3-0-0

@kkirsche
Copy link
Contributor

Flask-SQLAlchemy 3.1.1 now requires SQLAlchemy >=2.0.16

Because no versions of sqlalchemy-oso match >0.27.0,<0.28.0
 and sqlalchemy-oso (0.27.0) depends on SQLAlchemy (>=1.3.17,<1.5), sqlalchemy-oso (>=0.27.0,<0.28.0) requires SQLAlchemy (>=1.3.17,<1.5).
And because flask-sqlalchemy (3.1.1) depends on sqlalchemy (>=2.0.16)
 and no versions of flask-sqlalchemy match >3.1.1,<4.0.0, sqlalchemy-oso (>=0.27.0,<0.28.0) is incompatible with flask-sqlalchemy (>=3.1.1,<4.0.0).
So, because hades depends on both flask-sqlalchemy (^3.1.1) and sqlalchemy-oso (^0.27.0), version solving failed.

@gj
Copy link
Member

gj commented Dec 3, 2024

Hey @zspotter, I'd be happy to take a look at a PR

@zspotter
Copy link

zspotter commented Dec 4, 2024

Ooh great to know @gj! I'll try to find some time this or next week

@zspotter
Copy link

zspotter commented Dec 6, 2024

🤦 sorry for the noise, @gj. Turns out I was mistaken about my app's use of sqlalchemy-oso, and I never had a fully working patch!

(deleted my above misleading comment)

@gj
Copy link
Member

gj commented Dec 6, 2024

No worries! Appreciate the follow-up ❤️

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

No branches or pull requests

4 participants