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

Towards SQLAlchemy 2.0: fix last cases of RemovedIn20Warning #17132

Merged
merged 12 commits into from Dec 12, 2023

Conversation

jdavcs
Copy link
Member

@jdavcs jdavcs commented Dec 5, 2023

Ref: #12541

Fixes last explicit warnings triggered by Galaxy tests.

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

"RemovedIn20Warning: The legacy calling style of select() is deprecated
and will be removed in SQLAlchemy 2.0."
"RemovedIn20Warning: The connection.execute() method in SQLAlchemy 2.0 will accept parameters as a single dictionary"
"RemovedIn20Warning: Retrieving row members using strings or other non-integers is deprecated"
Note: I think we never needed this method here; select_from is all we need.
Note: this was happening because the connection object was retrieved
from the session, which means that it may have been in a transaction.
What we need is a *new* connection, which we obtain directly from the
engine - so we know it's not in a transaction.
@jdavcs jdavcs changed the title [wip] SA2.0: fixing last warnings Towards SQLAlchemy 2.0: fix last cases of RemovedIn20Warning Dec 11, 2023
@jdavcs jdavcs marked this pull request as ready for review December 11, 2023 22:12
@github-actions github-actions bot added this to the 23.2 milestone Dec 11, 2023
@jdavcs jdavcs requested a review from a team December 12, 2023 14:20
@mvdbeek mvdbeek merged commit 819a799 into galaxyproject:dev Dec 12, 2023
50 of 53 checks passed
Copy link

This PR was merged without a "kind/" label, please correct.

@jdavcs jdavcs added kind/refactoring cleanup or refactoring of existing code, no functional changes and removed area/testing area/workflows area/testing/integration labels Dec 12, 2023
@mvdbeek mvdbeek modified the milestones: 23.2, 24.0 Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/database Galaxy's database or data access layer kind/refactoring cleanup or refactoring of existing code, no functional changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants