From 9ad9c0c80a1521abec0404e319ef41d89d5a9c50 Mon Sep 17 00:00:00 2001 From: Eric Enns Date: Sun, 26 Jun 2016 14:08:06 -0500 Subject: [PATCH] Python 3: remaining model migrations --- .ci/py3_sources.txt | 106 ++++++++++++++++++ .../0024_page_slug_unique_constraint.py | 2 +- .../model/migrate/versions/0025_user_info.py | 6 +- .../migrate/versions/0026_cloud_tables.py | 6 +- .../migrate/versions/0027_request_events.py | 8 +- .../0028_external_metadata_file_override.py | 10 +- .../migrate/versions/0029_user_actions.py | 10 +- .../versions/0030_history_slug_column.py | 2 +- .../0031_community_and_workflow_tags.py | 28 ++--- .../0032_stored_workflow_slug_column.py | 2 +- ...lished_cols_for_histories_and_workflows.py | 14 +-- .../0034_page_user_share_association.py | 6 +- ...item_annotations_and_workflow_step_tags.py | 24 ++-- ...column_to_library_template_assoc_tables.py | 2 +- .../migrate/versions/0037_samples_library.py | 2 +- ...column_to_library_template_assoc_tables.py | 2 +- ...39_add_synopsis_column_to_library_table.py | 2 +- .../migrate/versions/0040_page_annotations.py | 6 +- .../versions/0041_workflow_invocation.py | 2 +- .../versions/0042_workflow_invocation_fix.py | 2 +- ...isualization_sharing_tagging_annotating.py | 34 +++--- ...0044_add_notify_column_to_request_table.py | 2 +- .../0045_request_type_permissions_table.py | 2 +- .../migrate/versions/0046_post_job_actions.py | 2 +- .../versions/0047_job_table_user_id_column.py | 12 +- .../0048_dataset_instance_state_column.py | 2 +- .../migrate/versions/0049_api_keys_table.py | 2 +- .../versions/0050_drop_cloud_tables.py | 6 +- .../0051_imported_col_for_jobs_table.py | 6 +- .../versions/0052_sample_dataset_table.py | 2 +- .../migrate/versions/0053_item_ratings.py | 24 ++-- .../versions/0054_visualization_dbkey.py | 2 +- .../versions/0055_add_pja_assoc_for_jobs.py | 2 +- .../migrate/versions/0056_workflow_outputs.py | 2 +- .../migrate/versions/0057_request_notify.py | 2 +- .../versions/0058_history_import_export.py | 6 +- .../versions/0059_sample_dataset_file_path.py | 2 +- .../versions/0060_history_archive_import.py | 4 +- .../model/migrate/versions/0061_tasks.py | 2 +- .../versions/0062_user_openid_table.py | 2 +- .../migrate/versions/0063_sequencer_table.py | 2 +- ...d_run_and_sample_run_association_tables.py | 2 +- ...0065_add_name_to_form_fields_and_values.py | 2 +- ...66_deferred_job_and_transfer_job_tables.py | 2 +- .../versions/0067_populate_sequencer_table.py | 2 +- ...8_rename_sequencer_to_external_services.py | 2 +- .../0069_rename_sequencer_form_type.py | 2 +- ...0_add_info_column_to_deferred_job_table.py | 6 +- ...0071_add_history_and_workflow_to_sample.py | 8 +- ...nd_socket_columns_to_transfer_job_table.py | 6 +- ...3_add_ldda_to_implicit_conversion_table.py | 6 +- ..._purged_column_to_library_dataset_table.py | 8 +- .../0075_add_subindex_column_to_run_table.py | 6 +- .../0076_fix_form_values_data_corruption.py | 14 +-- .../0077_create_tool_tag_association_table.py | 2 +- ...8_add_columns_for_disk_usage_accounting.py | 18 +-- .../0079_input_library_to_job_table.py | 6 +- .../migrate/versions/0080_quota_tables.py | 2 +- .../0081_add_tool_version_to_hda_ldda.py | 6 +- .../0082_add_tool_shed_repository_table.py | 2 +- .../0083_add_prepare_files_to_task.py | 12 +- ...dd_ldda_id_to_implicit_conversion_table.py | 6 +- .../migrate/versions/0085_add_task_info.py | 6 +- ..._add_tool_shed_repository_table_columns.py | 14 +-- .../versions/0087_tool_id_guid_map_table.py | 2 +- ..._add_installed_changeset_revison_column.py | 8 +- .../0089_add_object_store_id_columns.py | 6 +- ..._add_tool_shed_repository_table_columns.py | 10 +- .../versions/0091_add_tool_version_tables.py | 4 +- .../versions/0092_add_migrate_tools_table.py | 2 +- .../versions/0093_add_job_params_col.py | 8 +- .../versions/0094_add_job_handler_col.py | 8 +- .../migrate/versions/0095_hda_subsets.py | 8 +- .../migrate/versions/0096_openid_provider.py | 6 +- .../versions/0097_add_ctx_rev_column.py | 6 +- .../0098_genome_index_tool_data_table.py | 2 +- .../0099_add_tool_dependency_table.py | 2 +- ...er_tool_dependency_table_version_column.py | 2 +- ...rop_installed_changeset_revision_column.py | 2 +- ...0102_add_tool_dependency_status_columns.py | 14 +-- ...add_tool_shed_repository_status_columns.py | 28 ++--- .../versions/0105_add_cleanup_event_table.py | 2 +- .../versions/0106_add_missing_indexes.py | 2 +- .../0107_add_exit_code_to_job_and_task.py | 10 +- .../versions/0108_add_extended_metadata.py | 6 +- .../0109_add_repository_dependency_tables.py | 2 +- .../migrate/versions/0110_add_dataset_uuid.py | 8 +- .../versions/0111_add_job_destinations.py | 6 +- ...and_data_manager_job_association_tables.py | 2 +- .../0113_update_migrate_tools_table.py | 2 +- .../0114_update_migrate_tools_table_again.py | 2 +- ..._available_col_add_tool_shed_status_col.py | 10 +- .../versions/0117_add_user_activation.py | 8 +- .../0118_add_hda_extended_metadata.py | 6 +- .../migrate/versions/0119_job_metrics.py | 6 +- .../versions/0120_dataset_collections.py | 10 +- .../migrate/versions/0121_workflow_uuids.py | 6 +- .../migrate/versions/0122_grow_mysql_blobs.py | 6 +- .../0123_add_workflow_request_tables.py | 10 +- .../versions/0124_job_state_history.py | 6 +- .../versions/0125_workflow_step_tracking.py | 6 +- .../migrate/versions/0126_password_reset.py | 6 +- .../0127_output_collection_adjustments.py | 10 +- .../migrate/versions/0128_session_timeout.py | 6 +- ...9_job_external_output_metadata_validity.py | 6 +- .../versions/0130_change_pref_datatype.py | 2 +- ...subworkflow_and_input_parameter_modules.py | 12 +- 107 files changed, 442 insertions(+), 336 deletions(-) diff --git a/.ci/py3_sources.txt b/.ci/py3_sources.txt index 25feb081b910..46b0bf5ff529 100644 --- a/.ci/py3_sources.txt +++ b/.ci/py3_sources.txt @@ -50,6 +50,112 @@ lib/galaxy/model/migrate/versions/0020_library_upload_job.py lib/galaxy/model/migrate/versions/0021_user_prefs.py lib/galaxy/model/migrate/versions/0022_visualization_tables.py lib/galaxy/model/migrate/versions/0023_page_published_and_deleted_columns.py +lib/galaxy/model/migrate/versions/0024_page_slug_unique_constraint.py +lib/galaxy/model/migrate/versions/0025_user_info.py +lib/galaxy/model/migrate/versions/0026_cloud_tables.py +lib/galaxy/model/migrate/versions/0027_request_events.py +lib/galaxy/model/migrate/versions/0028_external_metadata_file_override.py +lib/galaxy/model/migrate/versions/0029_user_actions.py +lib/galaxy/model/migrate/versions/0030_history_slug_column.py +lib/galaxy/model/migrate/versions/0031_community_and_workflow_tags.py +lib/galaxy/model/migrate/versions/0032_stored_workflow_slug_column.py +lib/galaxy/model/migrate/versions/0033_published_cols_for_histories_and_workflows.py +lib/galaxy/model/migrate/versions/0034_page_user_share_association.py +lib/galaxy/model/migrate/versions/0035_item_annotations_and_workflow_step_tags.py +lib/galaxy/model/migrate/versions/0036_add_deleted_column_to_library_template_assoc_tables.py +lib/galaxy/model/migrate/versions/0037_samples_library.py +lib/galaxy/model/migrate/versions/0038_add_inheritable_column_to_library_template_assoc_tables.py +lib/galaxy/model/migrate/versions/0039_add_synopsis_column_to_library_table.py +lib/galaxy/model/migrate/versions/0040_page_annotations.py +lib/galaxy/model/migrate/versions/0041_workflow_invocation.py +lib/galaxy/model/migrate/versions/0042_workflow_invocation_fix.py +lib/galaxy/model/migrate/versions/0043_visualization_sharing_tagging_annotating.py +lib/galaxy/model/migrate/versions/0044_add_notify_column_to_request_table.py +lib/galaxy/model/migrate/versions/0045_request_type_permissions_table.py +lib/galaxy/model/migrate/versions/0046_post_job_actions.py +lib/galaxy/model/migrate/versions/0047_job_table_user_id_column.py +lib/galaxy/model/migrate/versions/0048_dataset_instance_state_column.py +lib/galaxy/model/migrate/versions/0049_api_keys_table.py +lib/galaxy/model/migrate/versions/0050_drop_cloud_tables.py +lib/galaxy/model/migrate/versions/0051_imported_col_for_jobs_table.py +lib/galaxy/model/migrate/versions/0052_sample_dataset_table.py +lib/galaxy/model/migrate/versions/0053_item_ratings.py +lib/galaxy/model/migrate/versions/0054_visualization_dbkey.py +lib/galaxy/model/migrate/versions/0055_add_pja_assoc_for_jobs.py +lib/galaxy/model/migrate/versions/0056_workflow_outputs.py +lib/galaxy/model/migrate/versions/0057_request_notify.py +lib/galaxy/model/migrate/versions/0058_history_import_export.py +lib/galaxy/model/migrate/versions/0059_sample_dataset_file_path.py +lib/galaxy/model/migrate/versions/0060_history_archive_import.py +lib/galaxy/model/migrate/versions/0061_tasks.py +lib/galaxy/model/migrate/versions/0062_user_openid_table.py +lib/galaxy/model/migrate/versions/0063_sequencer_table.py +lib/galaxy/model/migrate/versions/0064_add_run_and_sample_run_association_tables.py +lib/galaxy/model/migrate/versions/0065_add_name_to_form_fields_and_values.py +lib/galaxy/model/migrate/versions/0066_deferred_job_and_transfer_job_tables.py +lib/galaxy/model/migrate/versions/0067_populate_sequencer_table.py +lib/galaxy/model/migrate/versions/0068_rename_sequencer_to_external_services.py +lib/galaxy/model/migrate/versions/0069_rename_sequencer_form_type.py +lib/galaxy/model/migrate/versions/0070_add_info_column_to_deferred_job_table.py +lib/galaxy/model/migrate/versions/0071_add_history_and_workflow_to_sample.py +lib/galaxy/model/migrate/versions/0072_add_pid_and_socket_columns_to_transfer_job_table.py +lib/galaxy/model/migrate/versions/0073_add_ldda_to_implicit_conversion_table.py +lib/galaxy/model/migrate/versions/0074_add_purged_column_to_library_dataset_table.py +lib/galaxy/model/migrate/versions/0075_add_subindex_column_to_run_table.py +lib/galaxy/model/migrate/versions/0076_fix_form_values_data_corruption.py +lib/galaxy/model/migrate/versions/0077_create_tool_tag_association_table.py +lib/galaxy/model/migrate/versions/0078_add_columns_for_disk_usage_accounting.py +lib/galaxy/model/migrate/versions/0079_input_library_to_job_table.py +lib/galaxy/model/migrate/versions/0080_quota_tables.py +lib/galaxy/model/migrate/versions/0081_add_tool_version_to_hda_ldda.py +lib/galaxy/model/migrate/versions/0082_add_tool_shed_repository_table.py +lib/galaxy/model/migrate/versions/0083_add_prepare_files_to_task.py +lib/galaxy/model/migrate/versions/0084_add_ldda_id_to_implicit_conversion_table.py +lib/galaxy/model/migrate/versions/0085_add_task_info.py +lib/galaxy/model/migrate/versions/0086_add_tool_shed_repository_table_columns.py +lib/galaxy/model/migrate/versions/0087_tool_id_guid_map_table.py +lib/galaxy/model/migrate/versions/0088_add_installed_changeset_revison_column.py +lib/galaxy/model/migrate/versions/0089_add_object_store_id_columns.py +lib/galaxy/model/migrate/versions/0090_add_tool_shed_repository_table_columns.py +lib/galaxy/model/migrate/versions/0091_add_tool_version_tables.py +lib/galaxy/model/migrate/versions/0092_add_migrate_tools_table.py +lib/galaxy/model/migrate/versions/0093_add_job_params_col.py +lib/galaxy/model/migrate/versions/0094_add_job_handler_col.py +lib/galaxy/model/migrate/versions/0095_hda_subsets.py +lib/galaxy/model/migrate/versions/0096_openid_provider.py +lib/galaxy/model/migrate/versions/0097_add_ctx_rev_column.py +lib/galaxy/model/migrate/versions/0098_genome_index_tool_data_table.py +lib/galaxy/model/migrate/versions/0099_add_tool_dependency_table.py +lib/galaxy/model/migrate/versions/0100_alter_tool_dependency_table_version_column.py +lib/galaxy/model/migrate/versions/0101_drop_installed_changeset_revision_column.py +lib/galaxy/model/migrate/versions/0102_add_tool_dependency_status_columns.py +lib/galaxy/model/migrate/versions/0103_add_tool_shed_repository_status_columns.py +lib/galaxy/model/migrate/versions/0105_add_cleanup_event_table.py +lib/galaxy/model/migrate/versions/0106_add_missing_indexes.py +lib/galaxy/model/migrate/versions/0107_add_exit_code_to_job_and_task.py +lib/galaxy/model/migrate/versions/0108_add_extended_metadata.py +lib/galaxy/model/migrate/versions/0109_add_repository_dependency_tables.py +lib/galaxy/model/migrate/versions/0110_add_dataset_uuid.py +lib/galaxy/model/migrate/versions/0111_add_job_destinations.py +lib/galaxy/model/migrate/versions/0112_add_data_manager_history_association_and_data_manager_job_association_tables.py +lib/galaxy/model/migrate/versions/0113_update_migrate_tools_table.py +lib/galaxy/model/migrate/versions/0114_update_migrate_tools_table_again.py +lib/galaxy/model/migrate/versions/0116_drop_update_available_col_add_tool_shed_status_col.py +lib/galaxy/model/migrate/versions/0117_add_user_activation.py +lib/galaxy/model/migrate/versions/0118_add_hda_extended_metadata.py +lib/galaxy/model/migrate/versions/0119_job_metrics.py +lib/galaxy/model/migrate/versions/0120_dataset_collections.py +lib/galaxy/model/migrate/versions/0121_workflow_uuids.py +lib/galaxy/model/migrate/versions/0122_grow_mysql_blobs.py +lib/galaxy/model/migrate/versions/0123_add_workflow_request_tables.py +lib/galaxy/model/migrate/versions/0124_job_state_history.py +lib/galaxy/model/migrate/versions/0125_workflow_step_tracking.py +lib/galaxy/model/migrate/versions/0126_password_reset.py +lib/galaxy/model/migrate/versions/0127_output_collection_adjustments.py +lib/galaxy/model/migrate/versions/0128_session_timeout.py +lib/galaxy/model/migrate/versions/0129_job_external_output_metadata_validity.py +lib/galaxy/model/migrate/versions/0130_change_pref_datatype.py +lib/galaxy/model/migrate/versions/0131_subworkflow_and_input_parameter_modules.py lib/galaxy/objectstore/ lib/galaxy/openid/ lib/galaxy/quota/ diff --git a/lib/galaxy/model/migrate/versions/0024_page_slug_unique_constraint.py b/lib/galaxy/model/migrate/versions/0024_page_slug_unique_constraint.py index 272e6b29f659..49529ef0f30a 100644 --- a/lib/galaxy/model/migrate/versions/0024_page_slug_unique_constraint.py +++ b/lib/galaxy/model/migrate/versions/0024_page_slug_unique_constraint.py @@ -14,7 +14,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() Page_table = Table( "page", metadata, autoload=True ) diff --git a/lib/galaxy/model/migrate/versions/0025_user_info.py b/lib/galaxy/model/migrate/versions/0025_user_info.py index c13a284e7069..68ea01c95792 100644 --- a/lib/galaxy/model/migrate/versions/0025_user_info.py +++ b/lib/galaxy/model/migrate/versions/0025_user_info.py @@ -22,9 +22,9 @@ def display_migration_details(): - print "========================================" - print "This script adds a foreign key to the form_values table in the galaxy_user table" - print "========================================" + print("========================================") + print("This script adds a foreign key to the form_values table in the galaxy_user table") + print("========================================") def upgrade(migrate_engine): diff --git a/lib/galaxy/model/migrate/versions/0026_cloud_tables.py b/lib/galaxy/model/migrate/versions/0026_cloud_tables.py index 816c1c00ef97..06a44729b6f8 100644 --- a/lib/galaxy/model/migrate/versions/0026_cloud_tables.py +++ b/lib/galaxy/model/migrate/versions/0026_cloud_tables.py @@ -10,9 +10,9 @@ def display_migration_details(): print - print "========================================" - print "This script adds tables needed for Galaxy cloud functionality." - print "========================================" + print("========================================") + print("This script adds tables needed for Galaxy cloud functionality.") + print("========================================") CloudImage_table = Table( "cloud_image", metadata, Column( "id", Integer, primary_key=True ), diff --git a/lib/galaxy/model/migrate/versions/0027_request_events.py b/lib/galaxy/model/migrate/versions/0027_request_events.py index 959fd58c7045..c4806ff64c4d 100644 --- a/lib/galaxy/model/migrate/versions/0027_request_events.py +++ b/lib/galaxy/model/migrate/versions/0027_request_events.py @@ -24,10 +24,10 @@ def display_migration_details(): - print "========================================" - print "This migration script adds the request_event table and" - print "removes the state field in the request table" - print "========================================" + print("========================================") + print("This migration script adds the request_event table and") + print("removes the state field in the request table") + print("========================================") RequestEvent_table = Table('request_event', metadata, diff --git a/lib/galaxy/model/migrate/versions/0028_external_metadata_file_override.py b/lib/galaxy/model/migrate/versions/0028_external_metadata_file_override.py index 03e29102517f..596c0d99b5b8 100644 --- a/lib/galaxy/model/migrate/versions/0028_external_metadata_file_override.py +++ b/lib/galaxy/model/migrate/versions/0028_external_metadata_file_override.py @@ -22,11 +22,11 @@ def display_migration_details(): - print "========================================" - print "This script adds the filename_override_metadata column to the JobExternalOutputMetadata table," - print" allowing existing metadata files to be written when using external metadata and a cluster" - print "set up with read-only access to database/files" - print "========================================" + print("========================================") + print("This script adds the filename_override_metadata column to the JobExternalOutputMetadata table,") + print(" allowing existing metadata files to be written when using external metadata and a cluster") + print("set up with read-only access to database/files") + print("========================================") def upgrade(migrate_engine): diff --git a/lib/galaxy/model/migrate/versions/0029_user_actions.py b/lib/galaxy/model/migrate/versions/0029_user_actions.py index 787b133e769d..ac546f9e1dec 100644 --- a/lib/galaxy/model/migrate/versions/0029_user_actions.py +++ b/lib/galaxy/model/migrate/versions/0029_user_actions.py @@ -12,9 +12,9 @@ def display_migration_details(): - print "" - print "This migration script adds a user actions table to Galaxy." - print "" + print("") + print("This migration script adds a user actions table to Galaxy.") + print("") # New table to store user actions. @@ -35,7 +35,7 @@ def upgrade(migrate_engine): try: UserAction_table.create() except Exception as e: - print str(e) + print(str(e)) log.debug( "Creating user_action table failed: %s" % str( e ) ) @@ -45,5 +45,5 @@ def downgrade(migrate_engine): try: UserAction_table.drop() except Exception as e: - print str(e) + print(str(e)) log.debug( "Dropping user_action table failed: %s" % str( e ) ) diff --git a/lib/galaxy/model/migrate/versions/0030_history_slug_column.py b/lib/galaxy/model/migrate/versions/0030_history_slug_column.py index 0aa97ae716e4..4a57937ef5d9 100644 --- a/lib/galaxy/model/migrate/versions/0030_history_slug_column.py +++ b/lib/galaxy/model/migrate/versions/0030_history_slug_column.py @@ -12,7 +12,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() History_table = Table( "history", metadata, autoload=True ) diff --git a/lib/galaxy/model/migrate/versions/0031_community_and_workflow_tags.py b/lib/galaxy/model/migrate/versions/0031_community_and_workflow_tags.py index 0edeb977be76..a7a4b737c54f 100644 --- a/lib/galaxy/model/migrate/versions/0031_community_and_workflow_tags.py +++ b/lib/galaxy/model/migrate/versions/0031_community_and_workflow_tags.py @@ -33,7 +33,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() # Create user_id column in history_tag_association table. @@ -45,7 +45,7 @@ def upgrade(migrate_engine): assert c is HistoryTagAssociation_table.c.user_id except Exception as e: # SQLite does not support 'ALTER TABLE ADD FOREIGN KEY', so catch exception if it arises. - print str(e) + print(str(e)) log.debug( "Adding user_id column to history_tag_association table failed: %s" % str( e ) ) else: c = Column( "user_id", Integer) @@ -54,7 +54,7 @@ def upgrade(migrate_engine): assert c is HistoryTagAssociation_table.c.user_id except Exception as e: # SQLite does not support 'ALTER TABLE ADD FOREIGN KEY', so catch exception if it arises. - print str(e) + print(str(e)) log.debug( "Adding user_id column to history_tag_association table failed: %s" % str( e ) ) # Populate column so that user_id is the id of the user who owns the history (and, up to now, was the only person able to tag the history). @@ -71,7 +71,7 @@ def upgrade(migrate_engine): assert c is HistoryDatasetAssociationTagAssociation_table.c.user_id except Exception as e: # SQLite does not support 'ALTER TABLE ADD FOREIGN KEY', so catch exception if it arises. - print str(e) + print(str(e)) log.debug( "Adding user_id column to history_dataset_association_tag_association table failed: %s" % str( e ) ) else: # In sqlite, we can no longer quietly fail to add foreign key. @@ -83,7 +83,7 @@ def upgrade(migrate_engine): assert c is HistoryDatasetAssociationTagAssociation_table.c.user_id except Exception as e: # SQLite does not support 'ALTER TABLE ADD FOREIGN KEY', so catch exception if it arises. - print str(e) + print(str(e)) log.debug( "Adding user_id column to history_dataset_association_tag_association table failed: %s" % str( e ) ) # Populate column so that user_id is the id of the user who owns the history_dataset_association (and, up to now, was the only person able to tag the page). @@ -99,7 +99,7 @@ def upgrade(migrate_engine): assert c is PageTagAssociation_table.c.user_id except Exception as e: # SQLite does not support 'ALTER TABLE ADD FOREIGN KEY', so catch exception if it arises. - print str(e) + print(str(e)) log.debug( "Adding user_id column to page_tag_association table failed: %s" % str( e ) ) else: # Create user_id column in page_tag_association table. @@ -110,7 +110,7 @@ def upgrade(migrate_engine): assert c is PageTagAssociation_table.c.user_id except Exception as e: # SQLite does not support 'ALTER TABLE ADD FOREIGN KEY', so catch exception if it arises. - print str(e) + print(str(e)) log.debug( "Adding user_id column to page_tag_association table failed: %s" % str( e ) ) # Populate column so that user_id is the id of the user who owns the page (and, up to now, was the only person able to tag the page). @@ -122,14 +122,14 @@ def upgrade(migrate_engine): try: StoredWorkflowTagAssociation_table.create() except Exception as e: - print str(e) + print(str(e)) log.debug( "Creating stored_workflow_tag_association table failed: %s" % str( e ) ) # Create workflow_tag_association table. try: WorkflowTagAssociation_table.create() except Exception as e: - print str(e) + print(str(e)) log.debug( "Creating workflow_tag_association table failed: %s" % str( e ) ) @@ -142,7 +142,7 @@ def downgrade(migrate_engine): try: HistoryTagAssociation_table.c.user_id.drop() except Exception as e: - print str(e) + print(str(e)) log.debug( "Dropping column user_id from history_tag_association table failed: %s" % str( e ) ) # Drop user_id column from history_dataset_association_tag_association table. @@ -150,7 +150,7 @@ def downgrade(migrate_engine): try: HistoryDatasetAssociationTagAssociation_table.c.user_id.drop() except Exception as e: - print str(e) + print(str(e)) log.debug( "Dropping column user_id from history_dataset_association_tag_association table failed: %s" % str( e ) ) # Drop user_id column from page_tag_association table. @@ -158,19 +158,19 @@ def downgrade(migrate_engine): try: PageTagAssociation_table.c.user_id.drop() except Exception as e: - print str(e) + print(str(e)) log.debug( "Dropping column user_id from page_tag_association table failed: %s" % str( e ) ) # Drop stored_workflow_tag_association table. try: StoredWorkflowTagAssociation_table.drop() except Exception as e: - print str(e) + print(str(e)) log.debug( "Dropping stored_workflow_tag_association table failed: %s" % str( e ) ) # Drop workflow_tag_association table. try: WorkflowTagAssociation_table.drop() except Exception as e: - print str(e) + print(str(e)) log.debug( "Dropping workflow_tag_association table failed: %s" % str( e ) ) diff --git a/lib/galaxy/model/migrate/versions/0032_stored_workflow_slug_column.py b/lib/galaxy/model/migrate/versions/0032_stored_workflow_slug_column.py index 331e61189ead..6adb4a4e9af6 100644 --- a/lib/galaxy/model/migrate/versions/0032_stored_workflow_slug_column.py +++ b/lib/galaxy/model/migrate/versions/0032_stored_workflow_slug_column.py @@ -12,7 +12,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() StoredWorkflow_table = Table( "stored_workflow", metadata, autoload=True ) diff --git a/lib/galaxy/model/migrate/versions/0033_published_cols_for_histories_and_workflows.py b/lib/galaxy/model/migrate/versions/0033_published_cols_for_histories_and_workflows.py index a56e7b7b067d..32509128bab4 100644 --- a/lib/galaxy/model/migrate/versions/0033_published_cols_for_histories_and_workflows.py +++ b/lib/galaxy/model/migrate/versions/0033_published_cols_for_histories_and_workflows.py @@ -12,7 +12,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() # Create published column in history table. @@ -22,7 +22,7 @@ def upgrade(migrate_engine): c.create( History_table, index_name='ix_history_published') assert c is History_table.c.published except Exception as e: - print "Adding published column to history table failed: %s" % str( e ) + print("Adding published column to history table failed: %s" % str( e )) log.debug( "Adding published column to history table failed: %s" % str( e ) ) if migrate_engine.name != 'sqlite': @@ -41,7 +41,7 @@ def upgrade(migrate_engine): c.create( StoredWorkflow_table, index_name='ix_stored_workflow_published') assert c is StoredWorkflow_table.c.published except Exception as e: - print "Adding published column to stored_workflow table failed: %s" % str( e ) + print("Adding published column to stored_workflow table failed: %s" % str( e )) log.debug( "Adding published column to stored_workflow table failed: %s" % str( e ) ) if migrate_engine.name != 'sqlite': @@ -60,7 +60,7 @@ def upgrade(migrate_engine): c.create( Page_table, index_name='ix_page_importable') assert c is Page_table.c.importable except Exception as e: - print "Adding importable column to page table failed: %s" % str( e ) + print("Adding importable column to page table failed: %s" % str( e )) log.debug( "Adding importable column to page table failed: %s" % str( e ) ) if migrate_engine.name != 'sqlite': @@ -82,7 +82,7 @@ def downgrade(migrate_engine): try: History_table.c.published.drop() except Exception as e: - print "Dropping column published from history table failed: %s" % str( e ) + print("Dropping column published from history table failed: %s" % str( e )) log.debug( "Dropping column published from history table failed: %s" % str( e ) ) # Drop published column from stored_workflow table. @@ -90,7 +90,7 @@ def downgrade(migrate_engine): try: StoredWorkflow_table.c.published.drop() except Exception as e: - print "Dropping column published from stored_workflow table failed: %s" % str( e ) + print("Dropping column published from stored_workflow table failed: %s" % str( e )) log.debug( "Dropping column published from stored_workflow table failed: %s" % str( e ) ) # Drop importable column from page table. @@ -98,5 +98,5 @@ def downgrade(migrate_engine): try: Page_table.c.importable.drop() except Exception as e: - print "Dropping column importable from page table failed: %s" % str( e ) + print("Dropping column importable from page table failed: %s" % str( e )) log.debug( "Dropping column importable from page table failed: %s" % str( e ) ) diff --git a/lib/galaxy/model/migrate/versions/0034_page_user_share_association.py b/lib/galaxy/model/migrate/versions/0034_page_user_share_association.py index 33bfe87b4f7a..fd2489017108 100644 --- a/lib/galaxy/model/migrate/versions/0034_page_user_share_association.py +++ b/lib/galaxy/model/migrate/versions/0034_page_user_share_association.py @@ -16,14 +16,14 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() # Create stored_workflow_tag_association table. try: PageUserShareAssociation_table.create() except Exception as e: - print str(e) + print(str(e)) log.debug( "Creating page_user_share_association table failed: %s" % str( e ) ) @@ -35,5 +35,5 @@ def downgrade(migrate_engine): try: PageUserShareAssociation_table.drop() except Exception as e: - print str(e) + print(str(e)) log.debug( "Dropping page_user_share_association table failed: %s" % str( e ) ) diff --git a/lib/galaxy/model/migrate/versions/0035_item_annotations_and_workflow_step_tags.py b/lib/galaxy/model/migrate/versions/0035_item_annotations_and_workflow_step_tags.py index cf26eb1e4355..3be86d4ef416 100644 --- a/lib/galaxy/model/migrate/versions/0035_item_annotations_and_workflow_step_tags.py +++ b/lib/galaxy/model/migrate/versions/0035_item_annotations_and_workflow_step_tags.py @@ -48,42 +48,42 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() # Create history_annotation_association table. try: HistoryAnnotationAssociation_table.create() except Exception as e: - print str(e) + print(str(e)) log.debug( "Creating history_annotation_association table failed: %s" % str( e ) ) # Create history_dataset_association_annotation_association table. try: HistoryDatasetAssociationAnnotationAssociation_table.create() except Exception as e: - print str(e) + print(str(e)) log.debug( "Creating history_dataset_association_annotation_association table failed: %s" % str( e ) ) # Create stored_workflow_annotation_association table. try: StoredWorkflowAnnotationAssociation_table.create() except Exception as e: - print str(e) + print(str(e)) log.debug( "Creating stored_workflow_annotation_association table failed: %s" % str( e ) ) # Create workflow_step_annotation_association table. try: WorkflowStepAnnotationAssociation_table.create() except Exception as e: - print str(e) + print(str(e)) log.debug( "Creating workflow_step_annotation_association table failed: %s" % str( e ) ) # Create workflow_step_tag_association table. try: WorkflowStepTagAssociation_table.create() except Exception as e: - print str(e) + print(str(e)) log.debug( "Creating workflow_step_tag_association table failed: %s" % str( e ) ) haaa = Index( "ix_history_anno_assoc_annotation", HistoryAnnotationAssociation_table.c.annotation, mysql_length=200) @@ -97,7 +97,7 @@ def upgrade(migrate_engine): swaaa.create() wsaaa.create() except Exception as e: - print str(e) + print(str(e)) log.debug( "Creating annotation indices failed: %s" % str( e ) ) @@ -109,33 +109,33 @@ def downgrade(migrate_engine): try: HistoryAnnotationAssociation_table.drop() except Exception as e: - print str(e) + print(str(e)) log.debug( "Dropping history_annotation_association table failed: %s" % str( e ) ) # Drop history_dataset_association_annotation_association table. try: HistoryDatasetAssociationAnnotationAssociation_table.drop() except Exception as e: - print str(e) + print(str(e)) log.debug( "Dropping history_dataset_association_annotation_association table failed: %s" % str( e ) ) # Drop stored_workflow_annotation_association table. try: StoredWorkflowAnnotationAssociation_table.drop() except Exception as e: - print str(e) + print(str(e)) log.debug( "Dropping stored_workflow_annotation_association table failed: %s" % str( e ) ) # Drop workflow_step_annotation_association table. try: WorkflowStepAnnotationAssociation_table.drop() except Exception as e: - print str(e) + print(str(e)) log.debug( "Dropping workflow_step_annotation_association table failed: %s" % str( e ) ) # Drop workflow_step_tag_association table. try: WorkflowStepTagAssociation_table.drop() except Exception as e: - print str(e) + print(str(e)) log.debug( "Dropping workflow_step_tag_association table failed: %s" % str( e ) ) diff --git a/lib/galaxy/model/migrate/versions/0036_add_deleted_column_to_library_template_assoc_tables.py b/lib/galaxy/model/migrate/versions/0036_add_deleted_column_to_library_template_assoc_tables.py index b24984dd7929..a13ed69a0bfc 100644 --- a/lib/galaxy/model/migrate/versions/0036_add_deleted_column_to_library_template_assoc_tables.py +++ b/lib/galaxy/model/migrate/versions/0036_add_deleted_column_to_library_template_assoc_tables.py @@ -19,7 +19,7 @@ def get_false_value(migrate_engine): def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() LibraryInfoAssociation_table = Table( "library_info_association", metadata, autoload=True ) diff --git a/lib/galaxy/model/migrate/versions/0037_samples_library.py b/lib/galaxy/model/migrate/versions/0037_samples_library.py index cb77bfa949c6..008a89c1747c 100644 --- a/lib/galaxy/model/migrate/versions/0037_samples_library.py +++ b/lib/galaxy/model/migrate/versions/0037_samples_library.py @@ -27,7 +27,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) # Load existing tables metadata.reflect() # retuest_type table diff --git a/lib/galaxy/model/migrate/versions/0038_add_inheritable_column_to_library_template_assoc_tables.py b/lib/galaxy/model/migrate/versions/0038_add_inheritable_column_to_library_template_assoc_tables.py index f319e3e91973..f2013829988e 100644 --- a/lib/galaxy/model/migrate/versions/0038_add_inheritable_column_to_library_template_assoc_tables.py +++ b/lib/galaxy/model/migrate/versions/0038_add_inheritable_column_to_library_template_assoc_tables.py @@ -25,7 +25,7 @@ def get_false_value(migrate_engine): def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) # # In case of sqlite, check if the previous migration script deleted the diff --git a/lib/galaxy/model/migrate/versions/0039_add_synopsis_column_to_library_table.py b/lib/galaxy/model/migrate/versions/0039_add_synopsis_column_to_library_table.py index aafe6500febb..45afb6d0d055 100644 --- a/lib/galaxy/model/migrate/versions/0039_add_synopsis_column_to_library_table.py +++ b/lib/galaxy/model/migrate/versions/0039_add_synopsis_column_to_library_table.py @@ -11,7 +11,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() Library_table = Table( "library", metadata, autoload=True ) diff --git a/lib/galaxy/model/migrate/versions/0040_page_annotations.py b/lib/galaxy/model/migrate/versions/0040_page_annotations.py index eac206c67239..eb9c3ee0106c 100644 --- a/lib/galaxy/model/migrate/versions/0040_page_annotations.py +++ b/lib/galaxy/model/migrate/versions/0040_page_annotations.py @@ -17,14 +17,14 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() # Create history_annotation_association table. try: PageAnnotationAssociation_table.create() except Exception as e: - print str(e) + print(str(e)) log.debug( "Creating page_annotation_association table failed: %s" % str( e ) ) @@ -36,5 +36,5 @@ def downgrade(migrate_engine): try: PageAnnotationAssociation_table.drop() except Exception as e: - print str(e) + print(str(e)) log.debug( "Dropping page_annotation_association table failed: %s" % str( e ) ) diff --git a/lib/galaxy/model/migrate/versions/0041_workflow_invocation.py b/lib/galaxy/model/migrate/versions/0041_workflow_invocation.py index ed4b29e0bfea..27a5112d58ac 100644 --- a/lib/galaxy/model/migrate/versions/0041_workflow_invocation.py +++ b/lib/galaxy/model/migrate/versions/0041_workflow_invocation.py @@ -30,7 +30,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() for table in tables: diff --git a/lib/galaxy/model/migrate/versions/0042_workflow_invocation_fix.py b/lib/galaxy/model/migrate/versions/0042_workflow_invocation_fix.py index a19598ef2107..d95969445f8f 100644 --- a/lib/galaxy/model/migrate/versions/0042_workflow_invocation_fix.py +++ b/lib/galaxy/model/migrate/versions/0042_workflow_invocation_fix.py @@ -13,7 +13,7 @@ def upgrade(migrate_engine): - print __doc__ + print(__doc__) metadata.bind = migrate_engine metadata.reflect() diff --git a/lib/galaxy/model/migrate/versions/0043_visualization_sharing_tagging_annotating.py b/lib/galaxy/model/migrate/versions/0043_visualization_sharing_tagging_annotating.py index a1313a8cfc08..1f8878d3c376 100644 --- a/lib/galaxy/model/migrate/versions/0043_visualization_sharing_tagging_annotating.py +++ b/lib/galaxy/model/migrate/versions/0043_visualization_sharing_tagging_annotating.py @@ -37,7 +37,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() Visualiation_table = Table( "visualization", metadata, autoload=True ) @@ -45,7 +45,7 @@ def upgrade(migrate_engine): try: VisualizationUserShareAssociation_table.create() except Exception as e: - print "Creating visualization_user_share_association table failed: %s" % str( e ) + print("Creating visualization_user_share_association table failed: %s" % str( e )) log.debug( "Creating visualization_user_share_association table failed: %s" % str( e ) ) # Get default boolean value 'false' so that columns can be initialized. @@ -69,7 +69,7 @@ def upgrade(migrate_engine): cmd = "UPDATE visualization SET deleted = %s" % default_false migrate_engine.execute( cmd ) except Exception as e: - print "Adding deleted column to visualization table failed: %s" % str( e ) + print("Adding deleted column to visualization table failed: %s" % str( e )) log.debug( "Adding deleted column to visualization table failed: %s" % str( e ) ) try: @@ -81,14 +81,14 @@ def upgrade(migrate_engine): cmd = "UPDATE visualization SET importable = %s" % default_false migrate_engine.execute( cmd ) except Exception as e: - print "Adding importable column to visualization table failed: %s" % str( e ) + print("Adding importable column to visualization table failed: %s" % str( e )) log.debug( "Adding importable column to visualization table failed: %s" % str( e ) ) try: slug_column.create( Visualiation_table ) assert slug_column is Visualiation_table.c.slug except Exception as e: - print "Adding slug column to visualization table failed: %s" % str( e ) + print("Adding slug column to visualization table failed: %s" % str( e )) log.debug( "Adding slug column to visualization table failed: %s" % str( e ) ) try: @@ -100,7 +100,7 @@ def upgrade(migrate_engine): i = Index( "ix_visualization_slug", Visualiation_table.c.slug ) i.create() except Exception as e: - print "Adding index 'ix_visualization_slug' failed: %s" % str( e ) + print("Adding index 'ix_visualization_slug' failed: %s" % str( e )) log.debug( "Adding index 'ix_visualization_slug' failed: %s" % str( e ) ) try: @@ -112,21 +112,21 @@ def upgrade(migrate_engine): cmd = "UPDATE visualization SET published = %s" % default_false migrate_engine.execute( cmd ) except Exception as e: - print "Adding published column to visualization table failed: %s" % str( e ) + print("Adding published column to visualization table failed: %s" % str( e )) log.debug( "Adding published column to visualization table failed: %s" % str( e ) ) # Create visualization_tag_association table. try: VisualizationTagAssociation_table.create() except Exception as e: - print str(e) + print(str(e)) log.debug( "Creating visualization_tag_association table failed: %s" % str( e ) ) # Create visualization_annotation_association table. try: VisualizationAnnotationAssociation_table.create() except Exception as e: - print str(e) + print(str(e)) log.debug( "Creating visualization_annotation_association table failed: %s" % str( e ) ) # Need to create index for visualization annotation manually to deal with errors. @@ -139,7 +139,7 @@ def upgrade(migrate_engine): i = Index( "ix_visualization_annotation_association_annotation", VisualizationAnnotationAssociation_table.c.annotation ) i.create() except Exception as e: - print "Adding index 'ix_visualization_annotation_association_annotation' failed: %s" % str( e ) + print("Adding index 'ix_visualization_annotation_association_annotation' failed: %s" % str( e )) log.debug( "Adding index 'ix_visualization_annotation_association_annotation' failed: %s" % str( e ) ) @@ -152,44 +152,44 @@ def downgrade(migrate_engine): try: VisualizationUserShareAssociation_table.drop() except Exception as e: - print str(e) + print(str(e)) log.debug( "Dropping visualization_user_share_association table failed: %s" % str( e ) ) # Drop columns for supporting sharing from visualization table. try: Visualiation_table.c.deleted.drop() except Exception as e: - print "Dropping deleted column from visualization table failed: %s" % str( e ) + print("Dropping deleted column from visualization table failed: %s" % str( e )) log.debug( "Dropping deleted column from visualization table failed: %s" % str( e ) ) try: Visualiation_table.c.importable.drop() except Exception as e: - print "Dropping importable column from visualization table failed: %s" % str( e ) + print("Dropping importable column from visualization table failed: %s" % str( e )) log.debug( "Dropping importable column from visualization table failed: %s" % str( e ) ) try: Visualiation_table.c.slug.drop() except Exception as e: - print "Dropping slug column from visualization table failed: %s" % str( e ) + print("Dropping slug column from visualization table failed: %s" % str( e )) log.debug( "Dropping slug column from visualization table failed: %s" % str( e ) ) try: Visualiation_table.c.published.drop() except Exception as e: - print "Dropping published column from visualization table failed: %s" % str( e ) + print("Dropping published column from visualization table failed: %s" % str( e )) log.debug( "Dropping published column from visualization table failed: %s" % str( e ) ) # Drop visualization_tag_association table. try: VisualizationTagAssociation_table.drop() except Exception as e: - print str(e) + print(str(e)) log.debug( "Dropping visualization_tag_association table failed: %s" % str( e ) ) # Drop visualization_annotation_association table. try: VisualizationAnnotationAssociation_table.drop() except Exception as e: - print str(e) + print(str(e)) log.debug( "Dropping visualization_annotation_association table failed: %s" % str( e ) ) diff --git a/lib/galaxy/model/migrate/versions/0044_add_notify_column_to_request_table.py b/lib/galaxy/model/migrate/versions/0044_add_notify_column_to_request_table.py index e887f69666fc..61a5cd2d2a7d 100644 --- a/lib/galaxy/model/migrate/versions/0044_add_notify_column_to_request_table.py +++ b/lib/galaxy/model/migrate/versions/0044_add_notify_column_to_request_table.py @@ -11,7 +11,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() Request_table = Table( "request", metadata, autoload=True ) diff --git a/lib/galaxy/model/migrate/versions/0045_request_type_permissions_table.py b/lib/galaxy/model/migrate/versions/0045_request_type_permissions_table.py index 50701c25d6ee..300eb8660ae5 100644 --- a/lib/galaxy/model/migrate/versions/0045_request_type_permissions_table.py +++ b/lib/galaxy/model/migrate/versions/0045_request_type_permissions_table.py @@ -21,7 +21,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() try: RequestTypePermissions_table.create() diff --git a/lib/galaxy/model/migrate/versions/0046_post_job_actions.py b/lib/galaxy/model/migrate/versions/0046_post_job_actions.py index 4cb8d49d4b64..7a04f453a7ce 100644 --- a/lib/galaxy/model/migrate/versions/0046_post_job_actions.py +++ b/lib/galaxy/model/migrate/versions/0046_post_job_actions.py @@ -31,7 +31,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() for table in tables: try: diff --git a/lib/galaxy/model/migrate/versions/0047_job_table_user_id_column.py b/lib/galaxy/model/migrate/versions/0047_job_table_user_id_column.py index 5fcc597e7d20..d50517e0cf22 100644 --- a/lib/galaxy/model/migrate/versions/0047_job_table_user_id_column.py +++ b/lib/galaxy/model/migrate/versions/0047_job_table_user_id_column.py @@ -22,7 +22,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() try: Job_table = Table( "job", metadata, autoload=True ) @@ -51,17 +51,17 @@ def upgrade(migrate_engine): + "FROM job " \ + "JOIN galaxy_session ON job.session_id = galaxy_session.id;" job_users = migrate_engine.execute( cmd ).fetchall() - print "Updating user_id column in job table for ", len( job_users ), " rows..." - print "" + print("Updating user_id column in job table for ", len( job_users ), " rows...") + print("") update_count = 0 for row in job_users: if row.galaxy_user_id: cmd = "UPDATE job SET user_id = %d WHERE id = %d" % ( int( row.galaxy_user_id ), int( row.galaxy_job_id ) ) update_count += 1 migrate_engine.execute( cmd ) - print "Updated the user_id column for ", update_count, " rows in the job table. " - print len( job_users ) - update_count, " rows have no user_id since the value was NULL in the galaxy_session table." - print "" + print("Updated the user_id column for ", update_count, " rows in the job table. ") + print(len( job_users ) - update_count, " rows have no user_id since the value was NULL in the galaxy_session table.") + print("") except Exception as e: log.debug( "Updating job.user_id column failed: %s" % str( e ) ) diff --git a/lib/galaxy/model/migrate/versions/0048_dataset_instance_state_column.py b/lib/galaxy/model/migrate/versions/0048_dataset_instance_state_column.py index 77ea2dd7c307..a1a66d68bb81 100644 --- a/lib/galaxy/model/migrate/versions/0048_dataset_instance_state_column.py +++ b/lib/galaxy/model/migrate/versions/0048_dataset_instance_state_column.py @@ -26,7 +26,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() dataset_instance_tables = [] for table_name in DATASET_INSTANCE_TABLE_NAMES: diff --git a/lib/galaxy/model/migrate/versions/0049_api_keys_table.py b/lib/galaxy/model/migrate/versions/0049_api_keys_table.py index 8f04cf7eca7a..0696a0d04efb 100644 --- a/lib/galaxy/model/migrate/versions/0049_api_keys_table.py +++ b/lib/galaxy/model/migrate/versions/0049_api_keys_table.py @@ -21,7 +21,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() try: APIKeys_table.create() diff --git a/lib/galaxy/model/migrate/versions/0050_drop_cloud_tables.py b/lib/galaxy/model/migrate/versions/0050_drop_cloud_tables.py index ca252dde5bf0..1e794fd5afab 100644 --- a/lib/galaxy/model/migrate/versions/0050_drop_cloud_tables.py +++ b/lib/galaxy/model/migrate/versions/0050_drop_cloud_tables.py @@ -10,9 +10,9 @@ def display_migration_details(): print - print "========================================" - print "This script drops tables that were associated with the old Galaxy Cloud functionality." - print "========================================" + print("========================================") + print("This script drops tables that were associated with the old Galaxy Cloud functionality.") + print("========================================") CloudImage_table = Table( "cloud_image", metadata, Column( "id", Integer, primary_key=True ), diff --git a/lib/galaxy/model/migrate/versions/0051_imported_col_for_jobs_table.py b/lib/galaxy/model/migrate/versions/0051_imported_col_for_jobs_table.py index 6a0bc3d4a171..ecb5ced6f6dd 100644 --- a/lib/galaxy/model/migrate/versions/0051_imported_col_for_jobs_table.py +++ b/lib/galaxy/model/migrate/versions/0051_imported_col_for_jobs_table.py @@ -11,7 +11,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() # Create and initialize imported column in job table. @@ -30,7 +30,7 @@ def upgrade(migrate_engine): migrate_engine.execute( "UPDATE job SET imported=%s" % default_false ) except Exception as e: - print "Adding imported column to job table failed: %s" % str( e ) + print("Adding imported column to job table failed: %s" % str( e )) log.debug( "Adding imported column to job table failed: %s" % str( e ) ) @@ -43,5 +43,5 @@ def downgrade(migrate_engine): try: Jobs_table.c.imported.drop() except Exception as e: - print "Dropping column imported from job table failed: %s" % str( e ) + print("Dropping column imported from job table failed: %s" % str( e )) log.debug( "Dropping column imported from job table failed: %s" % str( e ) ) diff --git a/lib/galaxy/model/migrate/versions/0052_sample_dataset_table.py b/lib/galaxy/model/migrate/versions/0052_sample_dataset_table.py index d3c8f9236f4e..7781a19b689c 100644 --- a/lib/galaxy/model/migrate/versions/0052_sample_dataset_table.py +++ b/lib/galaxy/model/migrate/versions/0052_sample_dataset_table.py @@ -47,7 +47,7 @@ def localtimestamp(migrate_engine): def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() try: SampleDataset_table.create() diff --git a/lib/galaxy/model/migrate/versions/0053_item_ratings.py b/lib/galaxy/model/migrate/versions/0053_item_ratings.py index 9d4ae1341c5c..688ebc83d05f 100644 --- a/lib/galaxy/model/migrate/versions/0053_item_ratings.py +++ b/lib/galaxy/model/migrate/versions/0053_item_ratings.py @@ -43,14 +43,14 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() # Create history_rating_association table. try: HistoryRatingAssociation_table.create() except Exception as e: - print str(e) + print(str(e)) log.debug( "Creating history_rating_association table failed: %s" % str( e ) ) # Create history_dataset_association_rating_association table. @@ -64,31 +64,31 @@ def upgrade(migrate_engine): try: i.create() except Exception as e: - print str(e) + print(str(e)) log.debug( "Adding index 'ix_hda_rating_association_hda_id' to table 'history_dataset_association_rating_association' table failed: %s" % str( e ) ) else: - print str(e) + print(str(e)) log.debug( "Creating history_dataset_association_rating_association table failed: %s" % str( e ) ) # Create stored_workflow_rating_association table. try: StoredWorkflowRatingAssociation_table.create() except Exception as e: - print str(e) + print(str(e)) log.debug( "Creating stored_workflow_rating_association table failed: %s" % str( e ) ) # Create page_rating_association table. try: PageRatingAssociation_table.create() except Exception as e: - print str(e) + print(str(e)) log.debug( "Creating page_rating_association table failed: %s" % str( e ) ) # Create visualization_rating_association table. try: VisualizationRatingAssociation_table.create() except Exception as e: - print str(e) + print(str(e)) log.debug( "Creating visualization_rating_association table failed: %s" % str( e ) ) @@ -100,33 +100,33 @@ def downgrade(migrate_engine): try: HistoryRatingAssociation_table.drop() except Exception as e: - print str(e) + print(str(e)) log.debug( "Dropping history_rating_association table failed: %s" % str( e ) ) # Drop history_dataset_association_rating_association table. try: HistoryDatasetAssociationRatingAssociation_table.drop() except Exception as e: - print str(e) + print(str(e)) log.debug( "Dropping history_dataset_association_rating_association table failed: %s" % str( e ) ) # Drop stored_workflow_rating_association table. try: StoredWorkflowRatingAssociation_table.drop() except Exception as e: - print str(e) + print(str(e)) log.debug( "Dropping stored_workflow_rating_association table failed: %s" % str( e ) ) # Drop page_rating_association table. try: PageRatingAssociation_table.drop() except Exception as e: - print str(e) + print(str(e)) log.debug( "Dropping page_rating_association table failed: %s" % str( e ) ) # Drop visualization_rating_association table. try: VisualizationRatingAssociation_table.drop() except Exception as e: - print str(e) + print(str(e)) log.debug( "Dropping visualization_rating_association table failed: %s" % str( e ) ) diff --git a/lib/galaxy/model/migrate/versions/0054_visualization_dbkey.py b/lib/galaxy/model/migrate/versions/0054_visualization_dbkey.py index a60768336f5f..d9f6be19067f 100644 --- a/lib/galaxy/model/migrate/versions/0054_visualization_dbkey.py +++ b/lib/galaxy/model/migrate/versions/0054_visualization_dbkey.py @@ -13,7 +13,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() Visualization_table = Table( "visualization", metadata, autoload=True ) diff --git a/lib/galaxy/model/migrate/versions/0055_add_pja_assoc_for_jobs.py b/lib/galaxy/model/migrate/versions/0055_add_pja_assoc_for_jobs.py index 6b19902f2528..da4c58f9d59b 100644 --- a/lib/galaxy/model/migrate/versions/0055_add_pja_assoc_for_jobs.py +++ b/lib/galaxy/model/migrate/versions/0055_add_pja_assoc_for_jobs.py @@ -18,7 +18,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() try: PostJobActionAssociation_table.create() diff --git a/lib/galaxy/model/migrate/versions/0056_workflow_outputs.py b/lib/galaxy/model/migrate/versions/0056_workflow_outputs.py index 8bbc1f0bf552..4f2cf97425a1 100644 --- a/lib/galaxy/model/migrate/versions/0056_workflow_outputs.py +++ b/lib/galaxy/model/migrate/versions/0056_workflow_outputs.py @@ -20,7 +20,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() for table in tables: try: diff --git a/lib/galaxy/model/migrate/versions/0057_request_notify.py b/lib/galaxy/model/migrate/versions/0057_request_notify.py index 711a352fff83..07c382a70e14 100644 --- a/lib/galaxy/model/migrate/versions/0057_request_notify.py +++ b/lib/galaxy/model/migrate/versions/0057_request_notify.py @@ -18,7 +18,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() try: Request_table = Table( "request", metadata, autoload=True ) diff --git a/lib/galaxy/model/migrate/versions/0058_history_import_export.py b/lib/galaxy/model/migrate/versions/0058_history_import_export.py index ddce22ce81ac..f6c4953e5f6d 100644 --- a/lib/galaxy/model/migrate/versions/0058_history_import_export.py +++ b/lib/galaxy/model/migrate/versions/0058_history_import_export.py @@ -22,7 +22,7 @@ def upgrade(migrate_engine): - print __doc__ + print(__doc__) metadata.bind = migrate_engine metadata.reflect() @@ -30,7 +30,7 @@ def upgrade(migrate_engine): try: JobExportHistoryArchive_table.create() except Exception as e: - print str(e) + print(str(e)) log.debug( "Creating job_export_history_archive table failed: %s" % str( e ) ) @@ -42,5 +42,5 @@ def downgrade(migrate_engine): try: JobExportHistoryArchive_table.drop() except Exception as e: - print str(e) + print(str(e)) log.debug( "Dropping job_export_history_archive table failed: %s" % str( e ) ) diff --git a/lib/galaxy/model/migrate/versions/0059_sample_dataset_file_path.py b/lib/galaxy/model/migrate/versions/0059_sample_dataset_file_path.py index c03d59129f64..47c2cad2687c 100644 --- a/lib/galaxy/model/migrate/versions/0059_sample_dataset_file_path.py +++ b/lib/galaxy/model/migrate/versions/0059_sample_dataset_file_path.py @@ -15,7 +15,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() try: SampleDataset_table = Table( "sample_dataset", metadata, autoload=True ) diff --git a/lib/galaxy/model/migrate/versions/0060_history_archive_import.py b/lib/galaxy/model/migrate/versions/0060_history_archive_import.py index d6f7a815fa9a..64170b5602ef 100644 --- a/lib/galaxy/model/migrate/versions/0060_history_archive_import.py +++ b/lib/galaxy/model/migrate/versions/0060_history_archive_import.py @@ -25,7 +25,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() # Add column to history table and initialize. @@ -41,7 +41,7 @@ def upgrade(migrate_engine): default_false = "false" migrate_engine.execute( "UPDATE history SET importing=%s" % default_false ) except Exception as e: - print str(e) + print(str(e)) log.debug( "Adding column 'importing' to history table failed: %s" % str( e ) ) # Create job_import_history_archive table. diff --git a/lib/galaxy/model/migrate/versions/0061_tasks.py b/lib/galaxy/model/migrate/versions/0061_tasks.py index 39c695d5a39e..cec0c5d1e8b0 100644 --- a/lib/galaxy/model/migrate/versions/0061_tasks.py +++ b/lib/galaxy/model/migrate/versions/0061_tasks.py @@ -32,7 +32,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() for table in tables: try: diff --git a/lib/galaxy/model/migrate/versions/0062_user_openid_table.py b/lib/galaxy/model/migrate/versions/0062_user_openid_table.py index db8e25fefd2a..59f80f975ad4 100644 --- a/lib/galaxy/model/migrate/versions/0062_user_openid_table.py +++ b/lib/galaxy/model/migrate/versions/0062_user_openid_table.py @@ -24,7 +24,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() # Create galaxy_user_openid table diff --git a/lib/galaxy/model/migrate/versions/0063_sequencer_table.py b/lib/galaxy/model/migrate/versions/0063_sequencer_table.py index f1d2b39ddc7b..77a57db0a61c 100644 --- a/lib/galaxy/model/migrate/versions/0063_sequencer_table.py +++ b/lib/galaxy/model/migrate/versions/0063_sequencer_table.py @@ -29,7 +29,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() # create the sequencer table try: diff --git a/lib/galaxy/model/migrate/versions/0064_add_run_and_sample_run_association_tables.py b/lib/galaxy/model/migrate/versions/0064_add_run_and_sample_run_association_tables.py index 9233e7a7cb8c..d46da866a6ec 100644 --- a/lib/galaxy/model/migrate/versions/0064_add_run_and_sample_run_association_tables.py +++ b/lib/galaxy/model/migrate/versions/0064_add_run_and_sample_run_association_tables.py @@ -31,7 +31,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() try: Run_table.create() diff --git a/lib/galaxy/model/migrate/versions/0065_add_name_to_form_fields_and_values.py b/lib/galaxy/model/migrate/versions/0065_add_name_to_form_fields_and_values.py index 792cc579f9ec..dc10e46ab97f 100644 --- a/lib/galaxy/model/migrate/versions/0065_add_name_to_form_fields_and_values.py +++ b/lib/galaxy/model/migrate/versions/0065_add_name_to_form_fields_and_values.py @@ -25,7 +25,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() try: Table( "form_definition", metadata, autoload=True ) diff --git a/lib/galaxy/model/migrate/versions/0066_deferred_job_and_transfer_job_tables.py b/lib/galaxy/model/migrate/versions/0066_deferred_job_and_transfer_job_tables.py index 60855fc56a22..09d787964b38 100644 --- a/lib/galaxy/model/migrate/versions/0066_deferred_job_and_transfer_job_tables.py +++ b/lib/galaxy/model/migrate/versions/0066_deferred_job_and_transfer_job_tables.py @@ -34,7 +34,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() # Create deferred_job table diff --git a/lib/galaxy/model/migrate/versions/0067_populate_sequencer_table.py b/lib/galaxy/model/migrate/versions/0067_populate_sequencer_table.py index 88622f60262f..908edb319d61 100644 --- a/lib/galaxy/model/migrate/versions/0067_populate_sequencer_table.py +++ b/lib/galaxy/model/migrate/versions/0067_populate_sequencer_table.py @@ -189,7 +189,7 @@ def update_sequencer_id_in_request_type( migrate_engine, request_type_id, sequen def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() try: RequestType_table = Table( "request_type", metadata, autoload=True ) diff --git a/lib/galaxy/model/migrate/versions/0068_rename_sequencer_to_external_services.py b/lib/galaxy/model/migrate/versions/0068_rename_sequencer_to_external_services.py index 6514438dd6f4..7c98bf76353b 100644 --- a/lib/galaxy/model/migrate/versions/0068_rename_sequencer_to_external_services.py +++ b/lib/galaxy/model/migrate/versions/0068_rename_sequencer_to_external_services.py @@ -32,7 +32,7 @@ def nextval( migrate_engine, table, col='id' ): def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) # Load existing tables metadata.reflect() # add a foreign key to the external_service table in the sample_dataset table diff --git a/lib/galaxy/model/migrate/versions/0069_rename_sequencer_form_type.py b/lib/galaxy/model/migrate/versions/0069_rename_sequencer_form_type.py index c92c7a554bb2..693e00118c43 100644 --- a/lib/galaxy/model/migrate/versions/0069_rename_sequencer_form_type.py +++ b/lib/galaxy/model/migrate/versions/0069_rename_sequencer_form_type.py @@ -13,7 +13,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() current_form_type = 'Sequencer Information Form' new_form_type = "External Service Information Form" diff --git a/lib/galaxy/model/migrate/versions/0070_add_info_column_to_deferred_job_table.py b/lib/galaxy/model/migrate/versions/0070_add_info_column_to_deferred_job_table.py index 5b37a99777a3..74f96c36d0da 100644 --- a/lib/galaxy/model/migrate/versions/0070_add_info_column_to_deferred_job_table.py +++ b/lib/galaxy/model/migrate/versions/0070_add_info_column_to_deferred_job_table.py @@ -11,7 +11,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() try: TransferJob_table = Table( "transfer_job", metadata, autoload=True ) @@ -19,7 +19,7 @@ def upgrade(migrate_engine): c.create( TransferJob_table ) assert c is TransferJob_table.c.info except Exception as e: - print "Adding info column to transfer_job table failed: %s" % str( e ) + print("Adding info column to transfer_job table failed: %s" % str( e )) log.debug( "Adding info column to transfer_job table failed: %s" % str( e ) ) @@ -30,5 +30,5 @@ def downgrade(migrate_engine): TransferJob_table = Table( "transfer_job", metadata, autoload=True ) TransferJob_table.c.info.drop() except Exception as e: - print "Dropping info column from transfer_job table failed: %s" % str( e ) + print("Dropping info column from transfer_job table failed: %s" % str( e )) log.debug( "Dropping info column from transfer_job table failed: %s" % str( e ) ) diff --git a/lib/galaxy/model/migrate/versions/0071_add_history_and_workflow_to_sample.py b/lib/galaxy/model/migrate/versions/0071_add_history_and_workflow_to_sample.py index 15f60026a78b..b10ed120f1f1 100644 --- a/lib/galaxy/model/migrate/versions/0071_add_history_and_workflow_to_sample.py +++ b/lib/galaxy/model/migrate/versions/0071_add_history_and_workflow_to_sample.py @@ -13,7 +13,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() try: Sample_table = Table( "sample", metadata, autoload=True ) @@ -24,7 +24,7 @@ def upgrade(migrate_engine): assert c1 is Sample_table.c.workflow assert c2 is Sample_table.c.history_id except Exception as e: - print "Adding history and workflow columns to sample table failed: %s" % str( e ) + print("Adding history and workflow columns to sample table failed: %s" % str( e )) log.debug( "Adding history and workflow columns to sample table failed: %s" % str( e ) ) @@ -35,11 +35,11 @@ def downgrade(migrate_engine): Sample_table = Table( "sample", metadata, autoload=True ) Sample_table.c.workflow.drop() except Exception as e: - print "Dropping workflow column from sample table failed: %s" % str( e ) + print("Dropping workflow column from sample table failed: %s" % str( e )) log.debug( "Dropping workflow column from sample table failed: %s" % str( e ) ) try: Sample_table = Table( "sample", metadata, autoload=True ) Sample_table.c.history_id.drop() except Exception as e: - print "Dropping history column from sample table failed: %s" % str( e ) + print("Dropping history column from sample table failed: %s" % str( e )) log.debug( "Dropping history column from sample table failed: %s" % str( e ) ) diff --git a/lib/galaxy/model/migrate/versions/0072_add_pid_and_socket_columns_to_transfer_job_table.py b/lib/galaxy/model/migrate/versions/0072_add_pid_and_socket_columns_to_transfer_job_table.py index 19c9531f62e9..1399ab5606ae 100644 --- a/lib/galaxy/model/migrate/versions/0072_add_pid_and_socket_columns_to_transfer_job_table.py +++ b/lib/galaxy/model/migrate/versions/0072_add_pid_and_socket_columns_to_transfer_job_table.py @@ -11,7 +11,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() try: TransferJob_table = Table( "transfer_job", metadata, autoload=True ) @@ -22,7 +22,7 @@ def upgrade(migrate_engine): c.create( TransferJob_table ) assert c is TransferJob_table.c.socket except Exception as e: - print "Adding columns to transfer_job table failed: %s" % str( e ) + print("Adding columns to transfer_job table failed: %s" % str( e )) log.debug( "Adding columns to transfer_job table failed: %s" % str( e ) ) @@ -34,5 +34,5 @@ def downgrade(migrate_engine): TransferJob_table.c.pid.drop() TransferJob_table.c.socket.drop() except Exception as e: - print "Dropping columns from transfer_job table failed: %s" % str( e ) + print("Dropping columns from transfer_job table failed: %s" % str( e )) log.debug( "Dropping columns from transfer_job table failed: %s" % str( e ) ) diff --git a/lib/galaxy/model/migrate/versions/0073_add_ldda_to_implicit_conversion_table.py b/lib/galaxy/model/migrate/versions/0073_add_ldda_to_implicit_conversion_table.py index c250ed898b13..a786d281f01b 100644 --- a/lib/galaxy/model/migrate/versions/0073_add_ldda_to_implicit_conversion_table.py +++ b/lib/galaxy/model/migrate/versions/0073_add_ldda_to_implicit_conversion_table.py @@ -11,7 +11,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() try: Implicitly_converted_table = Table( "implicitly_converted_dataset_association", metadata, autoload=True ) @@ -23,7 +23,7 @@ def upgrade(migrate_engine): c.create( Implicitly_converted_table, index_name="ix_implicitly_converted_dataset_assoc_ldda_parent_id") assert c is Implicitly_converted_table.c.ldda_parent_id except Exception as e: - print "Adding ldda_parent_id column to implicitly_converted_dataset_association table failed: %s" % str( e ) + print("Adding ldda_parent_id column to implicitly_converted_dataset_association table failed: %s" % str( e )) log.debug( "Adding ldda_parent_id column to implicitly_converted_dataset_association table failed: %s" % str( e ) ) @@ -34,5 +34,5 @@ def downgrade(migrate_engine): Implicitly_converted_table = Table( "implicitly_converted_dataset_association", metadata, autoload=True ) Implicitly_converted_table.c.ldda_parent_id.drop() except Exception as e: - print "Dropping ldda_parent_id column from implicitly_converted_dataset_association table failed: %s" % str( e ) + print("Dropping ldda_parent_id column from implicitly_converted_dataset_association table failed: %s" % str( e )) log.debug( "Dropping ldda_parent_id column from implicitly_converted_dataset_association table failed: %s" % str( e ) ) diff --git a/lib/galaxy/model/migrate/versions/0074_add_purged_column_to_library_dataset_table.py b/lib/galaxy/model/migrate/versions/0074_add_purged_column_to_library_dataset_table.py index 6ca67a53b047..91f8255e88f3 100644 --- a/lib/galaxy/model/migrate/versions/0074_add_purged_column_to_library_dataset_table.py +++ b/lib/galaxy/model/migrate/versions/0074_add_purged_column_to_library_dataset_table.py @@ -29,7 +29,7 @@ def boolean_true(migrate_engine): def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() try: LibraryDataset_table = Table( "library_dataset", metadata, autoload=True ) @@ -37,7 +37,7 @@ def upgrade(migrate_engine): c.create( LibraryDataset_table, index_name='ix_library_dataset_purged') assert c is LibraryDataset_table.c.purged except Exception as e: - print "Adding purged column to library_dataset table failed: ", str( e ) + print("Adding purged column to library_dataset table failed: ", str( e )) # Update the purged flag to the default False cmd = "UPDATE library_dataset SET purged = %s;" % boolean_false(migrate_engine) try: @@ -53,7 +53,7 @@ def upgrade(migrate_engine): cmd = "SELECT * FROM library_dataset_dataset_association WHERE library_dataset_id = %d AND library_dataset_dataset_association.deleted = %s;" % ( int( row.id ), boolean_false(migrate_engine) ) active_lddas = migrate_engine.execute( cmd ).fetchall() if not active_lddas: - print "Updating purged column to True for LibraryDataset id : ", int( row.id ) + print("Updating purged column to True for LibraryDataset id : ", int( row.id )) cmd = "UPDATE library_dataset SET purged = %s WHERE id = %d;" % ( boolean_true(migrate_engine), int( row.id ) ) migrate_engine.execute( cmd ) @@ -65,4 +65,4 @@ def downgrade(migrate_engine): LibraryDataset_table = Table( "library_dataset", metadata, autoload=True ) LibraryDataset_table.c.purged.drop() except Exception as e: - print "Dropping purged column from library_dataset table failed: ", str( e ) + print("Dropping purged column from library_dataset table failed: ", str( e )) diff --git a/lib/galaxy/model/migrate/versions/0075_add_subindex_column_to_run_table.py b/lib/galaxy/model/migrate/versions/0075_add_subindex_column_to_run_table.py index 6a619c496bf4..51bef48e44c8 100644 --- a/lib/galaxy/model/migrate/versions/0075_add_subindex_column_to_run_table.py +++ b/lib/galaxy/model/migrate/versions/0075_add_subindex_column_to_run_table.py @@ -10,7 +10,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() try: Run_table = Table( "run", metadata, autoload=True ) @@ -18,7 +18,7 @@ def upgrade(migrate_engine): c.create( Run_table, index_name="ix_run_subindex") assert c is Run_table.c.subindex except Exception as e: - print "Adding the subindex column to the run table failed: ", str( e ) + print("Adding the subindex column to the run table failed: ", str( e )) def downgrade(migrate_engine): @@ -28,4 +28,4 @@ def downgrade(migrate_engine): Run_table = Table( "run", metadata, autoload=True ) Run_table.c.subindex.drop() except Exception as e: - print "Dropping the subindex column from run table failed: ", str( e ) + print("Dropping the subindex column from run table failed: ", str( e )) diff --git a/lib/galaxy/model/migrate/versions/0076_fix_form_values_data_corruption.py b/lib/galaxy/model/migrate/versions/0076_fix_form_values_data_corruption.py index bc90ec4769ae..defd24d625b5 100644 --- a/lib/galaxy/model/migrate/versions/0076_fix_form_values_data_corruption.py +++ b/lib/galaxy/model/migrate/versions/0076_fix_form_values_data_corruption.py @@ -15,7 +15,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() cmd = "SELECT form_values.id as id, form_values.content as field_values, form_definition.fields as fdfields " \ + " FROM form_definition, form_values " \ @@ -35,8 +35,8 @@ def upgrade(migrate_engine): field_values_str = _sniffnfix_pg9_hex( str( row['field_values'] ) ) try: # Encoding errors? Just to be safe. - print "Attempting to fix row %s" % row['id'] - print "Prior to replacement: %s" % field_values_str + print("Attempting to fix row %s" % row['id']) + print("Prior to replacement: %s" % field_values_str) except: pass field_values_dict = {} @@ -48,7 +48,7 @@ def upgrade(migrate_engine): if field_index == -1: # if the field name is not present the field values dict then # inform the admin that this form values cannot be fixed - print "The 'content' field of row 'id' %i does not have the field '%s' in the 'form_values' table and could not be fixed by this migration script." % ( int( field['id'] ), field['name'] ) + print("The 'content' field of row 'id' %i does not have the field '%s' in the 'form_values' table and could not be fixed by this migration script." % ( int( field['id'] ), field['name'] )) else: # check if this is the last field if index == len( fields_list ) - 1: @@ -74,13 +74,13 @@ def upgrade(migrate_engine): cmd = "UPDATE form_values SET content='%s' WHERE id=%i" % ( json_values, int( row['id'] ) ) migrate_engine.execute( cmd ) try: - print "Post replacement: %s" % json_values + print("Post replacement: %s" % json_values) except: pass if corrupted_rows: - print 'Fixed %i corrupted rows.' % corrupted_rows + print('Fixed %i corrupted rows.' % corrupted_rows) else: - print 'No corrupted rows found.' + print('No corrupted rows found.') def downgrade(migrate_engine): diff --git a/lib/galaxy/model/migrate/versions/0077_create_tool_tag_association_table.py b/lib/galaxy/model/migrate/versions/0077_create_tool_tag_association_table.py index c44b11d5784e..2a53e6135018 100644 --- a/lib/galaxy/model/migrate/versions/0077_create_tool_tag_association_table.py +++ b/lib/galaxy/model/migrate/versions/0077_create_tool_tag_association_table.py @@ -26,7 +26,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() # Create tool_tag_association table diff --git a/lib/galaxy/model/migrate/versions/0078_add_columns_for_disk_usage_accounting.py b/lib/galaxy/model/migrate/versions/0078_add_columns_for_disk_usage_accounting.py index 98cc3b1001a6..4c628efd261e 100644 --- a/lib/galaxy/model/migrate/versions/0078_add_columns_for_disk_usage_accounting.py +++ b/lib/galaxy/model/migrate/versions/0078_add_columns_for_disk_usage_accounting.py @@ -13,7 +13,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() try: @@ -22,7 +22,7 @@ def upgrade(migrate_engine): c.create( Dataset_table ) assert c is Dataset_table.c.total_size except Exception as e: - print "Adding total_size column to dataset table failed: %s" % str( e ) + print("Adding total_size column to dataset table failed: %s" % str( e )) log.debug( "Adding total_size column to dataset table failed: %s" % str( e ) ) try: @@ -32,7 +32,7 @@ def upgrade(migrate_engine): assert c is HistoryDatasetAssociation_table.c.purged migrate_engine.execute(HistoryDatasetAssociation_table.update().values(purged=False)) except Exception as e: - print "Adding purged column to history_dataset_association table failed: %s" % str( e ) + print("Adding purged column to history_dataset_association table failed: %s" % str( e )) log.debug( "Adding purged column to history_dataset_association table failed: %s" % str( e ) ) try: @@ -41,7 +41,7 @@ def upgrade(migrate_engine): c.create( User_table, index_name="ix_galaxy_user_disk_usage") assert c is User_table.c.disk_usage except Exception as e: - print "Adding disk_usage column to galaxy_user table failed: %s" % str( e ) + print("Adding disk_usage column to galaxy_user table failed: %s" % str( e )) log.debug( "Adding disk_usage column to galaxy_user table failed: %s" % str( e ) ) try: @@ -50,7 +50,7 @@ def upgrade(migrate_engine): c.create( GalaxySession_table, index_name="ix_galaxy_session_disk_usage") assert c is GalaxySession_table.c.disk_usage except Exception as e: - print "Adding disk_usage column to galaxy_session table failed: %s" % str( e ) + print("Adding disk_usage column to galaxy_session table failed: %s" % str( e )) log.debug( "Adding disk_usage column to galaxy_session table failed: %s" % str( e ) ) @@ -61,26 +61,26 @@ def downgrade(migrate_engine): Dataset_table = Table( "dataset", metadata, autoload=True ) Dataset_table.c.total_size.drop() except Exception as e: - print "Dropping total_size column from dataset table failed: %s" % str( e ) + print("Dropping total_size column from dataset table failed: %s" % str( e )) log.debug( "Dropping total_size column from dataset table failed: %s" % str( e ) ) try: HistoryDatasetAssociation_table = Table( "history_dataset_association", metadata, autoload=True ) HistoryDatasetAssociation_table.c.purged.drop() except Exception as e: - print "Dropping purged column from history_dataset_association table failed: %s" % str( e ) + print("Dropping purged column from history_dataset_association table failed: %s" % str( e )) log.debug( "Dropping purged column from history_dataset_association table failed: %s" % str( e ) ) try: User_table = Table( "galaxy_user", metadata, autoload=True ) User_table.c.disk_usage.drop() except Exception as e: - print "Dropping disk_usage column from galaxy_user table failed: %s" % str( e ) + print("Dropping disk_usage column from galaxy_user table failed: %s" % str( e )) log.debug( "Dropping disk_usage column from galaxy_user table failed: %s" % str( e ) ) try: GalaxySession_table = Table( "galaxy_session", metadata, autoload=True ) GalaxySession_table.c.disk_usage.drop() except Exception as e: - print "Dropping disk_usage column from galaxy_session table failed: %s" % str( e ) + print("Dropping disk_usage column from galaxy_session table failed: %s" % str( e )) log.debug( "Dropping disk_usage column from galaxy_session table failed: %s" % str( e ) ) diff --git a/lib/galaxy/model/migrate/versions/0079_input_library_to_job_table.py b/lib/galaxy/model/migrate/versions/0079_input_library_to_job_table.py index 4cc0d6e0ab6f..6f84cde2b3a5 100644 --- a/lib/galaxy/model/migrate/versions/0079_input_library_to_job_table.py +++ b/lib/galaxy/model/migrate/versions/0079_input_library_to_job_table.py @@ -18,14 +18,14 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() # Create the job_to_input_library_dataset table try: JobToInputLibraryDatasetAssociation_table.create() except Exception as e: - print "Creating job_to_input_library_dataset table failed: %s" % str( e ) + print("Creating job_to_input_library_dataset table failed: %s" % str( e )) log.debug( "Creating job_to_input_library_dataset table failed: %s" % str( e ) ) @@ -37,5 +37,5 @@ def downgrade(migrate_engine): try: JobToInputLibraryDatasetAssociation_table.drop() except Exception as e: - print str(e) + print(str(e)) log.debug( "Dropping job_to_input_library_dataset table failed: %s" % str( e ) ) diff --git a/lib/galaxy/model/migrate/versions/0080_quota_tables.py b/lib/galaxy/model/migrate/versions/0080_quota_tables.py index 5420a822f2db..77ca768b10a0 100644 --- a/lib/galaxy/model/migrate/versions/0080_quota_tables.py +++ b/lib/galaxy/model/migrate/versions/0080_quota_tables.py @@ -46,7 +46,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() # Create quota table diff --git a/lib/galaxy/model/migrate/versions/0081_add_tool_version_to_hda_ldda.py b/lib/galaxy/model/migrate/versions/0081_add_tool_version_to_hda_ldda.py index d3781b9dc236..34b3949198b4 100644 --- a/lib/galaxy/model/migrate/versions/0081_add_tool_version_to_hda_ldda.py +++ b/lib/galaxy/model/migrate/versions/0081_add_tool_version_to_hda_ldda.py @@ -8,7 +8,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() try: hda_table = Table( "history_dataset_association", metadata, autoload=True ) @@ -22,7 +22,7 @@ def upgrade(migrate_engine): assert c is ldda_table.c.tool_version except Exception as e: - print "Adding the tool_version column to the hda/ldda tables failed: ", str( e ) + print("Adding the tool_version column to the hda/ldda tables failed: ", str( e )) def downgrade(migrate_engine): @@ -35,4 +35,4 @@ def downgrade(migrate_engine): ldda_table = Table( "library_dataset_dataset_association", metadata, autoload=True ) ldda_table.c.tool_version.drop() except Exception as e: - print "Dropping the tool_version column from hda/ldda table failed: ", str( e ) + print("Dropping the tool_version column from hda/ldda table failed: ", str( e )) diff --git a/lib/galaxy/model/migrate/versions/0082_add_tool_shed_repository_table.py b/lib/galaxy/model/migrate/versions/0082_add_tool_shed_repository_table.py index 436576ebffae..b7cfe370276b 100644 --- a/lib/galaxy/model/migrate/versions/0082_add_tool_shed_repository_table.py +++ b/lib/galaxy/model/migrate/versions/0082_add_tool_shed_repository_table.py @@ -36,7 +36,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() try: ToolShedRepository_table.create() diff --git a/lib/galaxy/model/migrate/versions/0083_add_prepare_files_to_task.py b/lib/galaxy/model/migrate/versions/0083_add_prepare_files_to_task.py index 2b9570818dd6..e65d06b8a349 100644 --- a/lib/galaxy/model/migrate/versions/0083_add_prepare_files_to_task.py +++ b/lib/galaxy/model/migrate/versions/0083_add_prepare_files_to_task.py @@ -11,7 +11,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() try: task_table = Table( "task", metadata, autoload=True ) @@ -19,7 +19,7 @@ def upgrade(migrate_engine): c.create( task_table ) assert c is task_table.c.prepare_input_files_cmd except Exception as e: - print "Adding prepare_input_files_cmd column to task table failed: %s" % str( e ) + print("Adding prepare_input_files_cmd column to task table failed: %s" % str( e )) log.debug( "Adding prepare_input_files_cmd column to task table failed: %s" % str( e ) ) try: task_table = Table( "task", metadata, autoload=True ) @@ -27,7 +27,7 @@ def upgrade(migrate_engine): c.create( task_table ) assert c is task_table.c.working_directory except Exception as e: - print "Adding working_directory column to task table failed: %s" % str( e ) + print("Adding working_directory column to task table failed: %s" % str( e )) log.debug( "Adding working_directory column to task table failed: %s" % str( e ) ) # remove the 'part_file' column - nobody used tasks before this, so no data needs to be migrated @@ -44,13 +44,13 @@ def downgrade(migrate_engine): task_table = Table( "task", metadata, autoload=True ) task_table.c.prepare_input_files_cmd.drop() except Exception as e: - print "Dropping prepare_input_files_cmd column from task table failed: %s" % str( e ) + print("Dropping prepare_input_files_cmd column from task table failed: %s" % str( e )) log.debug( "Dropping prepare_input_files_cmd column from task table failed: %s" % str( e ) ) try: task_table = Table( "task", metadata, autoload=True ) task_table.c.working_directory.drop() except Exception as e: - print "Dropping working_directory column from task table failed: %s" % str( e ) + print("Dropping working_directory column from task table failed: %s" % str( e )) log.debug( "Dropping working_directory column from task table failed: %s" % str( e ) ) try: task_table = Table( "task", metadata, autoload=True ) @@ -58,5 +58,5 @@ def downgrade(migrate_engine): c.create( task_table ) assert c is task_table.c.part_file except Exception as e: - print "Adding part_file column to task table failed: %s" % str( e ) + print("Adding part_file column to task table failed: %s" % str( e )) log.debug( "Adding part_file column to task table failed: %s" % str( e ) ) diff --git a/lib/galaxy/model/migrate/versions/0084_add_ldda_id_to_implicit_conversion_table.py b/lib/galaxy/model/migrate/versions/0084_add_ldda_id_to_implicit_conversion_table.py index 27ed7d01bbce..5dde0a3a1dc1 100644 --- a/lib/galaxy/model/migrate/versions/0084_add_ldda_id_to_implicit_conversion_table.py +++ b/lib/galaxy/model/migrate/versions/0084_add_ldda_id_to_implicit_conversion_table.py @@ -11,7 +11,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() try: Implicitly_converted_table = Table( "implicitly_converted_dataset_association", metadata, autoload=True ) @@ -22,7 +22,7 @@ def upgrade(migrate_engine): c.create( Implicitly_converted_table, index_name="ix_implicitly_converted_ds_assoc_ldda_id") assert c is Implicitly_converted_table.c.ldda_id except Exception as e: - print "Adding ldda_id column to implicitly_converted_dataset_association table failed: %s" % str( e ) + print("Adding ldda_id column to implicitly_converted_dataset_association table failed: %s" % str( e )) log.debug( "Adding ldda_id column to implicitly_converted_dataset_association table failed: %s" % str( e ) ) @@ -33,5 +33,5 @@ def downgrade(migrate_engine): Implicitly_converted_table = Table( "implicitly_converted_dataset_association", metadata, autoload=True ) Implicitly_converted_table.c.ldda_id.drop() except Exception as e: - print "Dropping ldda_id column from implicitly_converted_dataset_association table failed: %s" % str( e ) + print("Dropping ldda_id column from implicitly_converted_dataset_association table failed: %s" % str( e )) log.debug( "Dropping ldda_id column from implicitly_converted_dataset_association table failed: %s" % str( e ) ) diff --git a/lib/galaxy/model/migrate/versions/0085_add_task_info.py b/lib/galaxy/model/migrate/versions/0085_add_task_info.py index ffdce7b5c322..327bb8303326 100644 --- a/lib/galaxy/model/migrate/versions/0085_add_task_info.py +++ b/lib/galaxy/model/migrate/versions/0085_add_task_info.py @@ -13,7 +13,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() try: task_table = Table( "task", metadata, autoload=True ) @@ -21,7 +21,7 @@ def upgrade(migrate_engine): c.create( task_table ) assert c is task_table.c.info except Exception as e: - print "Adding info column to table table failed: %s" % str( e ) + print("Adding info column to table table failed: %s" % str( e )) log.debug( "Adding info column to task table failed: %s" % str( e ) ) @@ -32,5 +32,5 @@ def downgrade(migrate_engine): task_table = Table( "task", metadata, autoload=True ) task_table.c.info.drop() except Exception as e: - print "Dropping info column from task table failed: %s" % str( e ) + print("Dropping info column from task table failed: %s" % str( e )) log.debug( "Dropping info column from task table failed: %s" % str( e ) ) diff --git a/lib/galaxy/model/migrate/versions/0086_add_tool_shed_repository_table_columns.py b/lib/galaxy/model/migrate/versions/0086_add_tool_shed_repository_table_columns.py index 7c48f8400b49..81dacdb3dd9d 100644 --- a/lib/galaxy/model/migrate/versions/0086_add_tool_shed_repository_table_columns.py +++ b/lib/galaxy/model/migrate/versions/0086_add_tool_shed_repository_table_columns.py @@ -31,7 +31,7 @@ def get_default_false(migrate_engine): def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() ToolShedRepository_table = Table( "tool_shed_repository", metadata, autoload=True ) c = Column( "metadata", JSONType(), nullable=True ) @@ -39,7 +39,7 @@ def upgrade(migrate_engine): c.create( ToolShedRepository_table ) assert c is ToolShedRepository_table.c.metadata except Exception as e: - print "Adding metadata column to the tool_shed_repository table failed: %s" % str( e ) + print("Adding metadata column to the tool_shed_repository table failed: %s" % str( e )) log.debug( "Adding metadata column to the tool_shed_repository table failed: %s" % str( e ) ) c = Column( "includes_datatypes", Boolean, index=True, default=False ) try: @@ -47,7 +47,7 @@ def upgrade(migrate_engine): assert c is ToolShedRepository_table.c.includes_datatypes migrate_engine.execute( "UPDATE tool_shed_repository SET includes_datatypes=%s" % get_default_false(migrate_engine)) except Exception as e: - print "Adding includes_datatypes column to the tool_shed_repository table failed: %s" % str( e ) + print("Adding includes_datatypes column to the tool_shed_repository table failed: %s" % str( e )) log.debug( "Adding includes_datatypes column to the tool_shed_repository table failed: %s" % str( e ) ) c = Column( "update_available", Boolean, default=False ) try: @@ -55,7 +55,7 @@ def upgrade(migrate_engine): assert c is ToolShedRepository_table.c.update_available migrate_engine.execute( "UPDATE tool_shed_repository SET update_available=%s" % get_default_false(migrate_engine)) except Exception as e: - print "Adding update_available column to the tool_shed_repository table failed: %s" % str( e ) + print("Adding update_available column to the tool_shed_repository table failed: %s" % str( e )) log.debug( "Adding update_available column to the tool_shed_repository table failed: %s" % str( e ) ) @@ -66,15 +66,15 @@ def downgrade(migrate_engine): try: ToolShedRepository_table.c.metadata.drop() except Exception as e: - print "Dropping column metadata from the tool_shed_repository table failed: %s" % str( e ) + print("Dropping column metadata from the tool_shed_repository table failed: %s" % str( e )) log.debug( "Dropping column metadata from the tool_shed_repository table failed: %s" % str( e ) ) try: ToolShedRepository_table.c.includes_datatypes.drop() except Exception as e: - print "Dropping column includes_datatypes from the tool_shed_repository table failed: %s" % str( e ) + print("Dropping column includes_datatypes from the tool_shed_repository table failed: %s" % str( e )) log.debug( "Dropping column includes_datatypes from the tool_shed_repository table failed: %s" % str( e ) ) try: ToolShedRepository_table.c.update_available.drop() except Exception as e: - print "Dropping column update_available from the tool_shed_repository table failed: %s" % str( e ) + print("Dropping column update_available from the tool_shed_repository table failed: %s" % str( e )) log.debug( "Dropping column update_available from the tool_shed_repository table failed: %s" % str( e ) ) diff --git a/lib/galaxy/model/migrate/versions/0087_tool_id_guid_map_table.py b/lib/galaxy/model/migrate/versions/0087_tool_id_guid_map_table.py index b7bdc756799b..b51035bf42e7 100644 --- a/lib/galaxy/model/migrate/versions/0087_tool_id_guid_map_table.py +++ b/lib/galaxy/model/migrate/versions/0087_tool_id_guid_map_table.py @@ -35,7 +35,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() try: ToolIdGuidMap_table.create() diff --git a/lib/galaxy/model/migrate/versions/0088_add_installed_changeset_revison_column.py b/lib/galaxy/model/migrate/versions/0088_add_installed_changeset_revison_column.py index e12d721050b3..38ad15192872 100644 --- a/lib/galaxy/model/migrate/versions/0088_add_installed_changeset_revison_column.py +++ b/lib/galaxy/model/migrate/versions/0088_add_installed_changeset_revison_column.py @@ -24,7 +24,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() ToolShedRepository_table = Table( "tool_shed_repository", metadata, autoload=True ) col = Column( "installed_changeset_revision", TrimmedString( 255 ) ) @@ -32,7 +32,7 @@ def upgrade(migrate_engine): col.create( ToolShedRepository_table ) assert col is ToolShedRepository_table.c.installed_changeset_revision except Exception as e: - print "Adding installed_changeset_revision column to the tool_shed_repository table failed: %s" % str( e ) + print("Adding installed_changeset_revision column to the tool_shed_repository table failed: %s" % str( e )) log.debug( "Adding installed_changeset_revision column to the tool_shed_repository table failed: %s" % str( e ) ) # Update each row by setting the value of installed_changeset_revison to be the value of changeset_revision. # This will be problematic if the value of changeset_revision was updated to something other than the value @@ -51,7 +51,7 @@ def upgrade(migrate_engine): + "WHERE changeset_revision = '%s';" % row.changeset_revision migrate_engine.execute( cmd ) update_count += 1 - print "Updated the installed_changeset_revision column for ", update_count, " rows in the tool_shed_repository table. " + print("Updated the installed_changeset_revision column for ", update_count, " rows in the tool_shed_repository table. ") def downgrade(migrate_engine): @@ -61,5 +61,5 @@ def downgrade(migrate_engine): try: ToolShedRepository_table.c.installed_changeset_revision.drop() except Exception as e: - print "Dropping column installed_changeset_revision from the tool_shed_repository table failed: %s" % str( e ) + print("Dropping column installed_changeset_revision from the tool_shed_repository table failed: %s" % str( e )) log.debug( "Dropping column installed_changeset_revision from the tool_shed_repository table failed: %s" % str( e ) ) diff --git a/lib/galaxy/model/migrate/versions/0089_add_object_store_id_columns.py b/lib/galaxy/model/migrate/versions/0089_add_object_store_id_columns.py index efabbd5ab267..acf4469413a4 100644 --- a/lib/galaxy/model/migrate/versions/0089_add_object_store_id_columns.py +++ b/lib/galaxy/model/migrate/versions/0089_add_object_store_id_columns.py @@ -13,7 +13,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() for t_name in ( 'dataset', 'job', 'metadata_file' ): t = Table( t_name, metadata, autoload=True ) @@ -22,7 +22,7 @@ def upgrade(migrate_engine): c.create( t, index_name="ix_%s_object_store_id" % t_name) assert c is t.c.object_store_id except Exception as e: - print "Adding object_store_id column to %s table failed: %s" % ( t_name, str( e ) ) + print("Adding object_store_id column to %s table failed: %s" % ( t_name, str( e ) )) log.debug( "Adding object_store_id column to %s table failed: %s" % ( t_name, str( e ) ) ) @@ -34,5 +34,5 @@ def downgrade(migrate_engine): try: t.c.object_store_id.drop() except Exception as e: - print "Dropping object_store_id column from %s table failed: %s" % ( t_name, str( e ) ) + print("Dropping object_store_id column from %s table failed: %s" % ( t_name, str( e ) )) log.debug( "Dropping object_store_id column from %s table failed: %s" % ( t_name, str( e ) ) ) diff --git a/lib/galaxy/model/migrate/versions/0090_add_tool_shed_repository_table_columns.py b/lib/galaxy/model/migrate/versions/0090_add_tool_shed_repository_table_columns.py index eb209758ba5a..8b35c9aab191 100644 --- a/lib/galaxy/model/migrate/versions/0090_add_tool_shed_repository_table_columns.py +++ b/lib/galaxy/model/migrate/versions/0090_add_tool_shed_repository_table_columns.py @@ -28,7 +28,7 @@ def default_false(migrate_engine): def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() ToolShedRepository_table = Table( "tool_shed_repository", metadata, autoload=True ) c = Column( "uninstalled", Boolean, default=False ) @@ -37,14 +37,14 @@ def upgrade(migrate_engine): assert c is ToolShedRepository_table.c.uninstalled migrate_engine.execute( "UPDATE tool_shed_repository SET uninstalled=%s" % default_false(migrate_engine) ) except Exception as e: - print "Adding uninstalled column to the tool_shed_repository table failed: %s" % str( e ) + print("Adding uninstalled column to the tool_shed_repository table failed: %s" % str( e )) c = Column( "dist_to_shed", Boolean, default=False ) try: c.create( ToolShedRepository_table ) assert c is ToolShedRepository_table.c.dist_to_shed migrate_engine.execute( "UPDATE tool_shed_repository SET dist_to_shed=%s" % default_false(migrate_engine) ) except Exception as e: - print "Adding dist_to_shed column to the tool_shed_repository table failed: %s" % str( e ) + print("Adding dist_to_shed column to the tool_shed_repository table failed: %s" % str( e )) def downgrade(migrate_engine): @@ -54,8 +54,8 @@ def downgrade(migrate_engine): try: ToolShedRepository_table.c.uninstalled.drop() except Exception as e: - print "Dropping column uninstalled from the tool_shed_repository table failed: %s" % str( e ) + print("Dropping column uninstalled from the tool_shed_repository table failed: %s" % str( e )) try: ToolShedRepository_table.c.dist_to_shed.drop() except Exception as e: - print "Dropping column dist_to_shed from the tool_shed_repository table failed: %s" % str( e ) + print("Dropping column dist_to_shed from the tool_shed_repository table failed: %s" % str( e )) diff --git a/lib/galaxy/model/migrate/versions/0091_add_tool_version_tables.py b/lib/galaxy/model/migrate/versions/0091_add_tool_version_tables.py index cf2967315c0a..f9ae343ac365 100644 --- a/lib/galaxy/model/migrate/versions/0091_add_tool_version_tables.py +++ b/lib/galaxy/model/migrate/versions/0091_add_tool_version_tables.py @@ -55,7 +55,7 @@ def localtimestamp(migrate_engine): def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) ToolIdGuidMap_table = Table( "tool_id_guid_map", metadata, autoload=True ) @@ -85,7 +85,7 @@ def upgrade(migrate_engine): ( nextval( migrate_engine, 'tool_version' ), localtimestamp( migrate_engine ), localtimestamp( migrate_engine ), tool_dict[ 'guid' ], tool_shed_repository_id ) migrate_engine.execute( cmd ) count += 1 - print "Added %d rows to the new tool_version table." % count + print("Added %d rows to the new tool_version table." % count) # Drop the tool_id_guid_map table since the 2 new tables render it unnecessary. try: ToolIdGuidMap_table.drop() diff --git a/lib/galaxy/model/migrate/versions/0092_add_migrate_tools_table.py b/lib/galaxy/model/migrate/versions/0092_add_migrate_tools_table.py index af5b8afa1f23..e9d55d264bc3 100644 --- a/lib/galaxy/model/migrate/versions/0092_add_migrate_tools_table.py +++ b/lib/galaxy/model/migrate/versions/0092_add_migrate_tools_table.py @@ -29,7 +29,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() # Create the table. diff --git a/lib/galaxy/model/migrate/versions/0093_add_job_params_col.py b/lib/galaxy/model/migrate/versions/0093_add_job_params_col.py index c8e6d607ced3..12d1fa876ef2 100644 --- a/lib/galaxy/model/migrate/versions/0093_add_job_params_col.py +++ b/lib/galaxy/model/migrate/versions/0093_add_job_params_col.py @@ -16,13 +16,13 @@ def display_migration_details(): - print "" - print "This migration script adds a 'params' column to the Job table." + print("") + print("This migration script adds a 'params' column to the Job table.") def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() # Add column to Job table. @@ -32,7 +32,7 @@ def upgrade(migrate_engine): assert params_col is Job_table.c.params except Exception as e: - print str(e) + print(str(e)) log.debug( "Adding column 'params' to job table failed: %s" % str( e ) ) diff --git a/lib/galaxy/model/migrate/versions/0094_add_job_handler_col.py b/lib/galaxy/model/migrate/versions/0094_add_job_handler_col.py index 0d996fe6e58c..46ddd8e5b8ec 100644 --- a/lib/galaxy/model/migrate/versions/0094_add_job_handler_col.py +++ b/lib/galaxy/model/migrate/versions/0094_add_job_handler_col.py @@ -16,13 +16,13 @@ def display_migration_details(): - print "" - print "This migration script adds a 'handler' column to the Job table." + print("") + print("This migration script adds a 'handler' column to the Job table.") def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() # Add column to Job table. @@ -32,7 +32,7 @@ def upgrade(migrate_engine): assert handler_col is Job_table.c.handler except Exception as e: - print str(e) + print(str(e)) log.debug( "Adding column 'handler' to job table failed: %s" % str( e ) ) diff --git a/lib/galaxy/model/migrate/versions/0095_hda_subsets.py b/lib/galaxy/model/migrate/versions/0095_hda_subsets.py index 3ca255eb23cb..d1c15c9052c6 100644 --- a/lib/galaxy/model/migrate/versions/0095_hda_subsets.py +++ b/lib/galaxy/model/migrate/versions/0095_hda_subsets.py @@ -19,14 +19,14 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() # Create history_dataset_association_subset. try: HistoryDatasetAssociationSubset_table.create() except Exception as e: - print str(e) + print(str(e)) log.debug( "Creating history_dataset_association_subset table failed: %s" % str( e ) ) # Manually create indexes because they are too long for MySQL databases. @@ -36,7 +36,7 @@ def upgrade(migrate_engine): i1.create() i2.create() except Exception as e: - print str(e) + print(str(e)) log.debug( "Adding indices to table 'history_dataset_association_subset' table failed: %s" % str( e ) ) @@ -48,5 +48,5 @@ def downgrade(migrate_engine): try: HistoryDatasetAssociationSubset_table.drop() except Exception as e: - print str(e) + print(str(e)) log.debug( "Dropping history_dataset_association_subset table failed: %s" % str( e ) ) diff --git a/lib/galaxy/model/migrate/versions/0096_openid_provider.py b/lib/galaxy/model/migrate/versions/0096_openid_provider.py index 89792e5cd468..99481801b744 100644 --- a/lib/galaxy/model/migrate/versions/0096_openid_provider.py +++ b/lib/galaxy/model/migrate/versions/0096_openid_provider.py @@ -15,7 +15,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() try: @@ -24,7 +24,7 @@ def upgrade(migrate_engine): c.create( OpenID_table ) assert c is OpenID_table.c.provider except Exception as e: - print "Adding provider column to galaxy_user_openid table failed: %s" % str( e ) + print("Adding provider column to galaxy_user_openid table failed: %s" % str( e )) log.debug( "Adding provider column to galaxy_user_openid table failed: %s" % str( e ) ) try: @@ -41,5 +41,5 @@ def downgrade(migrate_engine): OpenID_table = Table( "galaxy_user_openid", metadata, autoload=True ) OpenID_table.c.provider.drop() except Exception as e: - print "Dropping provider column from galaxy_user_openid table failed: %s" % str( e ) + print("Dropping provider column from galaxy_user_openid table failed: %s" % str( e )) log.debug( "Dropping provider column from galaxy_user_openid table failed: %s" % str( e ) ) diff --git a/lib/galaxy/model/migrate/versions/0097_add_ctx_rev_column.py b/lib/galaxy/model/migrate/versions/0097_add_ctx_rev_column.py index 10076ae2ed84..5f294e37ed2b 100644 --- a/lib/galaxy/model/migrate/versions/0097_add_ctx_rev_column.py +++ b/lib/galaxy/model/migrate/versions/0097_add_ctx_rev_column.py @@ -24,7 +24,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() ToolShedRepository_table = Table( "tool_shed_repository", metadata, autoload=True ) col = Column( "ctx_rev", TrimmedString( 10 ) ) @@ -32,7 +32,7 @@ def upgrade(migrate_engine): col.create( ToolShedRepository_table ) assert col is ToolShedRepository_table.c.ctx_rev except Exception as e: - print "Adding ctx_rev column to the tool_shed_repository table failed: %s" % str( e ) + print("Adding ctx_rev column to the tool_shed_repository table failed: %s" % str( e )) def downgrade(migrate_engine): @@ -42,4 +42,4 @@ def downgrade(migrate_engine): try: ToolShedRepository_table.c.ctx_rev.drop() except Exception as e: - print "Dropping column ctx_rev from the tool_shed_repository table failed: %s" % str( e ) + print("Dropping column ctx_rev from the tool_shed_repository table failed: %s" % str( e )) diff --git a/lib/galaxy/model/migrate/versions/0098_genome_index_tool_data_table.py b/lib/galaxy/model/migrate/versions/0098_genome_index_tool_data_table.py index dd86fd290a62..eff33d3f9fce 100644 --- a/lib/galaxy/model/migrate/versions/0098_genome_index_tool_data_table.py +++ b/lib/galaxy/model/migrate/versions/0098_genome_index_tool_data_table.py @@ -34,7 +34,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() try: diff --git a/lib/galaxy/model/migrate/versions/0099_add_tool_dependency_table.py b/lib/galaxy/model/migrate/versions/0099_add_tool_dependency_table.py index f04f19282f3b..3994679e7d30 100644 --- a/lib/galaxy/model/migrate/versions/0099_add_tool_dependency_table.py +++ b/lib/galaxy/model/migrate/versions/0099_add_tool_dependency_table.py @@ -35,7 +35,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() try: ToolDependency_table.create() diff --git a/lib/galaxy/model/migrate/versions/0100_alter_tool_dependency_table_version_column.py b/lib/galaxy/model/migrate/versions/0100_alter_tool_dependency_table_version_column.py index eefe3b0330e9..edeec5578938 100644 --- a/lib/galaxy/model/migrate/versions/0100_alter_tool_dependency_table_version_column.py +++ b/lib/galaxy/model/migrate/versions/0100_alter_tool_dependency_table_version_column.py @@ -20,7 +20,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() Table( "tool_dependency", metadata, autoload=True ) # Change the tool_dependency table's version column from TrimmedString to Text. diff --git a/lib/galaxy/model/migrate/versions/0101_drop_installed_changeset_revision_column.py b/lib/galaxy/model/migrate/versions/0101_drop_installed_changeset_revision_column.py index a5aaf627fed4..15f646d8c310 100644 --- a/lib/galaxy/model/migrate/versions/0101_drop_installed_changeset_revision_column.py +++ b/lib/galaxy/model/migrate/versions/0101_drop_installed_changeset_revision_column.py @@ -22,7 +22,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() try: ToolDependency_table = Table( "tool_dependency", metadata, autoload=True ) diff --git a/lib/galaxy/model/migrate/versions/0102_add_tool_dependency_status_columns.py b/lib/galaxy/model/migrate/versions/0102_add_tool_dependency_status_columns.py index 45887cb05845..889d86351576 100644 --- a/lib/galaxy/model/migrate/versions/0102_add_tool_dependency_status_columns.py +++ b/lib/galaxy/model/migrate/versions/0102_add_tool_dependency_status_columns.py @@ -24,7 +24,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() ToolDependency_table = Table( "tool_dependency", metadata, autoload=True ) if migrate_engine.name == 'sqlite': @@ -35,13 +35,13 @@ def upgrade(migrate_engine): col.create( ToolDependency_table ) assert col is ToolDependency_table.c.status except Exception as e: - print "Adding status column to the tool_dependency table failed: %s" % str( e ) + print("Adding status column to the tool_dependency table failed: %s" % str( e )) col = Column( "error_message", TEXT ) try: col.create( ToolDependency_table ) assert col is ToolDependency_table.c.error_message except Exception as e: - print "Adding error_message column to the tool_dependency table failed: %s" % str( e ) + print("Adding error_message column to the tool_dependency table failed: %s" % str( e )) if migrate_engine.name != 'sqlite': # This breaks in sqlite due to failure to drop check constraint. @@ -49,7 +49,7 @@ def upgrade(migrate_engine): try: ToolDependency_table.c.uninstalled.drop() except Exception as e: - print "Dropping uninstalled column from the tool_dependency table failed: %s" % str( e ) + print("Dropping uninstalled column from the tool_dependency table failed: %s" % str( e )) def downgrade(migrate_engine): @@ -59,14 +59,14 @@ def downgrade(migrate_engine): try: ToolDependency_table.c.status.drop() except Exception as e: - print "Dropping column status from the tool_dependency table failed: %s" % str( e ) + print("Dropping column status from the tool_dependency table failed: %s" % str( e )) try: ToolDependency_table.c.error_message.drop() except Exception as e: - print "Dropping column error_message from the tool_dependency table failed: %s" % str( e ) + print("Dropping column error_message from the tool_dependency table failed: %s" % str( e )) col = Column( "uninstalled", Boolean, default=False ) try: col.create( ToolDependency_table ) assert col is ToolDependency_table.c.uninstalled except Exception as e: - print "Adding uninstalled column to the tool_dependency table failed: %s" % str( e ) + print("Adding uninstalled column to the tool_dependency table failed: %s" % str( e )) diff --git a/lib/galaxy/model/migrate/versions/0103_add_tool_shed_repository_status_columns.py b/lib/galaxy/model/migrate/versions/0103_add_tool_shed_repository_status_columns.py index a9a2e963c90c..78ccd57b9873 100644 --- a/lib/galaxy/model/migrate/versions/0103_add_tool_shed_repository_status_columns.py +++ b/lib/galaxy/model/migrate/versions/0103_add_tool_shed_repository_status_columns.py @@ -12,7 +12,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() ToolShedRepository_table = Table( "tool_shed_repository", metadata, autoload=True ) # Add the status column to the tool_shed_repository table. @@ -21,38 +21,38 @@ def upgrade(migrate_engine): col.create( ToolShedRepository_table ) assert col is ToolShedRepository_table.c.status except Exception as e: - print "Adding status column to the tool_shed_repository table failed: %s" % str( e ) + print("Adding status column to the tool_shed_repository table failed: %s" % str( e )) # Add the error_message column to the tool_shed_repository table. col = Column( "error_message", TEXT ) try: col.create( ToolShedRepository_table ) assert col is ToolShedRepository_table.c.error_message except Exception as e: - print "Adding error_message column to the tool_shed_repository table failed: %s" % str( e ) + print("Adding error_message column to the tool_shed_repository table failed: %s" % str( e )) # Update the status column value for tool_shed_repositories to the default value 'Installed'. cmd = "UPDATE tool_shed_repository SET status = 'Installed';" try: migrate_engine.execute( cmd ) except Exception as e: - print "Exception executing sql command: " - print cmd - print str( e ) + print("Exception executing sql command: ") + print(cmd) + print(str( e )) # Update the status column for tool_shed_repositories that have been uninstalled. cmd = "UPDATE tool_shed_repository SET status = 'Uninstalled' WHERE uninstalled;" try: migrate_engine.execute( cmd ) except Exception as e: - print "Exception executing sql command: " - print cmd - print str( e ) + print("Exception executing sql command: ") + print(cmd) + print(str( e )) # Update the status column for tool_shed_repositories that have been deactivated. cmd = "UPDATE tool_shed_repository SET status = 'Deactivated' where deleted and not uninstalled;" try: migrate_engine.execute( cmd ) except Exception as e: - print "Exception executing sql command: " - print cmd - print str( e ) + print("Exception executing sql command: ") + print(cmd) + print(str( e )) def downgrade(migrate_engine): @@ -62,8 +62,8 @@ def downgrade(migrate_engine): try: ToolShedRepository_table.c.status.drop() except Exception as e: - print "Dropping column status from the tool_shed_repository table failed: %s" % str( e ) + print("Dropping column status from the tool_shed_repository table failed: %s" % str( e )) try: ToolShedRepository_table.c.error_message.drop() except Exception as e: - print "Dropping column error_message from the tool_shed_repository table failed: %s" % str( e ) + print("Dropping column error_message from the tool_shed_repository table failed: %s" % str( e )) diff --git a/lib/galaxy/model/migrate/versions/0105_add_cleanup_event_table.py b/lib/galaxy/model/migrate/versions/0105_add_cleanup_event_table.py index adfcd25c9719..2782ea9748d2 100644 --- a/lib/galaxy/model/migrate/versions/0105_add_cleanup_event_table.py +++ b/lib/galaxy/model/migrate/versions/0105_add_cleanup_event_table.py @@ -83,7 +83,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() try: CleanupEvent_table.create() diff --git a/lib/galaxy/model/migrate/versions/0106_add_missing_indexes.py b/lib/galaxy/model/migrate/versions/0106_add_missing_indexes.py index b237c8929b6d..bd4ad57275d5 100644 --- a/lib/galaxy/model/migrate/versions/0106_add_missing_indexes.py +++ b/lib/galaxy/model/migrate/versions/0106_add_missing_indexes.py @@ -49,7 +49,7 @@ def upgrade(migrate_engine): - print __doc__ + print(__doc__) metadata.bind = migrate_engine metadata.reflect() insp = reflection.Inspector.from_engine(migrate_engine) diff --git a/lib/galaxy/model/migrate/versions/0107_add_exit_code_to_job_and_task.py b/lib/galaxy/model/migrate/versions/0107_add_exit_code_to_job_and_task.py index 305c2031b5ff..84f81792c216 100644 --- a/lib/galaxy/model/migrate/versions/0107_add_exit_code_to_job_and_task.py +++ b/lib/galaxy/model/migrate/versions/0107_add_exit_code_to_job_and_task.py @@ -15,12 +15,12 @@ def display_migration_details(): - print "" - print "This migration script adds a 'handler' column to the Job table." + print("") + print("This migration script adds a 'handler' column to the Job table.") def upgrade(migrate_engine): - print __doc__ + print(__doc__) metadata.bind = migrate_engine metadata.reflect() @@ -30,7 +30,7 @@ def upgrade(migrate_engine): exit_code_job_col.create( job_table ) assert exit_code_job_col is job_table.c.exit_code except Exception as e: - print str(e) + print(str(e)) log.error( "Adding column 'exit_code' to job table failed: %s" % str( e ) ) return @@ -40,7 +40,7 @@ def upgrade(migrate_engine): exit_code_task_col.create( task_table ) assert exit_code_task_col is task_table.c.exit_code except Exception as e: - print str(e) + print(str(e)) log.error( "Adding column 'exit_code' to task table failed: %s" % str( e ) ) return diff --git a/lib/galaxy/model/migrate/versions/0108_add_extended_metadata.py b/lib/galaxy/model/migrate/versions/0108_add_extended_metadata.py index 958bfefb859c..c083c8d08db3 100644 --- a/lib/galaxy/model/migrate/versions/0108_add_extended_metadata.py +++ b/lib/galaxy/model/migrate/versions/0108_add_extended_metadata.py @@ -27,11 +27,11 @@ def display_migration_details(): - print "This migration script adds a ExtendedMetadata tables" + print("This migration script adds a ExtendedMetadata tables") def upgrade(migrate_engine): - print __doc__ + print(__doc__) metadata.bind = migrate_engine metadata.reflect() try: @@ -48,7 +48,7 @@ def upgrade(migrate_engine): extended_metadata_ldda_col.create( ldda_table ) assert extended_metadata_ldda_col is ldda_table.c.extended_metadata_id except Exception as e: - print str(e) + print(str(e)) log.error( "Adding column 'extended_metadata_id' to library_dataset_dataset_association table failed: %s" % str( e ) ) diff --git a/lib/galaxy/model/migrate/versions/0109_add_repository_dependency_tables.py b/lib/galaxy/model/migrate/versions/0109_add_repository_dependency_tables.py index 49016323c05a..ded3ed515960 100644 --- a/lib/galaxy/model/migrate/versions/0109_add_repository_dependency_tables.py +++ b/lib/galaxy/model/migrate/versions/0109_add_repository_dependency_tables.py @@ -33,7 +33,7 @@ def upgrade(migrate_engine): - print __doc__ + print(__doc__) metadata.bind = migrate_engine metadata.reflect() try: diff --git a/lib/galaxy/model/migrate/versions/0110_add_dataset_uuid.py b/lib/galaxy/model/migrate/versions/0110_add_dataset_uuid.py index 2b32fec29ed9..cdf1d4e70c40 100644 --- a/lib/galaxy/model/migrate/versions/0110_add_dataset_uuid.py +++ b/lib/galaxy/model/migrate/versions/0110_add_dataset_uuid.py @@ -12,12 +12,12 @@ def display_migration_details(): - print "" - print "This migration adds uuid column to dataset table" + print("") + print("This migration adds uuid column to dataset table") def upgrade(migrate_engine): - print __doc__ + print(__doc__) metadata = MetaData() metadata.bind = migrate_engine metadata.reflect() @@ -28,7 +28,7 @@ def upgrade(migrate_engine): dataset_uuid_column.create( dataset_table ) assert dataset_uuid_column is dataset_table.c.uuid except Exception as e: - print str(e) + print(str(e)) log.error( "Adding column 'uuid' to dataset table failed: %s" % str( e ) ) return diff --git a/lib/galaxy/model/migrate/versions/0111_add_job_destinations.py b/lib/galaxy/model/migrate/versions/0111_add_job_destinations.py index 4eb8b6b89a55..bfb1dc4e6d14 100644 --- a/lib/galaxy/model/migrate/versions/0111_add_job_destinations.py +++ b/lib/galaxy/model/migrate/versions/0111_add_job_destinations.py @@ -11,12 +11,12 @@ def display_migration_details(): - print "" - print "This migration script adds 'destination_id' and 'destination_params' columns to the Job table." + print("") + print("This migration script adds 'destination_id' and 'destination_params' columns to the Job table.") def upgrade(migrate_engine): - print __doc__ + print(__doc__) metadata = MetaData() metadata.bind = migrate_engine metadata.reflect() diff --git a/lib/galaxy/model/migrate/versions/0112_add_data_manager_history_association_and_data_manager_job_association_tables.py b/lib/galaxy/model/migrate/versions/0112_add_data_manager_history_association_and_data_manager_job_association_tables.py index 0e63ffeba1e4..d62f2722ee2e 100644 --- a/lib/galaxy/model/migrate/versions/0112_add_data_manager_history_association_and_data_manager_job_association_tables.py +++ b/lib/galaxy/model/migrate/versions/0112_add_data_manager_history_association_and_data_manager_job_association_tables.py @@ -27,7 +27,7 @@ def upgrade(migrate_engine): - print __doc__ + print(__doc__) metadata.bind = migrate_engine metadata.reflect() try: diff --git a/lib/galaxy/model/migrate/versions/0113_update_migrate_tools_table.py b/lib/galaxy/model/migrate/versions/0113_update_migrate_tools_table.py index c6a1c1ed03d4..07d54bb9ae4e 100644 --- a/lib/galaxy/model/migrate/versions/0113_update_migrate_tools_table.py +++ b/lib/galaxy/model/migrate/versions/0113_update_migrate_tools_table.py @@ -16,7 +16,7 @@ def upgrade(migrate_engine): - print __doc__ + print(__doc__) # Create the table. try: cmd = "UPDATE migrate_tools set repository_path='lib/galaxy/tool_shed/migrate';" diff --git a/lib/galaxy/model/migrate/versions/0114_update_migrate_tools_table_again.py b/lib/galaxy/model/migrate/versions/0114_update_migrate_tools_table_again.py index f54fd9934d28..4408533a57bb 100644 --- a/lib/galaxy/model/migrate/versions/0114_update_migrate_tools_table_again.py +++ b/lib/galaxy/model/migrate/versions/0114_update_migrate_tools_table_again.py @@ -16,7 +16,7 @@ def upgrade(migrate_engine): - print __doc__ + print(__doc__) # Create the table. try: cmd = "UPDATE migrate_tools set repository_path='lib/tool_shed/galaxy_install/migrate';" diff --git a/lib/galaxy/model/migrate/versions/0116_drop_update_available_col_add_tool_shed_status_col.py b/lib/galaxy/model/migrate/versions/0116_drop_update_available_col_add_tool_shed_status_col.py index 830f8cd12bf6..a5040e9b5322 100644 --- a/lib/galaxy/model/migrate/versions/0116_drop_update_available_col_add_tool_shed_status_col.py +++ b/lib/galaxy/model/migrate/versions/0116_drop_update_available_col_add_tool_shed_status_col.py @@ -31,7 +31,7 @@ def default_false( migrate_engine ): def upgrade( migrate_engine ): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() try: ToolShedRepository_table = Table( "tool_shed_repository", metadata, autoload=True ) @@ -45,13 +45,13 @@ def upgrade( migrate_engine ): col = ToolShedRepository_table.c.update_available col.drop() except Exception as e: - print "Dropping column update_available from the tool_shed_repository table failed: %s" % str( e ) + print("Dropping column update_available from the tool_shed_repository table failed: %s" % str( e )) c = Column( "tool_shed_status", JSONType, nullable=True ) try: c.create( ToolShedRepository_table ) assert c is ToolShedRepository_table.c.tool_shed_status except Exception as e: - print "Adding tool_shed_status column to the tool_shed_repository table failed: %s" % str( e ) + print("Adding tool_shed_status column to the tool_shed_repository table failed: %s" % str( e )) def downgrade( migrate_engine ): @@ -69,11 +69,11 @@ def downgrade( migrate_engine ): col = ToolShedRepository_table.c.tool_shed_status col.drop() except Exception as e: - print "Dropping column tool_shed_status from the tool_shed_repository table failed: %s" % str( e ) + print("Dropping column tool_shed_status from the tool_shed_repository table failed: %s" % str( e )) c = Column( "update_available", Boolean, default=False ) try: c.create( ToolShedRepository_table ) assert c is ToolShedRepository_table.c.update_available migrate_engine.execute( "UPDATE tool_shed_repository SET update_available=%s" % default_false( migrate_engine ) ) except Exception as e: - print "Adding column update_available to the tool_shed_repository table failed: %s" % str( e ) + print("Adding column update_available to the tool_shed_repository table failed: %s" % str( e )) diff --git a/lib/galaxy/model/migrate/versions/0117_add_user_activation.py b/lib/galaxy/model/migrate/versions/0117_add_user_activation.py index 28c618b3e608..b01dc907464c 100644 --- a/lib/galaxy/model/migrate/versions/0117_add_user_activation.py +++ b/lib/galaxy/model/migrate/versions/0117_add_user_activation.py @@ -17,12 +17,12 @@ def display_migration_details(): - print "" - print "This migration script adds active and activation_token columns to the user table" + print("") + print("This migration script adds active and activation_token columns to the user table") def upgrade(migrate_engine): - print __doc__ + print(__doc__) metadata = MetaData() metadata.bind = migrate_engine metadata.reflect() @@ -35,7 +35,7 @@ def upgrade(migrate_engine): assert user_active_column is user_table.c.active assert user_activation_token_column is user_table.c.activation_token except Exception as e: - print str(e) + print(str(e)) log.error( "Adding columns 'active' and 'activation_token' to galaxy_user table failed: %s" % str( e ) ) return diff --git a/lib/galaxy/model/migrate/versions/0118_add_hda_extended_metadata.py b/lib/galaxy/model/migrate/versions/0118_add_hda_extended_metadata.py index f846ec5e44e7..a9a9f4c0e712 100644 --- a/lib/galaxy/model/migrate/versions/0118_add_hda_extended_metadata.py +++ b/lib/galaxy/model/migrate/versions/0118_add_hda_extended_metadata.py @@ -11,11 +11,11 @@ def display_migration_details(): - print "This migration script adds a ExtendedMetadata links to HistoryDatasetAssociation tables" + print("This migration script adds a ExtendedMetadata links to HistoryDatasetAssociation tables") def upgrade(migrate_engine): - print __doc__ + print(__doc__) metadata.bind = migrate_engine metadata.reflect() @@ -24,7 +24,7 @@ def upgrade(migrate_engine): extended_metadata_hda_col.create( hda_table ) assert extended_metadata_hda_col is hda_table.c.extended_metadata_id except Exception as e: - print str(e) + print(str(e)) log.error( "Adding column 'extended_metadata_id' to history_dataset_association table failed: %s" % str( e ) ) diff --git a/lib/galaxy/model/migrate/versions/0119_job_metrics.py b/lib/galaxy/model/migrate/versions/0119_job_metrics.py index 94607d1e0ba3..4a8136243dfd 100644 --- a/lib/galaxy/model/migrate/versions/0119_job_metrics.py +++ b/lib/galaxy/model/migrate/versions/0119_job_metrics.py @@ -66,7 +66,7 @@ def upgrade( migrate_engine ): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() for table in TABLES: @@ -85,7 +85,7 @@ def __create(table): try: table.create() except Exception as e: - print str(e) + print(str(e)) log.debug("Creating %s table failed: %s" % (table.name, str( e ) ) ) @@ -93,5 +93,5 @@ def __drop(table): try: table.drop() except Exception as e: - print str(e) + print(str(e)) log.debug("Dropping %s table failed: %s" % (table.name, str( e ) ) ) diff --git a/lib/galaxy/model/migrate/versions/0120_dataset_collections.py b/lib/galaxy/model/migrate/versions/0120_dataset_collections.py index b6c0b533a0ff..eec3d3bfb3ab 100644 --- a/lib/galaxy/model/migrate/versions/0120_dataset_collections.py +++ b/lib/galaxy/model/migrate/versions/0120_dataset_collections.py @@ -128,7 +128,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() for table in TABLES: @@ -138,7 +138,7 @@ def upgrade(migrate_engine): hda_table = Table( "history_dataset_association", metadata, autoload=True ) HiddenBeneathCollection_column.create( hda_table ) except Exception as e: - print str(e) + print(str(e)) log.exception( "Creating HDA column failed." ) @@ -154,7 +154,7 @@ def downgrade(migrate_engine): hidden_beneath_collection_instance_id_col = hda_table.c.hidden_beneath_collection_instance_id hidden_beneath_collection_instance_id_col.drop() except Exception as e: - print str(e) + print(str(e)) log.exception( "Dropping HDA column failed." ) @@ -162,7 +162,7 @@ def __create(table): try: table.create() except Exception as e: - print str(e) + print(str(e)) log.exception("Creating %s table failed: %s" % (table.name, str( e ) ) ) @@ -170,5 +170,5 @@ def __drop(table): try: table.drop() except Exception as e: - print str(e) + print(str(e)) log.exception("Dropping %s table failed: %s" % (table.name, str( e ) ) ) diff --git a/lib/galaxy/model/migrate/versions/0121_workflow_uuids.py b/lib/galaxy/model/migrate/versions/0121_workflow_uuids.py index 6075b34bf3f4..247ca660a498 100644 --- a/lib/galaxy/model/migrate/versions/0121_workflow_uuids.py +++ b/lib/galaxy/model/migrate/versions/0121_workflow_uuids.py @@ -20,11 +20,11 @@ def display_migration_details(): - print "This migration script adds a UUID column to workflows" + print("This migration script adds a UUID column to workflows") def upgrade(migrate_engine): - print __doc__ + print(__doc__) metadata.bind = migrate_engine metadata.reflect() @@ -34,7 +34,7 @@ def upgrade(migrate_engine): workflow_uuid_column.create( workflow_table ) assert workflow_uuid_column is workflow_table.c.uuid except Exception as e: - print str(e) + print(str(e)) log.error( "Adding column 'uuid' to workflow table failed: %s" % str( e ) ) return diff --git a/lib/galaxy/model/migrate/versions/0122_grow_mysql_blobs.py b/lib/galaxy/model/migrate/versions/0122_grow_mysql_blobs.py index 41b03dfe9dc8..3005fb11e9dd 100644 --- a/lib/galaxy/model/migrate/versions/0122_grow_mysql_blobs.py +++ b/lib/galaxy/model/migrate/versions/0122_grow_mysql_blobs.py @@ -36,7 +36,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() if migrate_engine.name != "mysql": @@ -47,8 +47,8 @@ def upgrade(migrate_engine): try: migrate_engine.execute( cmd ) except Exception as e: - print "Failed to grow column %s.%s" % (table, column) - print str( e ) + print("Failed to grow column %s.%s" % (table, column)) + print(str( e )) def downgrade(migrate_engine): diff --git a/lib/galaxy/model/migrate/versions/0123_add_workflow_request_tables.py b/lib/galaxy/model/migrate/versions/0123_add_workflow_request_tables.py index 1236096dcb2b..8693e994c103 100644 --- a/lib/galaxy/model/migrate/versions/0123_add_workflow_request_tables.py +++ b/lib/galaxy/model/migrate/versions/0123_add_workflow_request_tables.py @@ -62,7 +62,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() for table in TABLES: @@ -112,7 +112,7 @@ def __add_column(column, table_name, metadata, **kwds): table = Table( table_name, metadata, autoload=True ) column.create( table, **kwds ) except Exception as e: - print str(e) + print(str(e)) log.exception( "Adding column %s column failed." % column) @@ -121,7 +121,7 @@ def __drop_column( column_name, table_name, metadata ): table = Table( table_name, metadata, autoload=True ) getattr( table.c, column_name ).drop() except Exception as e: - print str(e) + print(str(e)) log.exception( "Dropping column %s failed." % column_name ) @@ -129,7 +129,7 @@ def __create(table): try: table.create() except Exception as e: - print str(e) + print(str(e)) log.exception("Creating %s table failed: %s" % (table.name, str( e ) ) ) @@ -137,5 +137,5 @@ def __drop(table): try: table.drop() except Exception as e: - print str(e) + print(str(e)) log.exception("Dropping %s table failed: %s" % (table.name, str( e ) ) ) diff --git a/lib/galaxy/model/migrate/versions/0124_job_state_history.py b/lib/galaxy/model/migrate/versions/0124_job_state_history.py index 35189f61f59f..d4a25816874c 100644 --- a/lib/galaxy/model/migrate/versions/0124_job_state_history.py +++ b/lib/galaxy/model/migrate/versions/0124_job_state_history.py @@ -23,13 +23,13 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() try: JobStateHistory_table.create() except Exception as e: - print str(e) + print(str(e)) log.exception("Creating %s table failed: %s" % (JobStateHistory_table.name, str( e ) ) ) @@ -40,5 +40,5 @@ def downgrade(migrate_engine): try: JobStateHistory_table.drop() except Exception as e: - print str(e) + print(str(e)) log.exception("Dropping %s table failed: %s" % (JobStateHistory_table.name, str( e ) ) ) diff --git a/lib/galaxy/model/migrate/versions/0125_workflow_step_tracking.py b/lib/galaxy/model/migrate/versions/0125_workflow_step_tracking.py index 2aebdc78c09a..a9086804c7e7 100644 --- a/lib/galaxy/model/migrate/versions/0125_workflow_step_tracking.py +++ b/lib/galaxy/model/migrate/versions/0125_workflow_step_tracking.py @@ -15,7 +15,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() StepLabel_column = Column( "label", TrimmedString(255) ) @@ -37,7 +37,7 @@ def __add_column(column, table_name, metadata, **kwds): table = Table( table_name, metadata, autoload=True ) column.create( table, **kwds ) except Exception as e: - print str(e) + print(str(e)) log.exception( "Adding column %s failed." % column) @@ -46,5 +46,5 @@ def __drop_column( column_name, table_name, metadata ): table = Table( table_name, metadata, autoload=True ) getattr( table.c, column_name ).drop() except Exception as e: - print str(e) + print(str(e)) log.exception( "Dropping column %s failed." % column_name ) diff --git a/lib/galaxy/model/migrate/versions/0126_password_reset.py b/lib/galaxy/model/migrate/versions/0126_password_reset.py index 63cacb803a39..66dbdf5b6fc6 100644 --- a/lib/galaxy/model/migrate/versions/0126_password_reset.py +++ b/lib/galaxy/model/migrate/versions/0126_password_reset.py @@ -18,12 +18,12 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() try: PasswordResetToken_table.create() except Exception as e: - print str(e) + print(str(e)) log.exception("Creating %s table failed: %s" % (PasswordResetToken_table.name, str( e ) ) ) @@ -33,5 +33,5 @@ def downgrade(migrate_engine): try: PasswordResetToken_table.drop() except Exception as e: - print str(e) + print(str(e)) log.exception("Dropping %s table failed: %s" % (PasswordResetToken_table.name, str( e ) ) ) diff --git a/lib/galaxy/model/migrate/versions/0127_output_collection_adjustments.py b/lib/galaxy/model/migrate/versions/0127_output_collection_adjustments.py index 65355aba28dc..c1cca338f24c 100644 --- a/lib/galaxy/model/migrate/versions/0127_output_collection_adjustments.py +++ b/lib/galaxy/model/migrate/versions/0127_output_collection_adjustments.py @@ -28,7 +28,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() for table in TABLES: @@ -43,7 +43,7 @@ def upgrade(migrate_engine): populated_message_column = Column( 'populated_state_message', TEXT, nullable=True ) populated_message_column.create( dataset_collection_table ) except Exception as e: - print str(e) + print(str(e)) log.exception( "Creating dataset collection populated column failed." ) @@ -61,7 +61,7 @@ def downgrade(migrate_engine): populated_message_column = dataset_collection_table.c.populated_state_message populated_message_column.drop() except Exception as e: - print str(e) + print(str(e)) log.exception( "Dropping dataset collection populated_state/ column failed." ) @@ -69,7 +69,7 @@ def __create(table): try: table.create() except Exception as e: - print str(e) + print(str(e)) log.exception("Creating %s table failed: %s" % (table.name, str( e ) ) ) @@ -77,5 +77,5 @@ def __drop(table): try: table.drop() except Exception as e: - print str(e) + print(str(e)) log.exception("Dropping %s table failed: %s" % (table.name, str( e ) ) ) diff --git a/lib/galaxy/model/migrate/versions/0128_session_timeout.py b/lib/galaxy/model/migrate/versions/0128_session_timeout.py index fc63674a88b7..7914047ac917 100644 --- a/lib/galaxy/model/migrate/versions/0128_session_timeout.py +++ b/lib/galaxy/model/migrate/versions/0128_session_timeout.py @@ -13,7 +13,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() lastaction_column = Column( "last_action", DateTime ) @@ -32,7 +32,7 @@ def __add_column(column, table_name, metadata, **kwds): table = Table( table_name, metadata, autoload=True ) column.create( table, **kwds ) except Exception as e: - print str(e) + print(str(e)) log.exception( "Adding column %s failed." % column) @@ -41,5 +41,5 @@ def __drop_column( column_name, table_name, metadata ): table = Table( table_name, metadata, autoload=True ) getattr( table.c, column_name ).drop() except Exception as e: - print str(e) + print(str(e)) log.exception( "Dropping column %s failed." % column_name ) diff --git a/lib/galaxy/model/migrate/versions/0129_job_external_output_metadata_validity.py b/lib/galaxy/model/migrate/versions/0129_job_external_output_metadata_validity.py index b158ee822242..fe5dca741f2e 100644 --- a/lib/galaxy/model/migrate/versions/0129_job_external_output_metadata_validity.py +++ b/lib/galaxy/model/migrate/versions/0129_job_external_output_metadata_validity.py @@ -13,7 +13,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() isvalid_column = Column( "is_valid", Boolean, default=True ) @@ -32,7 +32,7 @@ def __add_column(column, table_name, metadata, **kwds): table = Table( table_name, metadata, autoload=True ) column.create( table, **kwds ) except Exception as e: - print str(e) + print(str(e)) log.exception( "Adding column %s failed." % column) @@ -41,5 +41,5 @@ def __drop_column( column_name, table_name, metadata ): table = Table( table_name, metadata, autoload=True ) getattr( table.c, column_name ).drop() except Exception as e: - print str(e) + print(str(e)) log.exception( "Dropping column %s failed." % column_name ) diff --git a/lib/galaxy/model/migrate/versions/0130_change_pref_datatype.py b/lib/galaxy/model/migrate/versions/0130_change_pref_datatype.py index 4c9acf48250b..220268fa5cc2 100644 --- a/lib/galaxy/model/migrate/versions/0130_change_pref_datatype.py +++ b/lib/galaxy/model/migrate/versions/0130_change_pref_datatype.py @@ -15,7 +15,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() t = Table("user_preference", metadata, autoload=True) t.c.value.alter(type=Text) diff --git a/lib/galaxy/model/migrate/versions/0131_subworkflow_and_input_parameter_modules.py b/lib/galaxy/model/migrate/versions/0131_subworkflow_and_input_parameter_modules.py index b831e7e4583b..ad1e1c485e42 100644 --- a/lib/galaxy/model/migrate/versions/0131_subworkflow_and_input_parameter_modules.py +++ b/lib/galaxy/model/migrate/versions/0131_subworkflow_and_input_parameter_modules.py @@ -47,7 +47,7 @@ def upgrade(migrate_engine): metadata.bind = migrate_engine - print __doc__ + print(__doc__) metadata.reflect() if migrate_engine.name in ['postgres', 'postgresql']: subworkflow_id_column = Column( "subworkflow_id", Integer, ForeignKey("workflow.id"), nullable=True ) @@ -95,7 +95,7 @@ def __alter_column(table_name, column_name, metadata, **kwds): table = Table( table_name, metadata, autoload=True ) getattr( table.c, column_name ).alter(**kwds) except Exception as e: - print str(e) + print(str(e)) log.exception( "Adding column %s failed." % column_name) @@ -104,7 +104,7 @@ def __add_column(column, table_name, metadata, **kwds): table = Table( table_name, metadata, autoload=True ) column.create( table, **kwds ) except Exception as e: - print str(e) + print(str(e)) log.exception( "Adding column %s failed." % column) @@ -113,7 +113,7 @@ def __drop_column( column_name, table_name, metadata ): table = Table( table_name, metadata, autoload=True ) getattr( table.c, column_name ).drop() except Exception as e: - print str(e) + print(str(e)) log.exception( "Dropping column %s failed." % column_name ) @@ -121,7 +121,7 @@ def __create(table): try: table.create() except Exception as e: - print str(e) + print(str(e)) log.exception("Creating %s table failed: %s" % (table.name, str( e ) ) ) @@ -129,5 +129,5 @@ def __drop(table): try: table.drop() except Exception as e: - print str(e) + print(str(e)) log.exception("Dropping %s table failed: %s" % (table.name, str( e ) ) )