Skip to content

Commit f942729

Browse files
authored
Merge pull request #19685 from nsoranzo/drop_py3.8
Drop support for Python 3.8
2 parents 3f01d5b + caa4995 commit f942729

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+281
-363
lines changed

.circleci/config.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ variables:
1515
jobs:
1616
get_code:
1717
docker:
18-
- image: cimg/python:3.8
18+
- image: cimg/python:3.9
1919
<<: *set_workdir
2020
steps:
2121
# Replace standard code checkout with shallow clone to speed things up.
@@ -73,7 +73,7 @@ jobs:
7373
- ~/repo
7474
validate_test_tools:
7575
docker:
76-
- image: cimg/python:3.8
76+
- image: cimg/python:3.9
7777
<<: *set_workdir
7878
steps:
7979
- *restore_repo_cache

.github/workflows/api.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
strategy:
3030
fail-fast: false
3131
matrix:
32-
python-version: ['3.8']
32+
python-version: ['3.9']
3333
chunk: [0, 1]
3434
services:
3535
postgres:

.github/workflows/bioblend.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
fail-fast: false
3333
matrix:
3434
tox_env: [py313]
35-
galaxy_python_version: ["3.8"]
35+
galaxy_python_version: ['3.9']
3636
steps:
3737
- name: Checkout Galaxy
3838
uses: actions/checkout@v4

.github/workflows/check_test_class_names.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
strategy:
1616
matrix:
17-
python-version: ['3.8']
17+
python-version: ['3.9']
1818
steps:
1919
- uses: actions/checkout@v4
2020
- uses: actions/setup-python@v5

.github/workflows/converter_tests.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
runs-on: ubuntu-latest
2323
strategy:
2424
matrix:
25-
python-version: ['3.8']
25+
python-version: ['3.9']
2626
steps:
2727
- if: github.event_name == 'schedule'
2828
run: |

.github/workflows/cwl_conformance.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
strategy:
2525
fail-fast: false
2626
matrix:
27-
python-version: ['3.8']
27+
python-version: ['3.9']
2828
marker: ['green', 'red and required', 'red and not required']
2929
conformance-version: ['cwl_conformance_v1_0'] #, 'cwl_conformance_v1_1', 'cwl_conformance_v1_2']
3030
services:

.github/workflows/db_indexes.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ jobs:
2424
matrix:
2525
db: ['postgresql', 'sqlite']
2626
postgresql-version: ['13']
27-
python-version: ['3.8']
27+
python-version: ['3.9']
2828
include:
2929
- db: postgresql
3030
postgresql-version: '9.6'
31-
python-version: '3.8'
31+
python-version: '3.9'
3232
services:
3333
postgres:
3434
image: postgres:${{ matrix.postgresql-version }}

.github/workflows/dependencies.yaml

+1-5
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,9 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v4
13-
# Install Python 3.8 for update_lint_requirements.sh
14-
# Install Python 3.9 (as default) to allow `uv lock` to generate metadata for rucio-clients
1513
- uses: actions/setup-python@v5
1614
with:
17-
python-version: |
18-
3.8
19-
3.9
15+
python-version: '3.9'
2016
- name: Update dependencies
2117
run: make update-dependencies
2218
- name: Create pull request

.github/workflows/deployment.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
runs-on: ubuntu-latest
3030
strategy:
3131
matrix:
32-
python-version: ['3.8']
32+
python-version: ['3.9']
3333
steps:
3434
- uses: actions/checkout@v4
3535
with:

.github/workflows/docs.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717
strategy:
1818
matrix:
19-
python-version: ['3.8']
19+
python-version: ['3.9']
2020
steps:
2121
- name: Get target branch name (push)
2222
if: github.event_name == 'push'

.github/workflows/first_startup.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
strategy:
2424
fail-fast: false
2525
matrix:
26-
python-version: ['3.8', '3.13']
26+
python-version: ['3.9', '3.13']
2727
defaults:
2828
run:
2929
shell: bash -l {0}

.github/workflows/framework_tools.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
runs-on: ubuntu-latest
2626
strategy:
2727
matrix:
28-
python-version: ['3.8']
28+
python-version: ['3.9']
2929
services:
3030
postgres:
3131
image: postgres:13

.github/workflows/framework_workflows.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
runs-on: ubuntu-latest
2727
strategy:
2828
matrix:
29-
python-version: ['3.8']
29+
python-version: ['3.9']
3030
services:
3131
postgres:
3232
image: postgres:13

.github/workflows/integration.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
strategy:
3030
fail-fast: false
3131
matrix:
32-
python-version: ['3.8']
32+
python-version: ['3.9']
3333
chunk: ['0', '1', '2', '3']
3434
services:
3535
postgres:

.github/workflows/integration_selenium.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
runs-on: ubuntu-latest
3232
strategy:
3333
matrix:
34-
python-version: ['3.8']
34+
python-version: ['3.9']
3535
services:
3636
postgres:
3737
image: postgres:13

