Skip to content

Commit 80ce8ad

Browse files
authored
Merge pull request #18449 from nsoranzo/python3.13
Add Python 3.13 support
2 parents 0f06c9b + febd6f9 commit 80ce8ad

23 files changed

+68
-43
lines changed

.github/workflows/first_startup.yaml

Lines changed: 1 addition & 1 deletion
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.12']
26+
python-version: ['3.8', '3.13']
2727
defaults:
2828
run:
2929
shell: bash -l {0}

.github/workflows/lint.yaml

Lines changed: 1 addition & 1 deletion
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.12']
25+
python-version: ['3.8', '3.13']
2626
env:
2727
LINT_PATH: 'lib/galaxy/dependencies/pinned-lint-requirements.txt'
2828
TYPE_PATH: 'lib/galaxy/dependencies/pinned-typecheck-requirements.txt'

.github/workflows/lint_openapi_schema.yml

Lines changed: 1 addition & 1 deletion
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.12']
23+
python-version: ['3.8', '3.13']
2424
steps:
2525
- uses: actions/checkout@v4
2626
with:

.github/workflows/osx_startup.yaml

Lines changed: 1 addition & 1 deletion
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.12']
24+
python-version: ['3.8', '3.13']
2525
defaults:
2626
run:
2727
shell: bash -l {0}

.github/workflows/reports_startup.yaml

Lines changed: 1 addition & 1 deletion
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.12']
21+
python-version: ['3.8', '3.13']
2222
defaults:
2323
run:
2424
shell: bash -l {0}

.github/workflows/test_galaxy_packages.yaml

Lines changed: 1 addition & 1 deletion
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.12']
21+
python-version: ['3.8', '3.13']
2222
steps:
2323
- uses: actions/checkout@v4
2424
with:

.github/workflows/toolshed.yaml

Lines changed: 1 addition & 1 deletion
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.12']
24+
python-version: ['3.8', '3.13']
2525
shed-api: ['v1', 'v2']
2626
test-install-client: ['galaxy_api', 'standalone']
2727
services:

.github/workflows/unit.yaml

Lines changed: 1 addition & 1 deletion
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.12']
23+
python-version: ['3.8', '3.13']
2424
steps:
2525
- uses: actions/checkout@v4
2626
with:

lib/galaxy/dependencies/conditional-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# These dependencies are only required when certain config options are set
2-
psycopg2-binary==2.9.9
2+
psycopg2-binary==2.9.10
33
mysqlclient
44
fluent-logger
55
sentry-sdk[fastapi]

lib/galaxy/dependencies/pinned-requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ celery==5.4.0
3939
certifi==2024.8.30
4040
cffi==1.17.1
4141
charset-normalizer==3.4.0
42-
cheetah3==3.2.6.post1
4342
circus==0.18.0
4443
click==8.1.7
4544
click-didyoumean==0.3.1
@@ -51,6 +50,7 @@ colorama==0.4.6 ; platform_system == 'Windows'
5150
coloredlogs==15.0.1
5251
conda-package-streaming==0.11.0
5352
cryptography==43.0.3
53+
ct3==3.3.3.post1
5454
cwl-upgrader==1.2.11
5555
cwl-utils==0.35
5656
cwltool==3.1.20241007082533
@@ -66,6 +66,7 @@ email-validator==2.2.0
6666
exceptiongroup==1.2.2 ; python_full_version < '3.11'
6767
fastapi-slim==0.115.4
6868
filelock==3.16.1
69+
fissix==24.4.24 ; python_full_version >= '3.13'
6970
frozenlist==1.5.0
7071
fs==2.4.16
7172
fsspec==2024.10.0

lib/galaxy/util/image_util.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"""Provides utilities for working with image files."""
22

