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

Misc. SQLAlchemy 2.0 upgrades #13562

Merged
merged 12 commits into from
Mar 20, 2022
Merged

Misc. SQLAlchemy 2.0 upgrades #13562

merged 12 commits into from
Mar 20, 2022

Conversation

jdavcs
Copy link
Member

@jdavcs jdavcs commented Mar 16, 2022

Ref #12541

These are all safe and mostly trivial.

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 contributions under Galaxy's current license.
  • I agree to allow the Galaxy committers to license these and all my past contributions to the core galaxy codebase under the MIT license. If this condition is an issue, uncheck and just let us know why with an e-mail to [email protected].

jdavcs added 6 commits March 16, 2022 12:16
Ref:
https://docs.sqlalchemy.org/en/14/changelog/migration_20.html#library-level-but-not-driver-level-autocommit-removed-from-both-core-and-ormo
https://docs.sqlalchemy.org/en/14/changelog/migration_20.html#implicit-and-connectionless-execution-bound-metadata-removed

Exposed by the following tests:

test/unit/data/model/test_model_discovery.py::test_model_create_context_persist_hdas
test/unit/data/model/test_model_discovery.py::test_model_create_context_persist_error_hda
test/unit/data/model/test_model_discovery.py::test_persist_target_library_dataset
test/unit/data/model/test_model_discovery.py::test_persist_target_library_folder
test/unit/data/model/test_model_discovery.py::test_persist_target_hdca
  /home/sergey/0dev/galaxy/_galaxy/dev/lib/galaxy/model/triggers/utils.py:8: RemovedIn20Warning: The DDLElement.execute() method is considered legacy as of the 1.x series of SQLAlchemy and will be removed in 2.0. All statement execution in SQLAlchemy 2.0 is performed by the Connection.execute() method of Connection, or in the ORM by the Session.execute() method of Session. (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9)
    cmd.execute(bind=engine)

test/unit/data/model/test_model_discovery.py::test_model_create_context_persist_hdas
test/unit/data/model/test_model_discovery.py::test_model_create_context_persist_error_hda
test/unit/data/model/test_model_discovery.py::test_persist_target_library_dataset
test/unit/data/model/test_model_discovery.py::test_persist_target_library_folder
test/unit/data/model/test_model_discovery.py::test_persist_target_hdca
  /home/sergey/0dev/galaxy/_galaxy/dev/lib/galaxy/model/triggers/utils.py:8: RemovedIn20Warning: The Engine.execute() method is considered legacy as of the 1.x series of SQLAlchemy and will be removed in 2.0. All statement execution in SQLAlchemy 2.0 is performed by the Connection.execute() method of Connection, or in the ORM by the Session.execute() method of Session. (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9)
    cmd.execute(bind=engine)
@jdavcs jdavcs added kind/refactoring cleanup or refactoring of existing code, no functional changes area/database Galaxy's database or data access layer labels Mar 16, 2022
@jdavcs jdavcs added this to the 22.05 milestone Mar 16, 2022
@jdavcs jdavcs changed the title [WIP] Misc. SQLAlchemy 2.0 upgrades Misc. SQLAlchemy 2.0 upgrades Mar 17, 2022
@jdavcs jdavcs marked this pull request as ready for review March 17, 2022 16:43
@jmchilton jmchilton merged commit 4e01cfe into galaxyproject:dev Mar 20, 2022
@bgruening
Copy link
Member

Very cool @ic4f :-)

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.

3 participants