.github/workflows/lint.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
strategy:
2323
fail-fast: false
2424
matrix:
25-
python-version: ['3.8', '3.13']
25+
python-version: ['3.9', '3.13']
2626
env:
2727
LINT_PATH: 'lib/galaxy/dependencies/pinned-lint-requirements.txt'
2828
TYPE_PATH: 'lib/galaxy/dependencies/pinned-typecheck-requirements.txt'
@@ -56,5 +56,5 @@ jobs:
5656
run: tox -e mypy
5757
- uses: psf/black@stable
5858
with:
59-
version: "24.8.0" # last version supporting Python 3.8
59+
version: ">=25.1.0"
6060
- uses: isort/isort-action@v1

.github/workflows/lint_openapi_schema.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
strategy:
2121
fail-fast: false
2222
matrix:
23-
python-version: ['3.8', '3.13']
23+
python-version: ['3.9', '3.13']
2424
steps:
2525
- uses: actions/checkout@v4
2626
with:

.github/workflows/mulled.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
strategy:
2121
fail-fast: false
2222
matrix:
23-
python-version: ['3.8']
23+
python-version: ['3.9']
2424
steps:
2525
- uses: actions/checkout@v4
2626
with:

.github/workflows/osx_startup.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
strategy:
2222
fail-fast: false
2323
matrix:
24-
python-version: ['3.8', '3.13']
24+
python-version: ['3.9', '3.13']
2525
defaults:
2626
run:
2727
shell: bash -l {0}

.github/workflows/performance.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
runs-on: ubuntu-latest
2525
strategy:
2626
matrix:
27-
python-version: ['3.8']
27+
python-version: ['3.9']
2828
services:
2929
postgres:
3030
image: postgres:13

.github/workflows/publish_artifacts.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
strategy:
1111
matrix:
12-
python-version: ['3.8']
12+
python-version: ['3.9']
1313
steps:
1414
- uses: actions/setup-python@v5
1515
with:

.github/workflows/reports_startup.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
strategy:
1919
fail-fast: false
2020
matrix:
21-
python-version: ['3.8', '3.13']
21+
python-version: ['3.9', '3.13']
2222
defaults:
2323
run:
2424
shell: bash -l {0}

.github/workflows/selenium.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
strategy:
3333
fail-fast: false
3434
matrix:
35-
python-version: ['3.8']
35+
python-version: ['3.9']
3636
chunk: [0, 1, 2]
3737
services:
3838
postgres:

.github/workflows/test_galaxy_packages.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
strategy:
1919
fail-fast: false
2020
matrix:
21-
python-version: ['3.8', '3.13']
21+
python-version: ['3.9', '3.13']
2222
steps:
2323
- uses: actions/checkout@v4
2424
with:

.github/workflows/toolshed.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
strategy:
2222
fail-fast: false
2323
matrix:
24-
python-version: ['3.8', '3.13']
24+
python-version: ['3.9', '3.13']
2525
shed-api: ['v1', 'v2']
2626
test-install-client: ['galaxy_api', 'standalone']
2727
services:

.github/workflows/unit-postgres.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
strategy:
2323
fail-fast: false
2424
matrix:
25-
python-version: ['3.8']
25+
python-version: ['3.9']
2626
services:
2727
postgres:
2828
image: postgres:13

.github/workflows/unit.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
strategy:
2121
fail-fast: false
2222
matrix:
23-
python-version: ['3.8', '3.13']
23+
python-version: ['3.9', '3.13']
2424
steps:
2525
- uses: actions/checkout@v4
2626
with:

Makefile

+12-4
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@ CWL_TARGETS := test/functional/tools/cwl_tools/v1.0/conformance_tests.yaml \
2626
lib/galaxy_test/api/cwl/test_cwl_conformance_v1_1.py \
2727
lib/galaxy_test/api/cwl/test_cwl_conformance_v1_2.py
2828
NO_YARN_MSG="Could not find yarn, which is required to build the Galaxy client.\nIt should be shipped with Galaxy's virtualenv, but to install yarn manually please visit \033[0;34mhttps://yarnpkg.com/en/docs/install\033[0m for instructions, and package information for all platforms.\n"
29+
SPACE := $() $()
30+
NEVER_PYUPGRADE_PATHS := .venv/ .tox/ lib/galaxy/schema/bco/ \
31+
lib/galaxy/schema/drs/ lib/tool_shed_client/schema/trs \
32+
scripts/check_python.py tools/ test/functional/tools/cwl_tools/
33+
PY37_PYUPGRADE_PATHS := lib/galaxy/exceptions/ lib/galaxy/job_metrics/ \
34+
lib/galaxy/objectstore/ lib/galaxy/tool_util/ lib/galaxy/util/ \
35+
test/unit/job_metrics/ test/unit/objectstore/ test/unit/tool_util/ \
36+
test/unit/util/
2937

