diff --git a/.circleci/config.yml b/.circleci/config.yml index b8d9bb466c21..f29c69235e68 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -15,7 +15,7 @@ variables: jobs: get_code: docker: - - image: cimg/python:3.7 + - image: cimg/python:3.8 <<: *set_workdir steps: # Replace standard code checkout with shallow clone to speed things up. @@ -73,7 +73,7 @@ jobs: - ~/repo validate_test_tools: docker: - - image: cimg/python:3.7 + - image: cimg/python:3.8 <<: *set_workdir steps: - *restore_repo_cache diff --git a/.github/workflows/api.yaml b/.github/workflows/api.yaml index 90038e328865..753f669f148f 100644 --- a/.github/workflows/api.yaml +++ b/.github/workflows/api.yaml @@ -28,7 +28,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.7'] + python-version: ['3.8'] chunk: [0, 1] services: postgres: diff --git a/.github/workflows/check_test_class_names.yaml b/.github/workflows/check_test_class_names.yaml index 92db607c7bdb..217995df93e4 100644 --- a/.github/workflows/check_test_class_names.yaml +++ b/.github/workflows/check_test_class_names.yaml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.7'] + python-version: ['3.8'] steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 diff --git a/.github/workflows/converter_tests.yaml b/.github/workflows/converter_tests.yaml index 359edf8b0d9e..1d8c0ee963b8 100644 --- a/.github/workflows/converter_tests.yaml +++ b/.github/workflows/converter_tests.yaml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.7'] + python-version: ['3.8'] steps: - if: github.event_name == 'schedule' run: | diff --git a/.github/workflows/cwl_conformance.yaml b/.github/workflows/cwl_conformance.yaml index 716a8ca2bbbd..206bd33798a1 100644 --- a/.github/workflows/cwl_conformance.yaml +++ b/.github/workflows/cwl_conformance.yaml @@ -22,7 +22,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.7'] + python-version: ['3.8'] marker: ['green', 'red and required', 'red and not required'] conformance-version: ['cwl_conformance_v1_0'] #, 'cwl_conformance_v1_1', 'cwl_conformance_v1_2'] services: diff --git a/.github/workflows/db_indexes.yaml b/.github/workflows/db_indexes.yaml index af8455edd887..88f1d02297af 100644 --- a/.github/workflows/db_indexes.yaml +++ b/.github/workflows/db_indexes.yaml @@ -24,11 +24,11 @@ jobs: matrix: db: ['postgresql', 'sqlite'] postgresql-version: ['13'] - python-version: ['3.7'] + python-version: ['3.8'] include: - db: postgresql postgresql-version: '9.6' - python-version: '3.7' + python-version: '3.8' services: postgres: image: postgres:${{ matrix.postgresql-version }} diff --git a/.github/workflows/dependencies.yaml b/.github/workflows/dependencies.yaml index 0d02ae2f1234..31405cc13498 100644 --- a/.github/workflows/dependencies.yaml +++ b/.github/workflows/dependencies.yaml @@ -9,17 +9,12 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.7'] + python-version: ['3.8'] steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: - # poetry requires Python >=3.8, but lint requirements currently need - # to be generated with `pip freeze`` on the oldest Python version - # supported by Galaxy. - python-version: | - ${{ matrix.python-version }} - 3.8 + python-version: ${{ matrix.python-version }} - name: Update dependencies run: | python -m venv .venv diff --git a/.github/workflows/deployment.yaml b/.github/workflows/deployment.yaml index 441f35e71673..082e93d9328d 100644 --- a/.github/workflows/deployment.yaml +++ b/.github/workflows/deployment.yaml @@ -33,7 +33,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.7'] + python-version: ['3.8'] steps: - uses: actions/checkout@v3 with: diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 6de9bf997964..9f67f3322488 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.7'] + python-version: ['3.8'] steps: - name: Get target branch name (push) if: github.event_name == 'push' diff --git a/.github/workflows/first_startup.yaml b/.github/workflows/first_startup.yaml index 34093cae9605..10f506dbbedf 100644 --- a/.github/workflows/first_startup.yaml +++ b/.github/workflows/first_startup.yaml @@ -21,7 +21,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.7', '3.11'] + python-version: ['3.8', '3.11'] defaults: run: shell: bash -l {0} diff --git a/.github/workflows/framework.yaml b/.github/workflows/framework.yaml index 5de51cca7cad..53a287c5d7c0 100644 --- a/.github/workflows/framework.yaml +++ b/.github/workflows/framework.yaml @@ -25,7 +25,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.7'] + python-version: ['3.8'] services: postgres: image: postgres:13 diff --git a/.github/workflows/integration.yaml b/.github/workflows/integration.yaml index d3660517fb72..58aa81dd63c3 100644 --- a/.github/workflows/integration.yaml +++ b/.github/workflows/integration.yaml @@ -29,7 +29,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.7'] + python-version: ['3.8'] chunk: ['0', '1', '2', '3'] services: postgres: diff --git a/.github/workflows/integration_selenium.yaml b/.github/workflows/integration_selenium.yaml index e8cf74fb5639..427a41ec1559 100644 --- a/.github/workflows/integration_selenium.yaml +++ b/.github/workflows/integration_selenium.yaml @@ -29,7 +29,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.7'] + python-version: ['3.8'] services: postgres: image: postgres:13 diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 590f93cd5e2c..037f343d9ee9 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -22,7 +22,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.7', '3.11'] + python-version: ['3.8', '3.11'] env: LINT_PATH: 'lib/galaxy/dependencies/pinned-lint-requirements.txt' TYPE_PATH: 'lib/galaxy/dependencies/pinned-typecheck-requirements.txt' diff --git a/.github/workflows/lint_openapi_schema.yml b/.github/workflows/lint_openapi_schema.yml index 32ddedf5cd7d..c327fabe72e8 100644 --- a/.github/workflows/lint_openapi_schema.yml +++ b/.github/workflows/lint_openapi_schema.yml @@ -20,7 +20,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.7', '3.11'] + python-version: ['3.8', '3.11'] steps: - uses: actions/checkout@v3 with: diff --git a/.github/workflows/mulled.yaml b/.github/workflows/mulled.yaml index a9e84ef28a5e..1b140eb1f6c3 100644 --- a/.github/workflows/mulled.yaml +++ b/.github/workflows/mulled.yaml @@ -20,7 +20,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.7'] + python-version: ['3.8'] steps: - uses: actions/checkout@v3 with: diff --git a/.github/workflows/osx_startup.yaml b/.github/workflows/osx_startup.yaml index 0015076712b6..d550c6741678 100644 --- a/.github/workflows/osx_startup.yaml +++ b/.github/workflows/osx_startup.yaml @@ -18,7 +18,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.7', '3.11'] + python-version: ['3.8', '3.11'] defaults: run: shell: bash -l {0} diff --git a/.github/workflows/performance.yaml b/.github/workflows/performance.yaml index 4eda60399585..48287a739f8c 100644 --- a/.github/workflows/performance.yaml +++ b/.github/workflows/performance.yaml @@ -24,7 +24,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.7'] + python-version: ['3.8'] services: postgres: image: postgres:13 diff --git a/.github/workflows/publish_artifacts.yaml b/.github/workflows/publish_artifacts.yaml index fd4d736f1b34..3703d932c0cc 100644 --- a/.github/workflows/publish_artifacts.yaml +++ b/.github/workflows/publish_artifacts.yaml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.7'] + python-version: ['3.8'] steps: - uses: actions/setup-python@v4 with: diff --git a/.github/workflows/reports_startup.yaml b/.github/workflows/reports_startup.yaml index 805686e3d388..5597489d3726 100644 --- a/.github/workflows/reports_startup.yaml +++ b/.github/workflows/reports_startup.yaml @@ -18,7 +18,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.7', '3.11'] + python-version: ['3.8', '3.11'] defaults: run: shell: bash -l {0} diff --git a/.github/workflows/selenium.yaml b/.github/workflows/selenium.yaml index 11cf1886fc2b..b8235cb7869f 100644 --- a/.github/workflows/selenium.yaml +++ b/.github/workflows/selenium.yaml @@ -30,7 +30,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.7'] + python-version: ['3.8'] chunk: [0, 1, 2] services: postgres: diff --git a/.github/workflows/test_galaxy_packages.yaml b/.github/workflows/test_galaxy_packages.yaml index 089d4f45f19e..f2e5d88b52a7 100644 --- a/.github/workflows/test_galaxy_packages.yaml +++ b/.github/workflows/test_galaxy_packages.yaml @@ -18,7 +18,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.7', '3.11'] + python-version: ['3.8', '3.11'] steps: - uses: actions/checkout@v3 with: diff --git a/.github/workflows/test_galaxy_packages_for_pulsar.yaml b/.github/workflows/test_galaxy_packages_for_pulsar.yaml index 7f5f5499bc4c..2a8e39cadbce 100644 --- a/.github/workflows/test_galaxy_packages_for_pulsar.yaml +++ b/.github/workflows/test_galaxy_packages_for_pulsar.yaml @@ -20,7 +20,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.7'] + python-version: ['3.7'] # don't upgrade, see https://github.com/galaxyproject/galaxy/pull/16649 steps: - uses: actions/checkout@v3 with: diff --git a/.github/workflows/toolshed.yaml b/.github/workflows/toolshed.yaml index 4e3a2b2cac8c..95db16b404ac 100644 --- a/.github/workflows/toolshed.yaml +++ b/.github/workflows/toolshed.yaml @@ -21,7 +21,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.7', '3.11'] + python-version: ['3.8', '3.11'] shed-api: ['v1', 'v2'] test-install-client: ['galaxy_api', 'standalone'] services: diff --git a/.github/workflows/unit-postgres.yaml b/.github/workflows/unit-postgres.yaml index 6e695fd64082..f2c57b6228d4 100644 --- a/.github/workflows/unit-postgres.yaml +++ b/.github/workflows/unit-postgres.yaml @@ -22,7 +22,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.7'] + python-version: ['3.8'] services: postgres: image: postgres:13 diff --git a/.github/workflows/unit.yaml b/.github/workflows/unit.yaml index 8ade16541a1f..9c32eae057d6 100644 --- a/.github/workflows/unit.yaml +++ b/.github/workflows/unit.yaml @@ -20,7 +20,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.7', '3.11'] + python-version: ['3.8', '3.11'] steps: - uses: actions/checkout@v3 with: diff --git a/README.rst b/README.rst index 34d382dc68bb..17e11d9ff098 100644 --- a/README.rst +++ b/README.rst @@ -24,12 +24,12 @@ Community support is available at `Galaxy Help Galaxy Quickstart ================= -Galaxy requires Python 3.7 . To check your Python version, run: +Galaxy requires Python 3.8 . To check your Python version, run: .. code:: console $ python -V - Python 3.7.6 + Python 3.8.18 Start Galaxy: diff --git a/doc/source/admin/python.md b/doc/source/admin/python.md index 23870548c8e3..015f85e08a10 100644 --- a/doc/source/admin/python.md +++ b/doc/source/admin/python.md @@ -1,6 +1,6 @@ # Supported Python versions -Galaxy's core functionality is currently supported on Python **>=3.7** . +Galaxy's core functionality is currently supported on Python **>=3.8** . If Galaxy complains about the version of Python you are using: diff --git a/doc/source/dev/debugging_tests.md b/doc/source/dev/debugging_tests.md index 231747572be7..6bda2d5c92f8 100644 --- a/doc/source/dev/debugging_tests.md +++ b/doc/source/dev/debugging_tests.md @@ -52,7 +52,7 @@ index 6647588dfb..c8d82957a1 100644 @@ -14,7 +14,7 @@ jobs: fail-fast: false matrix: - python-version: ['3.7'] + python-version: ['3.8'] - subset: ['upload_datatype', 'extended_metadata', 'kubernetes', 'not (upload_datatype or extended_metadata or kubernetes)'] + subset: ['not (upload_datatype or extended_metadata or kubernetes)'] services: diff --git a/lib/galaxy/app_unittest_utils/tools_support.py b/lib/galaxy/app_unittest_utils/tools_support.py index 77c759499d75..6c94d5eb59da 100644 --- a/lib/galaxy/app_unittest_utils/tools_support.py +++ b/lib/galaxy/app_unittest_utils/tools_support.py @@ -123,7 +123,7 @@ class MockContext: def __init__(self, model_objects=None): self.expunged_all = False self.flushed = False - self.model_objects = model_objects or defaultdict(lambda: {}) + self.model_objects = model_objects or defaultdict(dict) self.created_objects = [] self.current = self diff --git a/lib/galaxy/celery/tasks.py b/lib/galaxy/celery/tasks.py index b94cc8f832b4..828e692ba0a2 100644 --- a/lib/galaxy/celery/tasks.py +++ b/lib/galaxy/celery/tasks.py @@ -68,12 +68,12 @@ log = get_logger(__name__) -@lru_cache() +@lru_cache def setup_data_table_manager(app): app._configure_tool_data_tables(from_shed_config=False) -@lru_cache() +@lru_cache def cached_create_tool_from_representation(app, raw_tool_source): return create_tool_from_representation( app=app, raw_tool_source=raw_tool_source, tool_dir="", tool_source_class="XmlToolSource" diff --git a/lib/galaxy/datatypes/text.py b/lib/galaxy/datatypes/text.py index 91ea44cd3b3a..e7670856665b 100644 --- a/lib/galaxy/datatypes/text.py +++ b/lib/galaxy/datatypes/text.py @@ -6,6 +6,7 @@ import logging import os import re +import shlex import subprocess import tempfile from typing import ( @@ -38,7 +39,6 @@ ) from galaxy.util import ( nice_size, - shlex_join, string_as_bool, unicodify, ) @@ -242,7 +242,7 @@ def _display_data_trusted( ofilename = dataset.get_file_name() log.exception( 'Command "%s" failed. Could not convert the Jupyter Notebook to HTML, defaulting to plain text.', - shlex_join(cmd), + shlex.join(cmd), ) return open(ofilename, mode="rb"), headers diff --git a/lib/galaxy/datatypes/util/maf_utilities.py b/lib/galaxy/datatypes/util/maf_utilities.py index bbfdf7967f51..52c18931c3c9 100644 --- a/lib/galaxy/datatypes/util/maf_utilities.py +++ b/lib/galaxy/datatypes/util/maf_utilities.py @@ -658,9 +658,6 @@ def get_starts_ends_fields_from_gene_bed(line): if len(fields) < 12: raise Exception(f"Not a proper 12 column BED line ({line}).") tx_start = int(fields[1]) - strand = fields[5] - if strand != "-": - strand = "+" # Default strand is + cds_start = int(fields[6]) cds_end = int(fields[7]) diff --git a/lib/galaxy/dependencies/update.sh b/lib/galaxy/dependencies/update.sh index 7771ea30791e..01708a54cfe4 100755 --- a/lib/galaxy/dependencies/update.sh +++ b/lib/galaxy/dependencies/update.sh @@ -6,7 +6,7 @@ set -e -SUPPORTED_PYTHON_VERSIONS="3.7 3.8 3.9 3.10 3.11" +SUPPORTED_PYTHON_VERSIONS="3.8 3.9 3.10 3.11" NOT_SUPPORTED_NEXT_PYTHON_VERSION="3.12" this_directory="$(cd "$(dirname "$0")" > /dev/null && pwd)" diff --git a/lib/galaxy/dependencies/update_lint_requirements.sh b/lib/galaxy/dependencies/update_lint_requirements.sh index 6f06089aabf8..0225d931d11d 100755 --- a/lib/galaxy/dependencies/update_lint_requirements.sh +++ b/lib/galaxy/dependencies/update_lint_requirements.sh @@ -11,7 +11,7 @@ THIS_DIRECTORY="$(cd "$(dirname "$0")" > /dev/null && pwd)" update_pinned_reqs() { VENV=$(mktemp -d "${TMPDIR:-/tmp}/$1_venv.XXXXXXXXXX") - python3.7 -m venv "${VENV}" + python3.8 -m venv "${VENV}" . "${VENV}/bin/activate" pip install --upgrade pip setuptools pip install -r "${THIS_DIRECTORY}/$1-requirements.txt" diff --git a/lib/galaxy/managers/notification.py b/lib/galaxy/managers/notification.py index 0db48f7bfb3e..b0da5b1b9d8e 100644 --- a/lib/galaxy/managers/notification.py +++ b/lib/galaxy/managers/notification.py @@ -409,7 +409,7 @@ def resolve_users(self, recipients: NotificationRecipients) -> List[User]: user_ids_from_roles_stmt = self._get_all_user_ids_from_roles_query(all_role_ids) union_stmt = union(user_ids_from_groups_stmt, user_ids_from_roles_stmt) - user_ids_from_groups_and_roles = set([id for id, in self.sa_session.execute(union_stmt)]) + user_ids_from_groups_and_roles = {id for id, in self.sa_session.execute(union_stmt)} unique_user_ids.update(user_ids_from_groups_and_roles) stmt = select(User).where(User.id.in_(unique_user_ids)) @@ -448,7 +448,7 @@ def _expand_group_and_roles_ids(self, group_ids: Set[int], role_ids: Set[int]) - .where(GroupRoleAssociation.role_id.in_(role_ids)) .distinct() ) - group_ids_from_roles = set([id for id, in self.sa_session.execute(stmt) if id is not None]) + group_ids_from_roles = {id for id, in self.sa_session.execute(stmt) if id is not None} new_group_ids = group_ids_from_roles - processed_group_ids # Get role IDs associated with any of the given group IDs @@ -458,7 +458,7 @@ def _expand_group_and_roles_ids(self, group_ids: Set[int], role_ids: Set[int]) - .where(GroupRoleAssociation.group_id.in_(group_ids)) .distinct() ) - role_ids_from_groups = set([id for id, in self.sa_session.execute(stmt) if id is not None]) + role_ids_from_groups = {id for id, in self.sa_session.execute(stmt) if id is not None} new_role_ids = role_ids_from_groups - processed_role_ids # Stop if there are no new group or role IDs to process diff --git a/lib/galaxy/tool_util/deps/conda_util.py b/lib/galaxy/tool_util/deps/conda_util.py index f91203923cd2..3c15a8800b97 100644 --- a/lib/galaxy/tool_util/deps/conda_util.py +++ b/lib/galaxy/tool_util/deps/conda_util.py @@ -5,6 +5,7 @@ import os import platform import re +import shlex import shutil import sys import tempfile @@ -28,7 +29,6 @@ commands, download_to_file, listify, - shlex_join, smart_str, which, ) @@ -253,7 +253,7 @@ def exec_command(self, operation: str, args: List[str], stdout_path: Optional[st env = {} if self.condarc_override: env["CONDARC"] = self.condarc_override - cmd_string = shlex_join(cmd) + cmd_string = shlex.join(cmd) kwds = dict() try: if stdout_path: diff --git a/lib/galaxy/tool_util/deps/mulled/mulled_build.py b/lib/galaxy/tool_util/deps/mulled/mulled_build.py index d2f6e0dc0090..839e9e3d8f0a 100644 --- a/lib/galaxy/tool_util/deps/mulled/mulled_build.py +++ b/lib/galaxy/tool_util/deps/mulled/mulled_build.py @@ -12,6 +12,7 @@ import json import logging import os +import shlex import shutil import stat import string @@ -38,7 +39,6 @@ commands, download_to_file, safe_makedirs, - shlex_join, unicodify, ) from ._cli import arg_parser @@ -335,7 +335,7 @@ def mull_targets( involucro_args.insert(6, "-set") involucro_args.insert(7, f"TEST_BINDS={','.join(test_bind)}") cmd = involucro_context.build_command(involucro_args) - print(f"Executing: {shlex_join(cmd)}") + print(f"Executing: {shlex.join(cmd)}") if dry_run: return 0 ensure_installed(involucro_context, True) diff --git a/lib/galaxy/tools/imp_exp/export_history.py b/lib/galaxy/tools/imp_exp/export_history.py index 4127d11770bb..340c19a203d4 100644 --- a/lib/galaxy/tools/imp_exp/export_history.py +++ b/lib/galaxy/tools/imp_exp/export_history.py @@ -40,9 +40,6 @@ def main(argv=None): ) parser.add_option("--file-sources", type=str, help="file sources json") (options, args) = parser.parse_args(argv) - galaxy_version = options.galaxy_version - if galaxy_version is None: - galaxy_version = "19.05" gzip = bool(options.gzip) assert len(args) >= 2 diff --git a/lib/galaxy/util/__init__.py b/lib/galaxy/util/__init__.py index 2db3e454bb22..0f028eb90b1f 100644 --- a/lib/galaxy/util/__init__.py +++ b/lib/galaxy/util/__init__.py @@ -13,7 +13,6 @@ import os import random import re -import shlex import shutil import smtplib import stat @@ -96,14 +95,6 @@ def __new__(cls, element=None, file=None) -> etree.ElementTree: ) from .rst_to_html import rst_to_html # noqa: F401 -try: - shlex_join = shlex.join # type: ignore[attr-defined] -except AttributeError: - # Python < 3.8 - def shlex_join(split_command): - return " ".join(map(shlex.quote, split_command)) - - inflector = Inflector() log = get_logger(__name__) diff --git a/lib/galaxy/util/path/__init__.py b/lib/galaxy/util/path/__init__.py index a82d6619a0a3..744fed27dc65 100644 --- a/lib/galaxy/util/path/__init__.py +++ b/lib/galaxy/util/path/__init__.py @@ -388,7 +388,7 @@ def external_chown(path, pwent, external_chown_script, description="file"): cmd = shlex.split(external_chown_script) cmd.extend([path, pwent[0], str(pwent[3])]) - log.debug(f"Changing ownership of {path} with: '{galaxy.util.shlex_join(cmd)}'") + log.debug(f"Changing ownership of {path} with: '{shlex.join(cmd)}'") galaxy.util.commands.execute(cmd) return True except galaxy.util.commands.CommandLineException as e: diff --git a/lib/galaxy/webapps/galaxy/services/notifications.py b/lib/galaxy/webapps/galaxy/services/notifications.py index 6ca78fafb568..12c86a218046 100644 --- a/lib/galaxy/webapps/galaxy/services/notifications.py +++ b/lib/galaxy/webapps/galaxy/services/notifications.py @@ -134,7 +134,7 @@ def update_user_notification( ): """Updates a single notification received by the user with the requested values.""" self.notification_manager.ensure_notifications_enabled() - updated_response = self.update_user_notifications(user_context, set([notification_id]), request) + updated_response = self.update_user_notifications(user_context, {notification_id}, request) if not updated_response.updated_count: self._raise_notification_not_found(notification_id) diff --git a/packages/app/setup.cfg b/packages/app/setup.cfg index c8cc845deed1..d9b9de4708cf 100644 --- a/packages/app/setup.cfg +++ b/packages/app/setup.cfg @@ -9,7 +9,6 @@ classifiers = Natural Language :: English Operating System :: POSIX Programming Language :: Python :: 3 - Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 @@ -77,7 +76,7 @@ install_requires = WebOb Whoosh packages = find: -python_requires = >=3.7 +python_requires = >=3.8 [options.entry_points] console_scripts = diff --git a/packages/auth/setup.cfg b/packages/auth/setup.cfg index cca3a9b7ad7c..5dfbe3c629e2 100644 --- a/packages/auth/setup.cfg +++ b/packages/auth/setup.cfg @@ -9,7 +9,6 @@ classifiers = Natural Language :: English Operating System :: POSIX Programming Language :: Python :: 3 - Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 @@ -35,8 +34,8 @@ install_requires = galaxy-data galaxy-util packages = find: -python_requires = >=3.7 +python_requires = >=3.8 [options.packages.find] exclude = - tests* \ No newline at end of file + tests* diff --git a/packages/config/setup.cfg b/packages/config/setup.cfg index 16d2815d2a2e..a4bbe8efb729 100644 --- a/packages/config/setup.cfg +++ b/packages/config/setup.cfg @@ -9,7 +9,6 @@ classifiers = Natural Language :: English Operating System :: POSIX Programming Language :: Python :: 3 - Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 @@ -38,7 +37,7 @@ install_requires = pykwalify PyYAML packages = find: -python_requires = >=3.7 +python_requires = >=3.8 [options.entry_points] console_scripts = @@ -46,4 +45,4 @@ console_scripts = [options.packages.find] exclude = - tests* \ No newline at end of file + tests* diff --git a/packages/data/setup.cfg b/packages/data/setup.cfg index 02f74386b9d5..b3374574ed65 100644 --- a/packages/data/setup.cfg +++ b/packages/data/setup.cfg @@ -9,7 +9,6 @@ classifiers = Natural Language :: English Operating System :: POSIX Programming Language :: Python :: 3 - Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 @@ -61,7 +60,7 @@ install_requires = typing-extensions WebOb packages = find: -python_requires = >=3.7 +python_requires = >=3.8 [options.entry_points] console_scripts = diff --git a/packages/files/setup.cfg b/packages/files/setup.cfg index 9f89c257b476..3f7f01acaf1b 100644 --- a/packages/files/setup.cfg +++ b/packages/files/setup.cfg @@ -9,7 +9,6 @@ classifiers = Natural Language :: English Operating System :: POSIX Programming Language :: Python :: 3 - Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 @@ -36,7 +35,7 @@ install_requires = fs typing-extensions packages = find: -python_requires = >=3.7 +python_requires = >=3.8 [options.packages.find] exclude = diff --git a/packages/job_execution/setup.cfg b/packages/job_execution/setup.cfg index ea1943235b8a..1d77581d51ff 100644 --- a/packages/job_execution/setup.cfg +++ b/packages/job_execution/setup.cfg @@ -9,7 +9,6 @@ classifiers = Natural Language :: English Operating System :: POSIX Programming Language :: Python :: 3 - Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 @@ -40,7 +39,7 @@ install_requires = MarkupSafe SQLAlchemy>=1.4.25,<2 packages = find: -python_requires = >=3.7 +python_requires = >=3.8 [options.entry_points] console_scripts = @@ -49,4 +48,4 @@ console_scripts = [options.packages.find] exclude = - tests* \ No newline at end of file + tests* diff --git a/packages/job_metrics/setup.cfg b/packages/job_metrics/setup.cfg index d9576a25c86d..80b93417f476 100644 --- a/packages/job_metrics/setup.cfg +++ b/packages/job_metrics/setup.cfg @@ -9,7 +9,6 @@ classifiers = Natural Language :: English Operating System :: POSIX Programming Language :: Python :: 3 - Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 @@ -34,8 +33,8 @@ include_package_data = True install_requires = galaxy-util packages = find: -python_requires = >=3.7 +python_requires = >=3.8 [options.packages.find] exclude = - tests* \ No newline at end of file + tests* diff --git a/packages/meta/setup.cfg b/packages/meta/setup.cfg index 516107f5088d..e3d3a152e651 100644 --- a/packages/meta/setup.cfg +++ b/packages/meta/setup.cfg @@ -10,7 +10,6 @@ classifiers = Natural Language :: English Operating System :: POSIX Programming Language :: Python :: 3 - Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 @@ -34,7 +33,7 @@ version = 22.5.0.dev0 [options] include_package_data = True packages = find: -python_requires = >=3.7 +python_requires = >=3.8 [options.extras_require] postgresql = diff --git a/packages/navigation/setup.cfg b/packages/navigation/setup.cfg index 3b16102ad68c..7b346eaa30cb 100644 --- a/packages/navigation/setup.cfg +++ b/packages/navigation/setup.cfg @@ -9,7 +9,6 @@ classifiers = Natural Language :: English Operating System :: POSIX Programming Language :: Python :: 3 - Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 @@ -35,8 +34,8 @@ install_requires = galaxy-util PyYAML packages = find: -python_requires = >=3.7 +python_requires = >=3.8 [options.packages.find] exclude = - tests* \ No newline at end of file + tests* diff --git a/packages/objectstore/setup.cfg b/packages/objectstore/setup.cfg index 69fc1352966c..325319980b0f 100644 --- a/packages/objectstore/setup.cfg +++ b/packages/objectstore/setup.cfg @@ -9,7 +9,6 @@ classifiers = Natural Language :: English Operating System :: POSIX Programming Language :: Python :: 3 - Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 @@ -36,8 +35,8 @@ install_requires = pydantic<2 PyYAML packages = find: -python_requires = >=3.7 +python_requires = >=3.8 [options.packages.find] exclude = - tests* \ No newline at end of file + tests* diff --git a/packages/schema/setup.cfg b/packages/schema/setup.cfg index 507f563909ea..8c9e16c46a7f 100644 --- a/packages/schema/setup.cfg +++ b/packages/schema/setup.cfg @@ -9,7 +9,6 @@ classifiers = Natural Language :: English Operating System :: POSIX Programming Language :: Python :: 3 - Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 @@ -34,7 +33,7 @@ install_requires = galaxy-util pydantic[email] packages = find: -python_requires = >=3.7 +python_requires = >=3.8 [options.packages.find] exclude = diff --git a/packages/selenium/setup.cfg b/packages/selenium/setup.cfg index a95b3a449dfa..338943d2013e 100644 --- a/packages/selenium/setup.cfg +++ b/packages/selenium/setup.cfg @@ -9,7 +9,6 @@ classifiers = Natural Language :: English Operating System :: POSIX Programming Language :: Python :: 3 - Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 @@ -39,7 +38,7 @@ install_requires = requests selenium!=4.11.0,!=4.11.1,!=4.11.2 packages = find: -python_requires = >=3.7 +python_requires = >=3.8 [options.entry_points] console_scripts = @@ -47,4 +46,4 @@ console_scripts = [options.packages.find] exclude = - tests* \ No newline at end of file + tests* diff --git a/packages/test_api/setup.cfg b/packages/test_api/setup.cfg index 2a09121053d3..a759e952956e 100644 --- a/packages/test_api/setup.cfg +++ b/packages/test_api/setup.cfg @@ -9,7 +9,6 @@ classifiers = Natural Language :: English Operating System :: POSIX Programming Language :: Python :: 3 - Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 @@ -38,7 +37,7 @@ install_requires = requests tuspy packages = find: -python_requires = >=3.7 +python_requires = >=3.8 [options.extras_require] driver = @@ -46,4 +45,4 @@ driver = [options.packages.find] exclude = - tests* \ No newline at end of file + tests* diff --git a/packages/test_base/setup.cfg b/packages/test_base/setup.cfg index a1eec0ef392e..17c957eec67a 100644 --- a/packages/test_base/setup.cfg +++ b/packages/test_base/setup.cfg @@ -9,7 +9,6 @@ classifiers = Natural Language :: English Operating System :: POSIX Programming Language :: Python :: 3 - Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 @@ -41,8 +40,8 @@ install_requires = PyYAML requests packages = find: -python_requires = >=3.7 +python_requires = >=3.8 [options.packages.find] exclude = - tests* \ No newline at end of file + tests* diff --git a/packages/test_driver/setup.cfg b/packages/test_driver/setup.cfg index cd64afd37a8c..9268dd3eb584 100644 --- a/packages/test_driver/setup.cfg +++ b/packages/test_driver/setup.cfg @@ -9,7 +9,6 @@ classifiers = Natural Language :: English Operating System :: POSIX Programming Language :: Python :: 3 - Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 @@ -43,8 +42,8 @@ install_requires = graphene-sqlalchemy==3.0.0b3 # these are only needed by tool shed - which we've split out but the test driver loads starlette-graphene3 packages = find: -python_requires = >=3.7 +python_requires = >=3.8 [options.packages.find] exclude = - tests* \ No newline at end of file + tests* diff --git a/packages/test_selenium/setup.cfg b/packages/test_selenium/setup.cfg index dca41568d040..177fbc9ba8ad 100644 --- a/packages/test_selenium/setup.cfg +++ b/packages/test_selenium/setup.cfg @@ -9,7 +9,6 @@ classifiers = Natural Language :: English Operating System :: POSIX Programming Language :: Python :: 3 - Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 @@ -43,7 +42,7 @@ install_requires = requests selenium!=4.11.0,!=4.11.1,!=4.11.2 packages = find: -python_requires = >=3.7 +python_requires = >=3.8 [options.extras_require] driver = diff --git a/packages/tool_shed/setup.cfg b/packages/tool_shed/setup.cfg index 50b32d282a99..41d9897244a1 100644 --- a/packages/tool_shed/setup.cfg +++ b/packages/tool_shed/setup.cfg @@ -9,7 +9,6 @@ classifiers = Natural Language :: English Operating System :: POSIX Programming Language :: Python :: 3 - Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 @@ -34,7 +33,7 @@ install_requires = galaxy-web-stack galaxy-web-apps packages = find: -python_requires = >=3.7 +python_requires = >=3.8 [options.packages.find] exclude = diff --git a/packages/tool_util/setup.cfg b/packages/tool_util/setup.cfg index 817bd9080842..1473adc48bbc 100644 --- a/packages/tool_util/setup.cfg +++ b/packages/tool_util/setup.cfg @@ -9,7 +9,6 @@ classifiers = Natural Language :: English Operating System :: POSIX Programming Language :: Python :: 3 - Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 @@ -43,7 +42,7 @@ install_requires = sortedcontainers typing-extensions packages = find: -python_requires = >=3.7 +python_requires = >=3.8 [options.entry_points] console_scripts = diff --git a/packages/tours/setup.cfg b/packages/tours/setup.cfg index 1186d0ad6ccf..999022f00af8 100644 --- a/packages/tours/setup.cfg +++ b/packages/tours/setup.cfg @@ -9,7 +9,6 @@ classifiers = Natural Language :: English Operating System :: POSIX Programming Language :: Python :: 3 - Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 @@ -36,7 +35,7 @@ install_requires = pydantic<2 PyYAML packages = find: -python_requires = >=3.7 +python_requires = >=3.8 [options.entry_points] console_scripts = diff --git a/packages/util/setup.cfg b/packages/util/setup.cfg index 03afa41b853b..c634f3537459 100644 --- a/packages/util/setup.cfg +++ b/packages/util/setup.cfg @@ -9,7 +9,6 @@ classifiers = Natural Language :: English Operating System :: POSIX Programming Language :: Python :: 3 - Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 @@ -44,7 +43,7 @@ install_requires = typing-extensions zipstream-new packages = find: -python_requires = >=3.7 +python_requires = >=3.8 [options.extras_require] jstree = diff --git a/packages/web_apps/setup.cfg b/packages/web_apps/setup.cfg index 17de386f4c12..398354b177d1 100644 --- a/packages/web_apps/setup.cfg +++ b/packages/web_apps/setup.cfg @@ -9,7 +9,6 @@ classifiers = Natural Language :: English Operating System :: POSIX Programming Language :: Python :: 3 - Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 @@ -70,7 +69,7 @@ install_requires = WebOb Whoosh packages = find: -python_requires = >=3.7 +python_requires = >=3.8 [options.packages.find] exclude = diff --git a/packages/web_framework/setup.cfg b/packages/web_framework/setup.cfg index 99cce6a9e4c7..adceeced72ed 100644 --- a/packages/web_framework/setup.cfg +++ b/packages/web_framework/setup.cfg @@ -9,7 +9,6 @@ classifiers = Natural Language :: English Operating System :: POSIX Programming Language :: Python :: 3 - Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 @@ -44,7 +43,7 @@ install_requires = WebOb packages = find: -python_requires = >=3.7 +python_requires = >=3.8 [options.packages.find] exclude = diff --git a/packages/web_stack/setup.cfg b/packages/web_stack/setup.cfg index 9d9e2022c398..6c1ff8aaee98 100644 --- a/packages/web_stack/setup.cfg +++ b/packages/web_stack/setup.cfg @@ -9,7 +9,6 @@ classifiers = Natural Language :: English Operating System :: POSIX Programming Language :: Python :: 3 - Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 @@ -36,8 +35,8 @@ install_requires = galaxy-util SQLAlchemy>=1.4.25,<2 packages = find: -python_requires = >=3.7 +python_requires = >=3.8 [options.packages.find] exclude = - tests* \ No newline at end of file + tests* diff --git a/pyproject.toml b/pyproject.toml index ec98c6f49ef2..fe4a78b1a751 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.black] line-length = 120 -target-version = ['py37'] +target-version = ['py38'] include = '\.pyi?$' extend-exclude = ''' ^/( @@ -50,7 +50,7 @@ Cheetah3 = "!=3.2.6.post2" # yanked release, https://github.com/python-poetry/p cloudauthz = "==0.6.0" cloudbridge = "*" circus = "*" -cwltool = "==3.1.20221109155812" +cwltool = ">=3.1.20221109155812" # TODO: pin to a newer working version conda-package-streaming = "*" dictobj = "*" dnspython = "*" @@ -93,9 +93,9 @@ pydantic = {version = "<2", extras = ["email"]} PyJWT = "*" pykwalify = "*" pylibmagic = "*" -pyparsing = "<3.1" # Needed by matplotlib on Python >=3.8 https://github.com/matplotlib/matplotlib/issues/26152 +pyparsing = "*" pysam = ">=0.21" # for Python 3.11 support on macOS -python = ">=3.7,<3.12" # Keep maximum version strict to appease numpy and scipy +python = ">=3.8,<3.12" # Keep maximum version strict to appease numpy and scipy python-dateutil = "*" python-magic = "*" python-multipart = "*" # required to support form parsing in FastAPI/Starlette @@ -155,6 +155,7 @@ pytest-postgresql = "!=3.0.0" # https://github.com/ClearcodeHQ/pytest-postgresq pytest-shard = "*" responses = "*" selenium = "*" +urllib3 = "<2" # Necessary for poetry for resolve deps for Python 3.8+ seletools = "*" Sphinx = ">=4.0" # support docutils 0.17 sphinx-rtd-theme = ">=1.0.0,<2" # https://github.com/python-poetry/poetry/issues/8194 @@ -184,7 +185,7 @@ types-six = "*" # Enable: pycodestyle errors (E), Pyflakes (F), flake8-bugbear (B), # flake8-logging-format (G) and pyupgrade (UP) select = ["E", "F", "B", "G", "UP"] -target-version = "py37" +target-version = "py38" # Exceptions: # B008 Do not perform function calls in argument defaults (for FastAPI Depends and Body) # B9 flake8-bugbear opinionated warnings diff --git a/scripts/check_python.py b/scripts/check_python.py index 99fd1c9fcbe8..62a8cfbfa59e 100644 --- a/scripts/check_python.py +++ b/scripts/check_python.py @@ -7,7 +7,7 @@ def check_python(): - if sys.version_info[:2] >= (3, 7): # noqa: UP036 + if sys.version_info[:2] >= (3, 8): # noqa: UP036 # supported return else: @@ -15,7 +15,7 @@ def check_python(): msg = ( """\ ERROR: Your Python version is: %s -Galaxy is currently supported on Python >=3.7 . +Galaxy is currently supported on Python >=3.8 . To run Galaxy, please install a supported Python version. If a supported version is already installed but is not your default, https://docs.galaxyproject.org/en/latest/admin/python.html contains instructions diff --git a/scripts/common_startup.sh b/scripts/common_startup.sh index 720f64a79110..e1fa46fdbac6 100755 --- a/scripts/common_startup.sh +++ b/scripts/common_startup.sh @@ -14,7 +14,7 @@ SKIP_NODE=${GALAXY_SKIP_NODE:-0} INSTALL_PREBUILT_CLIENT=${GALAXY_INSTALL_PREBUILT_CLIENT:-0} NODE_VERSION=${GALAXY_NODE_VERSION:-"$(cat client/.node_version)"} : "${YARN_INSTALL_OPTS:=--network-timeout 300000 --check-files}" -: "${GALAXY_CONDA_PYTHON_VERSION:=3.7}" +: "${GALAXY_CONDA_PYTHON_VERSION:=3.8}" for arg in "$@"; do if [ "$arg" = "--skip-venv" ]; then @@ -41,7 +41,7 @@ RMFILES=" lib/pkg_resources.pyc " -MIN_PYTHON_VERSION=3.7 +MIN_PYTHON_VERSION=3.8 MIN_PIP_VERSION=20.3 # return true if $1 is in $2 else false diff --git a/test/integration/test_celery_user_rate_limit.py b/test/integration/test_celery_user_rate_limit.py index 5d58d02f9025..ac69062dfda1 100644 --- a/test/integration/test_celery_user_rate_limit.py +++ b/test/integration/test_celery_user_rate_limit.py @@ -24,7 +24,7 @@ def mock_user_id_task(task_user_id: int): return task_user_id -@lru_cache() +@lru_cache def sqlite_url(): path = tempfile.NamedTemporaryFile().name dburl = f"sqlite:///{path}" @@ -32,7 +32,7 @@ def sqlite_url(): return dburl -@lru_cache() +@lru_cache def setup_users(dburl: str, num_users: int = 2): """ Setup test users in galaxy_user table with user id's starting from 2. diff --git a/test/integration/test_kubernetes_runner.py b/test/integration/test_kubernetes_runner.py index 62a353693ea5..728d2a4fbfdd 100644 --- a/test/integration/test_kubernetes_runner.py +++ b/test/integration/test_kubernetes_runner.py @@ -4,6 +4,7 @@ import collections import json import os +import shlex import string import subprocess import tempfile @@ -18,10 +19,7 @@ from typing_extensions import Literal from galaxy.tool_util.verify.wait import timeout_type -from galaxy.util import ( - shlex_join, - unicodify, -) +from galaxy.util import unicodify from galaxy_test.base.populators import ( DatasetPopulator, DEFAULT_TIMEOUT, @@ -361,7 +359,7 @@ def get_kubectl_logs(allow_wait: bool = True) -> Optional[str]: if allow_wait and "is waiting to start" in p.stderr: return None raise Exception( - f"Command '{shlex_join(log_cmd)}' failed with exit code: {p.returncode}.\nstdout: {p.stdout}\nstderr: {p.stderr}" + f"Command '{shlex.join(log_cmd)}' failed with exit code: {p.returncode}.\nstdout: {p.stdout}\nstderr: {p.stderr}" ) return p.stdout diff --git a/test/unit/app/managers/test_NotificationManager.py b/test/unit/app/managers/test_NotificationManager.py index 99d493b3ef3b..ad707619d4b1 100644 --- a/test/unit/app/managers/test_NotificationManager.py +++ b/test/unit/app/managers/test_NotificationManager.py @@ -276,7 +276,7 @@ def test_update_user_notifications(self): assert user_notification.seen_time is None assert user_notification.deleted is False request = UserNotificationUpdateRequest(seen=True) - self.notification_manager.update_user_notifications(user, set([notification.id]), request) + self.notification_manager.update_user_notifications(user, {notification.id}, request) user_notification = self.notification_manager.get_user_notification(user, notification.id) assert user_notification.seen_time is not None assert user_notification.deleted is False diff --git a/tox.ini b/tox.ini index 2bde302555f9..c68144f12885 100644 --- a/tox.ini +++ b/tox.ini @@ -39,6 +39,8 @@ passenv = GALAXY_CONFIG_OVERRIDE_DATABASE_CONNECTION APP_WEBSERVER TERM + TEST_PYTHON + TZ setenv = coverage: GALAXY_TEST_COVERAGE=1 first_startup: GALAXY_CONFIG_DATABASE_AUTO_MIGRATE=true