Skip to content

fix: sqlalchemy dependencies - #12760

Merged
jackwotherspoon merged 5 commits into
GoogleCloudPlatform:mainfrom
wiktorn:cloudsql-sqlalchemy-verison-bump
Jan 23, 2025
Merged

fix: sqlalchemy dependencies#12760
jackwotherspoon merged 5 commits into
GoogleCloudPlatform:mainfrom
wiktorn:cloudsql-sqlalchemy-verison-bump

Conversation

@wiktorn

Copy link
Copy Markdown
Contributor

Description

SQLAlchemy v2.0.24 fails with Python 3.13 with error:

AssertionError: Class <class 'sqlalchemy.sql.elements.SQLCoreOperations'> directly inherits TypingOnly but has additional attributes {'__static_attributes__'}.

see bug #11334

Bumping version of SQLAlchemy and fixing Python to version 3.13 to avoid such problems in the future.

Checklist

@wiktorn
wiktorn requested review from a team as code ownersNovember 10, 2024 08:36
@product-auto-labelproduct-auto-labelBot added samples Issues that are directly related to samples. api: cloudsql labels Nov 10, 2024
@jackwotherspoon

Copy link
Copy Markdown
Contributor

@wiktorn

Copy link
Copy Markdown
ContributorAuthor

@jackwotherspoon Actually, both MySQL and SQL Server pinned python:3.11 (though different flavors). I aligned Dockerfiles and requirements.txt across these three.

Comment threadcloud-sql/mysql/sqlalchemy/Dockerfile Outdated
Comment threadcloud-sql/postgres/sqlalchemy/Dockerfile Outdated
@iennaeiennae added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 21, 2024
@kokoro-teamkokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 21, 2024
@iennae
iennae requested a review from a team as a code ownerNovember 21, 2024 07:06
@jackwotherspoon

Copy link
Copy Markdown
Contributor

Hi @wiktorn anything I can help with to get this PR across the line? 😄

It is blocking PR #12858 as Python 3.13 tests are now enabled on this repo

@jackwotherspoon

Copy link
Copy Markdown
Contributor

I have fixed the previous errors about the missing env vars so 🤞 builds should all pass after rebasing the PR

wiktornand others added 5 commits January 23, 2025 15:18
SQLAlchemy v2.0.24 fails with Python 3.13 with error:
```
AssertionError: Class <class 'sqlalchemy.sql.elements.SQLCoreOperations'> directly inherits TypingOnly but has additional attributes {'__static_attributes__'}.
```
[see bug GoogleCloudPlatform#11334](sqlalchemy/sqlalchemy#11334)
Bumping version of SQLAlchemy and fixing Python to version 3.13 to avoid
such problems in the future.
@wiktorn
wiktornforce-pushed the cloudsql-sqlalchemy-verison-bump branch from 6306134 to 6764846CompareJanuary 23, 2025 15:18
@wiktorn

Copy link
Copy Markdown
ContributorAuthor

Thanks @jackwotherspoon I just rebased, hopefully this will solve the issue!

@jackwotherspoonjackwotherspoon added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 23, 2025
@kokoro-teamkokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 23, 2025
@jackwotherspoon

Copy link
Copy Markdown
Contributor

Looks like all tests passed, just lint job failed for unable to get service account (flaky?), re-running tests to see if it was a a one off

@jackwotherspoonjackwotherspoon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM ✅

Thanks @wiktorn looks like we are all green 👍

@jackwotherspoon
jackwotherspoon merged commit dfdeaad into GoogleCloudPlatform:mainJan 23, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: cloudsqlsamplesIssues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@wiktorn@jackwotherspoon@iennae@kokoro-team@hessjcg