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

feat: support SQLAlchemy 2.0, raise minimum required version to 1.4.x #1053

Merged
merged 74 commits into from
Apr 3, 2024

Conversation

tswast
Copy link
Collaborator

@tswast tswast commented Apr 2, 2024

BEGIN_COMMIT_OVERRIDE
feat: support SQLAlchemy 2.0, raise minimum required version to 1.4.x (#920, #1053)

fix: fix grouping sets, rollup and cube rendering issue (#1019, #1053)
END_COMMIT_OVERRIDE

Opening per internal issue 315888151 to get @kiraksi's changes into main now that they've been validated in prereleases.

🦕

sharoonthomas and others added 30 commits November 7, 2023 15:07
This patch makes this library backward incompatible for
versions of SQLAlchemy < 2.0.

Fixes #510
CHANGELOG.md Outdated
@@ -13,6 +13,30 @@ Older versions of this project were distributed as [pybigquery][0].

[2]: https://pypi.org/project/pybigquery/#history

## [1.11.0.dev3](https://github.com/googleapis/python-bigquery-sqlalchemy/compare/v1.9.0...v1.11.0.dev3) (2024-02-20)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tswast tswast changed the title feat: Support SQLAlchemy 2.0, raise minimum required version to 1.4.x feat: support SQLAlchemy 2.0, raise minimum required version to 1.4.x Apr 2, 2024
@tswast tswast requested review from shollyman, chalmerlowe and Linchin and removed request for glasnt and alvarowolfx April 2, 2024 20:34
README.rst Outdated Show resolved Hide resolved
noxfile.py Outdated
@@ -369,7 +369,7 @@ def compliance(session):
session.skip("Compliance tests were not found")

session.install("--pre", "grpcio")
session.install("--pre", "--no-deps", "--upgrade", "sqlalchemy<2.0.0")
session.install("--pre", "--no-deps", "--upgrade", "sqlalchemy>=1.4.16,<2.1")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2.1 isn't out yet. Let's delete the max version, especially here in prerelease tests, so we get a heads up if we do end up being incompatible with it.

@tswast tswast added the owlbot:run Add this label to trigger the Owlbot post processor. label Apr 2, 2024
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Apr 2, 2024
Copy link
Collaborator

@chalmerlowe chalmerlowe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor tweak to comment

noxfile.py Outdated
@@ -369,7 +369,7 @@ def compliance(session):
session.skip("Compliance tests were not found")

session.install("--pre", "grpcio")
session.install("--pre", "--no-deps", "--upgrade", "sqlalchemy<2.0.0")
session.install("--pre", "--no-deps", "--upgrade", "sqlalchemy>=1.4.16,<2.1")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
session.install("--pre", "--no-deps", "--upgrade", "sqlalchemy>=1.4.16,<2.1")
session.install("--pre", "--no-deps", "--upgrade", "sqlalchemy>=1.4.16")

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in dfbfcc3

I don't think we need to be installing prerelease versions in compliance session at all.

noxfile.py Outdated
@@ -543,7 +543,7 @@ def prerelease_deps(session):

prerel_deps = [
"protobuf",
"sqlalchemy<2.0.0",
"sqlalchemy>=1.4.16,<2.1",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"sqlalchemy>=1.4.16,<2.1",
"sqlalchemy>=1.4.16",

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in dfbfcc3

I don't think we need the >= part since this will install the latest compatible version.

Copy link
Collaborator

@chalmerlowe chalmerlowe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor tweaks.

@chalmerlowe chalmerlowe self-assigned this Apr 3, 2024
@chalmerlowe
Copy link
Collaborator

chalmerlowe commented Apr 3, 2024

The failing check (Kokoro SQLAlchemy compliance) has a single failing test that swaps the order of values in the result versus what is expected.
Interestingly, this only happens on github. It does not happen locally.

AssertionError: ['BC', 'AB'] != ['AB', 'BC']

@tswast tswast requested a review from chalmerlowe April 3, 2024 17:20
Copy link
Collaborator

@chalmerlowe chalmerlowe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@chalmerlowe chalmerlowe merged commit 7a4c3c2 into main Apr 3, 2024
17 checks passed
@chalmerlowe chalmerlowe deleted the development-build-v1.11.0.dev3 branch April 3, 2024 18:33
bnaul added a commit to replicahq/pybigquery that referenced this pull request Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery-sqlalchemy API. size: xl Pull request size is extra large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants