From 99e0c5cf75c0016f5f7cccf39937d01ac1233323 Mon Sep 17 00:00:00 2001 From: Sergey Golitsynskiy Date: Wed, 13 Oct 2021 15:06:16 -0400 Subject: [PATCH] Fix RemovedIn20Warning: use method chaining in select (see note) lib/galaxy/model/__init__.py:8937 /home/sergey/0dev/galaxy/_galaxy/dev/lib/galaxy/model/__init__.py:8937: RemovedIn20Warning: The legacy calling style of select() is deprecated and will be removed in SQLAlchemy 2.0. Please use the new calling style described at select(). (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9) exists([HistoryDatasetCollectionAssociation.id], and_( lib/galaxy/model/__init__.py:8945 /home/sergey/0dev/galaxy/_galaxy/dev/lib/galaxy/model/__init__.py:8945: RemovedIn20Warning: The legacy calling style of select() is deprecated and will be removed in SQLAlchemy 2.0. Please use the new calling style described at select(). (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9) exists([HistoryDatasetAssociation], and_( Ref: https://docs.sqlalchemy.org/en/14/errors.html#select-construct-created-in-legacy-mode-keyword-arguments-etc --- lib/galaxy/model/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/model/__init__.py b/lib/galaxy/model/__init__.py index fcfdc0cea22..075055ce987 100644 --- a/lib/galaxy/model/__init__.py +++ b/lib/galaxy/model/__init__.py @@ -9025,7 +9025,7 @@ mapper_registry.map_imperatively( # The following statements must not precede the mapped models defined above. Job.any_output_dataset_collection_instances_deleted = column_property( - exists([HistoryDatasetCollectionAssociation.id], and_( + exists(HistoryDatasetCollectionAssociation.id).where(and_( Job.id == JobToOutputDatasetCollectionAssociation.job_id, HistoryDatasetCollectionAssociation.id == JobToOutputDatasetCollectionAssociation.dataset_collection_id, HistoryDatasetCollectionAssociation.deleted == true()) @@ -9033,7 +9033,7 @@ Job.any_output_dataset_collection_instances_deleted = column_property( ) Job.any_output_dataset_deleted = column_property( - exists([HistoryDatasetAssociation], and_( + exists(HistoryDatasetAssociation).where(and_( Job.id == JobToOutputDatasetAssociation.job_id, HistoryDatasetAssociation.table.c.id == JobToOutputDatasetAssociation.dataset_id, HistoryDatasetAssociation.table.c.deleted == true())