From b5c4c5e5a1343beab77b551862715f37b676ea4a Mon Sep 17 00:00:00 2001 From: Nicola Soranzo Date: Fri, 30 Jun 2023 18:03:28 +0100 Subject: [PATCH] Drop support for Python 3.7 which has reached end of life on 2023-06-27. --- .github/workflows/lint.yaml | 2 +- .github/workflows/test.yaml | 4 ++-- ABOUT.rst | 2 +- CONTRIBUTING.md | 2 +- README.rst | 2 +- bioblend/_tests/GalaxyTestBase.py | 3 +-- bioblend/_tests/TestGalaxyJobs.py | 3 +-- bioblend/_tests/TestGalaxyObjects.py | 2 +- bioblend/galaxy/datasets/__init__.py | 2 +- bioblend/galaxy/folders/__init__.py | 3 +-- bioblend/galaxy/genomes/__init__.py | 3 +-- bioblend/galaxy/histories/__init__.py | 3 +-- bioblend/galaxy/jobs/__init__.py | 3 +-- bioblend/galaxy/libraries/__init__.py | 3 +-- bioblend/galaxy/objects/client.py | 3 +-- bioblend/galaxy/objects/wrappers.py | 3 +-- bioblend/galaxy/quotas/__init__.py | 3 +-- bioblend/galaxy/tool_dependencies/__init__.py | 3 +-- bioblend/galaxy/tools/__init__.py | 3 +-- bioblend/galaxy/workflows/__init__.py | 3 +-- bioblend/toolshed/categories/__init__.py | 3 +-- bioblend/toolshed/repositories/__init__.py | 3 +-- pyproject.toml | 4 ++-- run_bioblend_tests.sh | 4 ++-- setup.cfg | 4 +--- tox.ini | 2 +- 26 files changed, 29 insertions(+), 46 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 463943698..23a9ec052 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.7', '3.11'] + python-version: ['3.8', '3.11'] steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 672eb7181..6386dfbd9 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -30,7 +30,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - tox_env: [py37] + tox_env: [py38] galaxy_version: - dev - release_23.1 @@ -52,7 +52,7 @@ jobs: # Cannot test on macOS because service containers are not supported # yet: https://github.community/t/github-actions-services-available-on-others-vms/16916 # - os: macos-latest - # tox_env: py37 + # tox_env: py38 # galaxy_version: dev steps: - uses: actions/checkout@v3 diff --git a/ABOUT.rst b/ABOUT.rst index adc7972a5..5513aab95 100644 --- a/ABOUT.rst +++ b/ABOUT.rst @@ -3,7 +3,7 @@ interacting with the `Galaxy`_ API. BioBlend is supported and tested on: -- Python 3.7 - 3.11 +- Python 3.8 - 3.11 - Galaxy release 19.05 and later. BioBlend's goal is to make it easier to script and automate the running of diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 999eb1026..ac6b16235 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -13,7 +13,7 @@ How to run BioBlend tests 1. Clone Galaxy to a directory outside of BioBlend source directory via `git clone https://github.com/galaxyproject/galaxy.git` -2. Change directory to your BioBlend source and run the tests via `./run_bioblend_tests.sh -g GALAXY_PATH [-r GALAXY_REV] [-e TOX_ENV]` where `GALAXY_PATH` is the directory where the galaxy repository was cloned, `GALAXY_REV` is the branch or commit of Galaxy that you would like to test against (if different from the current state of your galaxy clone), and `TOX_ENV` is used to specify the Python version to use for BioBlend, e.g. `py37` for Python 3.7. +2. Change directory to your BioBlend source and run the tests via `./run_bioblend_tests.sh -g GALAXY_PATH [-r GALAXY_REV] [-e TOX_ENV]` where `GALAXY_PATH` is the directory where the galaxy repository was cloned, `GALAXY_REV` is the branch or commit of Galaxy that you would like to test against (if different from the current state of your galaxy clone), and `TOX_ENV` is used to specify the Python version to use for BioBlend, e.g. `py38` for Python 3.8. You can also add `2>&1 | tee log.txt` to the command above to contemporarily view the test output and save it to the `log.txt` file. diff --git a/README.rst b/README.rst index 1241351ff..8c707f0de 100644 --- a/README.rst +++ b/README.rst @@ -15,7 +15,7 @@ BioBlend is a Python library for interacting with the `Galaxy`_ API. BioBlend is supported and tested on: -- Python 3.7 - 3.11 +- Python 3.8 - 3.11 - Galaxy release 19.05 and later. Full docs are available at https://bioblend.readthedocs.io/ with a quick library diff --git a/bioblend/_tests/GalaxyTestBase.py b/bioblend/_tests/GalaxyTestBase.py index 17f86a543..351cf6d91 100644 --- a/bioblend/_tests/GalaxyTestBase.py +++ b/bioblend/_tests/GalaxyTestBase.py @@ -3,10 +3,9 @@ from typing import ( Any, Dict, + Literal, ) -from typing_extensions import Literal - import bioblend from bioblend.galaxy import GalaxyInstance from . import test_util diff --git a/bioblend/_tests/TestGalaxyJobs.py b/bioblend/_tests/TestGalaxyJobs.py index 1653a255e..a43c6d7d3 100644 --- a/bioblend/_tests/TestGalaxyJobs.py +++ b/bioblend/_tests/TestGalaxyJobs.py @@ -4,8 +4,7 @@ timedelta, ) from operator import itemgetter - -from typing_extensions import Literal +from typing import Literal from bioblend.galaxy.tools.inputs import ( dataset, diff --git a/bioblend/_tests/TestGalaxyObjects.py b/bioblend/_tests/TestGalaxyObjects.py index 3451b307f..3610c2617 100644 --- a/bioblend/_tests/TestGalaxyObjects.py +++ b/bioblend/_tests/TestGalaxyObjects.py @@ -16,6 +16,7 @@ Dict, Iterable, List, + Literal, Set, Tuple, Union, @@ -24,7 +25,6 @@ from urllib.request import urlopen import pytest -from typing_extensions import Literal import bioblend from bioblend.galaxy import dataset_collections diff --git a/bioblend/galaxy/datasets/__init__.py b/bioblend/galaxy/datasets/__init__.py index f33e2582a..fd3c1cfba 100644 --- a/bioblend/galaxy/datasets/__init__.py +++ b/bioblend/galaxy/datasets/__init__.py @@ -10,6 +10,7 @@ Any, Dict, List, + Literal, Optional, overload, Tuple, @@ -18,7 +19,6 @@ ) from requests import Response -from typing_extensions import Literal import bioblend from bioblend import TimeoutException diff --git a/bioblend/galaxy/folders/__init__.py b/bioblend/galaxy/folders/__init__.py index 55c20e4de..7e0ea88e1 100644 --- a/bioblend/galaxy/folders/__init__.py +++ b/bioblend/galaxy/folders/__init__.py @@ -5,13 +5,12 @@ Any, Dict, List, + Literal, Optional, TYPE_CHECKING, Union, ) -from typing_extensions import Literal - from bioblend.galaxy.client import Client if TYPE_CHECKING: diff --git a/bioblend/galaxy/genomes/__init__.py b/bioblend/galaxy/genomes/__init__.py index 6644ac533..0eb91a21a 100644 --- a/bioblend/galaxy/genomes/__init__.py +++ b/bioblend/galaxy/genomes/__init__.py @@ -4,12 +4,11 @@ from typing import ( Any, Dict, + Literal, Optional, TYPE_CHECKING, ) -from typing_extensions import Literal - from bioblend.galaxy.client import Client if TYPE_CHECKING: diff --git a/bioblend/galaxy/histories/__init__.py b/bioblend/galaxy/histories/__init__.py index 72181a780..c53f22ff9 100644 --- a/bioblend/galaxy/histories/__init__.py +++ b/bioblend/galaxy/histories/__init__.py @@ -12,14 +12,13 @@ Dict, IO, List, + Literal, Optional, overload, Pattern, Union, ) -from typing_extensions import Literal - import bioblend from bioblend import ConnectionError from bioblend.galaxy.client import Client diff --git a/bioblend/galaxy/jobs/__init__.py b/bioblend/galaxy/jobs/__init__.py index 72e78bf9a..1fa37447a 100644 --- a/bioblend/galaxy/jobs/__init__.py +++ b/bioblend/galaxy/jobs/__init__.py @@ -7,12 +7,11 @@ Any, Dict, List, + Literal, Optional, TYPE_CHECKING, ) -from typing_extensions import Literal - from bioblend import TimeoutException from bioblend.galaxy.client import Client diff --git a/bioblend/galaxy/libraries/__init__.py b/bioblend/galaxy/libraries/__init__.py index ce62b1b7d..530c7aeed 100644 --- a/bioblend/galaxy/libraries/__init__.py +++ b/bioblend/galaxy/libraries/__init__.py @@ -7,12 +7,11 @@ Any, Dict, List, + Literal, Optional, TYPE_CHECKING, ) -from typing_extensions import Literal - from bioblend.galaxy.client import Client from bioblend.galaxy.datasets import ( DatasetTimeoutException, diff --git a/bioblend/galaxy/objects/client.py b/bioblend/galaxy/objects/client.py index 44a1708b4..7b50f1ba0 100644 --- a/bioblend/galaxy/objects/client.py +++ b/bioblend/galaxy/objects/client.py @@ -13,6 +13,7 @@ Dict, Generic, List, + Literal, Optional, overload, Type, @@ -20,8 +21,6 @@ Union, ) -from typing_extensions import Literal - import bioblend from bioblend.galaxy.datasets import HdaLdda from . import wrappers diff --git a/bioblend/galaxy/objects/wrappers.py b/bioblend/galaxy/objects/wrappers.py index 3fbdd3f77..51e5c1f58 100644 --- a/bioblend/galaxy/objects/wrappers.py +++ b/bioblend/galaxy/objects/wrappers.py @@ -21,6 +21,7 @@ Iterable, Iterator, List, + Literal, Optional, Set, Tuple, @@ -30,8 +31,6 @@ Union, ) -from typing_extensions import Literal - import bioblend from bioblend.galaxy.workflows import InputsBy from bioblend.util import abstractclass diff --git a/bioblend/galaxy/quotas/__init__.py b/bioblend/galaxy/quotas/__init__.py index 723593cf3..c0659e785 100644 --- a/bioblend/galaxy/quotas/__init__.py +++ b/bioblend/galaxy/quotas/__init__.py @@ -6,12 +6,11 @@ Any, Dict, List, + Literal, Optional, TYPE_CHECKING, ) -from typing_extensions import Literal - from bioblend.galaxy.client import Client if TYPE_CHECKING: diff --git a/bioblend/galaxy/tool_dependencies/__init__.py b/bioblend/galaxy/tool_dependencies/__init__.py index a8cf2daed..c25eebbe6 100644 --- a/bioblend/galaxy/tool_dependencies/__init__.py +++ b/bioblend/galaxy/tool_dependencies/__init__.py @@ -5,12 +5,11 @@ Any, Dict, List, + Literal, Optional, TYPE_CHECKING, ) -from typing_extensions import Literal - from bioblend.galaxy.client import Client if TYPE_CHECKING: diff --git a/bioblend/galaxy/tools/__init__.py b/bioblend/galaxy/tools/__init__.py index b2abf83a7..d3f6b1b1d 100644 --- a/bioblend/galaxy/tools/__init__.py +++ b/bioblend/galaxy/tools/__init__.py @@ -6,13 +6,12 @@ Any, Dict, List, + Literal, Optional, TYPE_CHECKING, Union, ) -from typing_extensions import Literal - from bioblend.galaxy.client import Client from bioblend.galaxyclient import UPLOAD_CHUNK_SIZE from bioblend.util import attach_file diff --git a/bioblend/galaxy/workflows/__init__.py b/bioblend/galaxy/workflows/__init__.py index 77ddf1f4a..b7c5f51d5 100644 --- a/bioblend/galaxy/workflows/__init__.py +++ b/bioblend/galaxy/workflows/__init__.py @@ -7,12 +7,11 @@ Any, Dict, List, + Literal, Optional, TYPE_CHECKING, ) -from typing_extensions import Literal - from bioblend.galaxy.client import Client if TYPE_CHECKING: diff --git a/bioblend/toolshed/categories/__init__.py b/bioblend/toolshed/categories/__init__.py index 17044f8ff..222fadf5f 100644 --- a/bioblend/toolshed/categories/__init__.py +++ b/bioblend/toolshed/categories/__init__.py @@ -5,11 +5,10 @@ Any, Dict, List, + Literal, TYPE_CHECKING, ) -from typing_extensions import Literal - from bioblend.galaxy.client import Client if TYPE_CHECKING: diff --git a/bioblend/toolshed/repositories/__init__.py b/bioblend/toolshed/repositories/__init__.py index c3dad6e58..46e0fbd48 100644 --- a/bioblend/toolshed/repositories/__init__.py +++ b/bioblend/toolshed/repositories/__init__.py @@ -5,13 +5,12 @@ Any, Dict, List, + Literal, Optional, TYPE_CHECKING, Union, ) -from typing_extensions import Literal - from bioblend.galaxy.client import Client from bioblend.util import attach_file diff --git a/pyproject.toml b/pyproject.toml index 3ca170f97..3f1a06765 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,14 +5,14 @@ build-backend = "setuptools.build_meta" [tool.black] include = '\.pyi?$' line-length = 120 -target-version = ['py37'] +target-version = ['py38'] [tool.darker] isort = true [tool.ruff] select = ["E", "F", "B", "UP"] -target-version = "py37" +target-version = "py38" # Exceptions: # B9 flake8-bugbear opinionated warnings # E501 is line length (delegated to black) diff --git a/run_bioblend_tests.sh b/run_bioblend_tests.sh index 64dbddde2..89cc4a11a 100755 --- a/run_bioblend_tests.sh +++ b/run_bioblend_tests.sh @@ -14,7 +14,7 @@ Options: -p PORT Port to use for the Galaxy server. Defaults to 8080. -e TOX_ENV - Work against specified tox environments. Defaults to py37. + Work against specified tox environments. Defaults to py38. -t BIOBLEND_TESTS Subset of tests to run, e.g. 'tests/TestGalaxyObjects.py::TestHistory::test_create_delete' . Defaults @@ -33,7 +33,7 @@ get_abs_dirname () { cd "$1" && pwd } -e_val=py37 +e_val=py38 GALAXY_PORT=8080 while getopts 'hcg:e:p:t:r:v:' option; do case $option in diff --git a/setup.cfg b/setup.cfg index d126e5bce..e4481b9fe 100644 --- a/setup.cfg +++ b/setup.cfg @@ -22,7 +22,6 @@ classifiers = License :: OSI Approved :: MIT License Operating System :: OS Independent Programming Language :: Python :: 3 - Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 @@ -71,9 +70,8 @@ install_requires = requests>=2.20.0 requests-toolbelt>=0.5.1,!=0.9.0 tuspy - typing-extensions packages = find: -python_requires = >=3.7 +python_requires = >=3.8 [options.entry_points] console_scripts = diff --git a/tox.ini b/tox.ini index b3e0ec012..ddc413b9a 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = lint, py37 +envlist = lint, py38 [testenv] commands =