3038
all: help
3139
@echo "This makefile is used for building Galaxy's JS client, documentation, and drive the release process. A sensible all target is not implemented."
@@ -54,10 +62,10 @@ format: ## Format Python code base
5462
remove-unused-imports: ## Remove unused imports in Python code base
5563
$(IN_VENV) autoflake --in-place --remove-all-unused-imports --recursive --verbose lib/ test/
5664

57-
pyupgrade: ## Convert older code patterns to Python3.7/3.8 idiomatic ones
58-
ack --type=python -f | grep -v '^lib/galaxy/schema/bco/\|^lib/galaxy/schema/drs/\|^lib/tool_shed_client/schema/trs\|^tools/\|^.venv/\|^.tox/\|^lib/galaxy/exceptions/\|^lib/galaxy/job_metrics/\|^lib/galaxy/objectstore/\|^lib/galaxy/tool_util/\|^lib/galaxy/util/\|^test/functional/tools/cwl_tools/' | xargs pyupgrade --py38-plus
59-
ack --type=python -f | grep -v '^lib/galaxy/schema/bco/\|^lib/galaxy/schema/drs/\|^lib/tool_shed_client/schema/trs\|^tools/\|^.venv/\|^.tox/\|^lib/galaxy/exceptions/\|^lib/galaxy/job_metrics/\|^lib/galaxy/objectstore/\|^lib/galaxy/tool_util/\|^lib/galaxy/util/\|^test/functional/tools/cwl_tools/' | xargs auto-walrus
60-
ack --type=python -f lib/galaxy/exceptions/ lib/galaxy/job_metrics/ lib/galaxy/objectstore/ lib/galaxy/tool_util/ lib/galaxy/util/ | xargs pyupgrade --py37-plus
65+
pyupgrade: ## Convert older code patterns to Python 3.7/3.9 idiomatic ones
66+
ack --type=python -f | grep -v '^$(subst $(SPACE),\|^,$(NEVER_PYUPGRADE_PATHS) $(PY37_PYUPGRADE_PATHS))' | xargs pyupgrade --py39-plus
67+
ack --type=python -f | grep -v '^$(subst $(SPACE),\|^,$(NEVER_PYUPGRADE_PATHS) $(PY37_PYUPGRADE_PATHS))' | xargs auto-walrus
68+
ack --type=python -f $(PY37_PYUPGRADE_PATHS) | xargs pyupgrade --py37-plus
6169

6270
docs-slides-ready:
6371
test -f plantuml.jar || wget http://jaist.dl.sourceforge.net/project/plantuml/plantuml.jar

README.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ Community support is available at `Galaxy Help <https://help.galaxyproject.org/>
2424
Galaxy Quickstart
2525
=================
2626

27-
Galaxy requires Python 3.8 or higher. To check your Python version, run:
27+
Galaxy requires Python 3.9 or higher. To check your Python version, run:
2828

2929
.. code:: console
3030
3131
$ python -V
32-
Python 3.8.18
32+
Python 3.9.21
3333
3434
Start Galaxy:
3535

lib/galaxy/datatypes/sniff.py

+8-6
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,10 @@ def convert_newlines(
119119
converted_regex = False
120120
NEWLINE_BYTE = 10
121121
CR_BYTE = 13
122-
with tempfile.NamedTemporaryFile(mode="wb", prefix=tmp_prefix, dir=tmp_dir, delete=False) as fp, open(
123-
fname, mode="rb"
124-
) as fi:
122+
with (
123+
tempfile.NamedTemporaryFile(mode="wb", prefix=tmp_prefix, dir=tmp_dir, delete=False) as fp,
124+
open(fname, mode="rb") as fi,
125+
):
125126
last_char = None
126127
block = fi.read(block_size)
127128
last_block = b""
@@ -171,9 +172,10 @@ def convert_sep2tabs(
171172
i = 0
172173
converted_newlines = False
173174
converted_regex = False
174-
with tempfile.NamedTemporaryFile(mode="wb", prefix=tmp_prefix, dir=tmp_dir, delete=False) as fp, open(
175-
fname, mode="rb"
176-
) as fi:
175+
with (
176+
tempfile.NamedTemporaryFile(mode="wb", prefix=tmp_prefix, dir=tmp_dir, delete=False) as fp,
177+
open(fname, mode="rb") as fi,
178+
):
177179
block = fi.read(block_size)
178180
while block:
179181
if block:

lib/galaxy/dependencies/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ def check_pkce(self):
315315
return self.pkce_support
316316

317317
def check_rucio_clients(self):
318-
return "rucio" in self.object_stores and sys.version_info >= (3, 9)
318+
return "rucio" in self.object_stores
319319

320320

321321
def optional(config_file=None):

0 commit comments

Comments
 (0)