-
Notifications
You must be signed in to change notification settings - Fork 183
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
Support SQLAlchemy 2.0 with sqlalchemy-oso
#1739
Conversation
.github/workflows/test.yml
Outdated
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.
Are these changes intended to ship?
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.
Pinning Rust: yes, the other ones no
@@ -118,7 +118,6 @@ def test_get_column_entities(stmt, o): | |||
(select(A), set()), | |||
(select(A).options(joinedload(A.bs)), {B}), | |||
(select(A).options(joinedload(A.bs).joinedload(B.cs)), {B, C}), | |||
(select(A).options(Load(A).joinedload("bs")), {B}), |
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.
Why'd this one go?
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.
This is an invalid way of calling it in 2.0
if USING_SQLAlchemy_v2_0: | ||
tables = "tags, post_tags" | ||
else: | ||
tables = "post_tags, tags" |
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.
what in the world– why does this order matter???
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.
It matters because we do a string comparison of the SQL we get back. SQLAlchemy 2.0 reordered these a little. We have this pattern elsewhere.
Would be nice if we had snapshots like with insta!
Adds support for sqlalchemy 2.0