3-
import imghdr
43
import logging
54
from typing import (
65
List,
@@ -22,11 +21,7 @@ def image_type(filename: str) -> Optional[str]:
2221
with Image.open(filename) as im:
2322
fmt = im.format
2423
except Exception:
25-
# We continue to try with imghdr, so this is a rare case of an
26-
# exception we expect to happen frequently, so we're not logging
2724
pass
28-
if not fmt:
29-
fmt = imghdr.what(filename)
3025
if fmt:
3126
return fmt.upper()
3227
else:

lib/galaxy/util/template.py

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,34 @@
11
"""Entry point for the usage of Cheetah templating within Galaxy."""
22

3+
import sys
34
import traceback
4-
from lib2to3.refactor import RefactoringTool
55

66
from Cheetah.Compiler import Compiler
77
from Cheetah.NameMapper import NotFound
88
from Cheetah.Parser import ParseError
99
from Cheetah.Template import Template
1010
from packaging.version import Version
11-
from past.translation import myfixes
1211

1312
from galaxy.util.tree_dict import TreeDict
1413
from . import unicodify
1514

15+
if sys.version_info >= (3, 13):
16+
import fissix
17+
from fissix import (
18+
fixes as fissix_fixes,
19+
pgen2 as fissix_pgen2,
20+
refactor as fissix_refactor,
21+
)
22+
23+
sys.modules["lib2to3"] = fissix
24+
sys.modules["lib2to3.fixes"] = fissix_fixes
25+
sys.modules["lib2to3.pgen2"] = fissix_pgen2
26+
sys.modules["lib2to3.refactor"] = fissix_refactor
27+
28+
from lib2to3.refactor import RefactoringTool
29+
30+
from past.translation import myfixes
31+
1632
# Skip libpasteurize fixers, which make sure code is py2 and py3 compatible.
1733
# This is not needed, we only translate code on py3.
1834
myfixes = [f for f in myfixes if not f.startswith("libpasteurize")]

packages/app/setup.cfg

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ install_requires =
4141
galaxy-objectstore
4242
galaxy-tool-util[cwl,edam]
4343
galaxy-tours
44-
galaxy-util
44+
galaxy-util[image_util]
4545
galaxy-web-framework
4646
galaxy-web-stack
4747
Beaker
@@ -57,7 +57,7 @@ install_requires =
5757
Mako
5858
Markdown
5959
MarkupSafe
60-
mercurial
60+
mercurial>=6.8.2
6161
packaging
6262
paramiko!=2.9.0,!=2.9.1
6363
pebble
@@ -74,7 +74,7 @@ install_requires =
7474
starlette
7575
svgwrite
7676
typing-extensions
77-
WebOb
77+
WebOb>=1.8.9
7878
Whoosh
7979
packages = find:
8080
python_requires = >=3.8

packages/data/setup.cfg

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ install_requires =
3636
galaxy-objectstore
3737
galaxy-schema
3838
galaxy-tool-util
39-
galaxy-util[template]
39+
galaxy-util[image_util,template]
4040
alembic
4141
alembic-utils
4242
bdbag>=1.6.3
@@ -46,7 +46,7 @@ install_requires =
4646
h5grove>=1.2.1
4747
h5py
4848
isa-rwval @ git+https://github.com/nsoranzo/isa-rwval.git@master
49-
isal
49+
isal>=1.7.0
5050
MarkupSafe
5151
msal
5252
mrcfile
@@ -62,7 +62,6 @@ install_requires =
6262
SQLAlchemy>=2.0,<2.1,!=2.0.36
6363
tifffile
6464
typing-extensions
65-
WebOb
6665
packages = find:
6766
python_requires = >=3.8
6867

packages/files/setup.cfg

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ include_package_data = True
3434
install_requires =
3535
galaxy-util[config_template]
3636
fs
37-
isal
3837
typing-extensions
3938
packages = find:
4039
python_requires = >=3.8

packages/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ while read -r package_dir || [ -n "$package_dir" ]; do # https://stackoverflow.
4949

5050
# Install extras (if needed)
5151
if [ "$package_dir" = "util" ]; then
52-
pip install '.[template,jstree,config_template]'
52+
pip install '.[image_util,template,jstree,config_template]'
5353
elif [ "$package_dir" = "tool_util" ]; then
5454
pip install '.[cwl,mulled,edam,extended-assertions]'
5555
else

packages/test_base/setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ install_requires =
3535
galaxy-tool-util
3636
galaxy-util
3737
bioblend
38-
cwltest
38+
cwltest>=2.5.20240906231108
3939
gxformat2
4040
pytest
4141
PyYAML

packages/tool_shed/setup.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ install_requires =
3636
galaxy-auth
3737
galaxy-config
3838
galaxy-data
39-
galaxy-util
39+
galaxy-util[image_util]
4040
galaxy-web-framework
4141
galaxy-web-stack
4242
galaxy-web-apps
@@ -48,7 +48,7 @@ install_requires =
4848
graphql-core
4949
Mako
5050
MarkupSafe
51-
mercurial
51+
mercurial>=6.8.2
5252
Paste
5353
pydantic>=2.7.4
5454
Routes

packages/tool_util/setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ version = 24.2.dev0
3333
[options]
3434
include_package_data = True
3535
install_requires =
36-
galaxy-util>=22.1
36+
galaxy-util[image_util]>=22.1
3737
conda-package-streaming
3838
lxml!=4.2.2
3939
MarkupSafe

packages/util/setup.cfg

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,13 @@ packages = find:
4848
python_requires = >=3.7
4949

5050
[options.extras_require]
51+
image_util =
52+
pillow
5153
jstree =
5254
dictobj
5355
template =
54-
Cheetah3
56+
CT3>=3.3.3
57+
fissix;python_version>='3.13'
5558
future>=1.0.0
5659
config_template =
5760
Jinja2

packages/web_apps/setup.cfg

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ install_requires =
4242
a2wsgi
4343
apispec
4444
Babel
45-
Cheetah3
45+
CT3>=3.3.3
4646
fastapi>=0.101.0
4747
gunicorn
4848
gxformat2
@@ -63,8 +63,8 @@ install_requires =
6363
tuswsgi
6464
typing-extensions
6565
uvicorn
66-
uvloop
67-
WebOb
66+
uvloop>=0.21.0
67+
WebOb>=1.8.9
6868
packages = find:
6969
python_requires = >=3.8
7070

pyproject.toml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,19 @@ dependencies = [
2525
"boto",
2626
"bx-python",
2727
"celery",
28-
"Cheetah3",
2928
"cloudauthz==0.6.0",
3029
"cloudbridge",
3130
"circus",
3231
"conda-package-streaming",
32+
"CT3>=3.3.3", # Python 3.13 support
3333
"cwltool>=3.1.20230624081518", # save time, minimum needed by cwl-1.0 branch
3434
"dictobj",
3535
"dnspython",
3636
"docutils!=0.17,!=0.17.1",
3737
"dparse",
3838
"edam-ontology",
3939
"fastapi-slim>=0.111.0",
40+
"fissix ; python_version>='3.13'",
4041
"fs",
4142
"future>=1.0.0", # Python 3.12 support
4243
"graphene",
@@ -50,14 +51,14 @@ dependencies = [
5051
"h5py>=3.12 ; python_version>='3.9'", # Python 3.13 support
5152
"importlib-resources ; python_version<'3.9'", # for importlib.{abc.Traversable,resources.{files, Package}}
5253
"isa-rwval @ git+https://github.com/nsoranzo/isa-rwval.git@master", # https://github.com/ISA-tools/isa-rwval/pull/17
53-
"isal",
54+
"isal>=1.7.0", # Python 3.13 support
5455
"jinja2",
5556
"kombu>=5.3", # for importlib-metadata fix
5657
"lagom",
5758
"Mako",
5859
"Markdown",
5960
"MarkupSafe",
60-
"mercurial",
61+
"mercurial>=6.8.2", # Python 3.13 support
6162
"mrcfile",
6263
"msal",
6364
"nodeenv",
@@ -89,7 +90,7 @@ dependencies = [
8990
"rocrate",
9091
"Routes",
9192
"s3fs>=2023.1.0",
92-
"schema-salad!=8.3.20220721194857", # https://github.com/common-workflow-language/schema_salad/issues/575
93+
"schema-salad>=8.7.20240905150001", # Python 3.13 support
9394
"social-auth-core>=4.5.0", # to drop dependency on abandoned python-jose
9495
"sortedcontainers",
9596
"SQLAlchemy>=2.0,<2.1,!=2.0.36", # https://github.com/sqlalchemy/sqlalchemy/issues/12019,
@@ -103,8 +104,8 @@ dependencies = [
103104
"tuswsgi",
104105
"typing-extensions",
105106
"uvicorn!=0.28.0", # https://github.com/galaxyproject/galaxy/issues/17669
106-
"uvloop",
107-
"WebOb",
107+
"uvloop>=0.21.0", # Python 3.13 support
108+
"WebOb>=1.8.9", # Python 3.13 support
108109
"Whoosh",
109110
"zipstream-new",
110111
]
@@ -122,7 +123,7 @@ dev = [
122123
"black",
123124
"boto3",
124125
"codespell",
125-
"cwltest",
126+
"cwltest>=2.5.20240906231108", # Python 3.13 support
126127
"darker",
127128
"fluent-logger",
128129
"galaxy-release-util",
@@ -133,7 +134,7 @@ dev = [
133134
"myst-parser",
134135
"onedatafilerestclient==21.2.5.2",
135136
"pkce",
136-
"playwright",
137+
"playwright>=1.48.0", # Python 3.13 support
137138
"pytest<8", # https://github.com/galaxyproject/galaxy/issues/17561
138139
"pytest-asyncio",
139140
"pytest-cov",
@@ -154,7 +155,7 @@ dev = [
154155
"statsd",
155156
"testfixtures",
156157
"tuspy",
157-
"twill>=3.2.1", # https://github.com/twill-tools/twill/issues/18
158+
"twill>=3.2.5", # Python 3.13 support
158159
"watchdog",
159160
"Werkzeug",
160161
]

0 commit comments

Comments
 (0)