Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Python 3.12 #16796

Merged
merged 6 commits into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/first_startup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.11']
python-version: ['3.8', '3.12']
defaults:
run:
shell: bash -l {0}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.11']
python-version: ['3.8', '3.12']
env:
LINT_PATH: 'lib/galaxy/dependencies/pinned-lint-requirements.txt'
TYPE_PATH: 'lib/galaxy/dependencies/pinned-typecheck-requirements.txt'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint_openapi_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.11']
python-version: ['3.8', '3.12']
steps:
- uses: actions/checkout@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/osx_startup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.11']
python-version: ['3.8', '3.12']
defaults:
run:
shell: bash -l {0}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reports_startup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.11']
python-version: ['3.8', '3.12']
defaults:
run:
shell: bash -l {0}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_galaxy_packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.11']
python-version: ['3.8', '3.12']
steps:
- uses: actions/checkout@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/toolshed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.11']
python-version: ['3.8', '3.12']
shed-api: ['v1', 'v2']
test-install-client: ['galaxy_api', 'standalone']
services:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.11']
python-version: ['3.8', '3.12']
steps:
- uses: actions/checkout@v3
with:
Expand Down
322 changes: 161 additions & 161 deletions lib/galaxy/dependencies/dev-requirements.txt

Large diffs are not rendered by default.

418 changes: 210 additions & 208 deletions lib/galaxy/dependencies/pinned-requirements.txt

Large diffs are not rendered by default.

42 changes: 22 additions & 20 deletions lib/galaxy/dependencies/pinned-typecheck-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
cffi==1.16.0 ; python_version >= "3.8" and python_version < "3.12"
cryptography==41.0.7 ; python_version >= "3.8" and python_version < "3.12"
mypy-extensions==1.0.0 ; python_version >= "3.8" and python_version < "3.12"
mypy==1.8.0 ; python_version >= "3.8" and python_version < "3.12"
pycparser==2.21 ; python_version >= "3.8" and python_version < "3.12"
pydantic==2.5.3 ; python_version >= "3.8" and python_version < "3.12"
annotated-types==0.6.0 ; python_version >= "3.8" and python_version < "3.13"
cffi==1.16.0 ; python_version >= "3.8" and python_version < "3.13"
cryptography==41.0.7 ; python_version >= "3.8" and python_version < "3.13"
mypy-extensions==1.0.0 ; python_version >= "3.8" and python_version < "3.13"
mypy==1.8.0 ; python_version >= "3.8" and python_version < "3.13"
pycparser==2.21 ; python_version >= "3.8" and python_version < "3.13"
pydantic-core==2.14.6 ; python_version >= "3.8" and python_version < "3.13"
pydantic==2.5.3 ; python_version >= "3.8" and python_version < "3.13"
tomli==2.0.1 ; python_version >= "3.8" and python_version < "3.11"
types-bleach==6.1.0.1 ; python_version >= "3.8" and python_version < "3.12"
types-boto==2.49.18.9 ; python_version >= "3.8" and python_version < "3.12"
types-contextvars==2.4.7.3 ; python_version >= "3.8" and python_version < "3.12"
types-dataclasses==0.6.6 ; python_version >= "3.8" and python_version < "3.12"
types-docutils==0.20.0.20240106 ; python_version >= "3.8" and python_version < "3.12"
types-markdown==3.5.0.20240106 ; python_version >= "3.8" and python_version < "3.12"
types-paramiko==3.4.0.20240106 ; python_version >= "3.8" and python_version < "3.12"
types-pkg-resources==0.1.3 ; python_version >= "3.8" and python_version < "3.12"
types-python-dateutil==2.8.19.20240106 ; python_version >= "3.8" and python_version < "3.12"
types-pyyaml==6.0.12.12 ; python_version >= "3.8" and python_version < "3.12"
types-requests==2.31.0.6 ; python_version >= "3.8" and python_version < "3.12"
types-six==1.16.21.20240106 ; python_version >= "3.8" and python_version < "3.12"
types-urllib3==1.26.25.14 ; python_version >= "3.8" and python_version < "3.12"
typing-extensions==4.9.0 ; python_version >= "3.8" and python_version < "3.12"
types-bleach==6.1.0.1 ; python_version >= "3.8" and python_version < "3.13"
types-boto==2.49.18.9 ; python_version >= "3.8" and python_version < "3.13"
types-contextvars==2.4.7.3 ; python_version >= "3.8" and python_version < "3.13"
types-dataclasses==0.6.6 ; python_version >= "3.8" and python_version < "3.13"
types-docutils==0.20.0.20240106 ; python_version >= "3.8" and python_version < "3.13"
types-markdown==3.5.0.20240106 ; python_version >= "3.8" and python_version < "3.13"
types-paramiko==3.4.0.20240106 ; python_version >= "3.8" and python_version < "3.13"
types-pkg-resources==0.1.3 ; python_version >= "3.8" and python_version < "3.13"
types-python-dateutil==2.8.19.20240106 ; python_version >= "3.8" and python_version < "3.13"
types-pyyaml==6.0.12.12 ; python_version >= "3.8" and python_version < "3.13"
types-requests==2.31.0.6 ; python_version >= "3.8" and python_version < "3.13"
types-six==1.16.21.20240106 ; python_version >= "3.8" and python_version < "3.13"
types-urllib3==1.26.25.14 ; python_version >= "3.8" and python_version < "3.13"
typing-extensions==4.9.0 ; python_version >= "3.8" and python_version < "3.13"
10 changes: 5 additions & 5 deletions lib/galaxy/dependencies/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

set -e

SUPPORTED_PYTHON_VERSIONS="3.8 3.9 3.10 3.11"
NOT_SUPPORTED_NEXT_PYTHON_VERSION="3.12"
SUPPORTED_PYTHON_VERSIONS="3.8 3.9 3.10 3.11 3.12"
NOT_SUPPORTED_NEXT_PYTHON_VERSION="3.13"

this_directory="$(cd "$(dirname "$0")" > /dev/null && pwd)"

Expand Down Expand Up @@ -86,9 +86,9 @@ split_requirement () {
}

# For some packages there is no recent version that works on all Python versions
# supported by Galaxy, so Poetry resorts to an old version that didn't have a
# maximum Python version pin. Here we replace any such requirement with multiple
# Python-version-specific requirements.
# supported by Galaxy, so Poetry resorts to an old version. Here we replace any
# such requirement with multiple Python-version-specific requirements.
# Packages which specify a maximum Python version pin:
split_requirement matplotlib
split_requirement numpy
split_requirement scipy
5 changes: 2 additions & 3 deletions lib/galaxy/dependencies/update_lint_requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
set -e

# This script updates the pinned requirements for linting.
# The lint requirements are split from the other ones due to incompatible
# dependencies: flake8 requires importlib-metadata 4.2, while the Galaxy's core
# dependencies depend on importlib-metadata 4.13.
# The lint requirements are split from the other ones since they often have
# incompatible dependencies.

THIS_DIRECTORY="$(cd "$(dirname "$0")" > /dev/null && pwd)"

Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/files/sources/invenio.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def _get_download_file_url(self, record_id: str, filename: str, user_context: Op
# TODO: This is a temporary workaround for the fact that the "content" API
# does not support downloading files from S3 or other remote storage classes.
# More info: https://inveniordm.docs.cern.ch/reference/file_storage/#remote-files-r
download_file_content_url = f"{file_details_url.replace('/api','')}?download=1"
download_file_content_url = f"{file_details_url.replace('/api', '')}?download=1"
return download_file_content_url

def _is_api_url(self, url: str) -> bool:
Expand Down
15 changes: 6 additions & 9 deletions lib/galaxy/util/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,17 @@
"""
import sys

if sys.version_info >= (3, 12):
from importlib.resources import (
Anchor,
as_file,
files,
)
from importlib.resources.abc import Traversable
elif sys.version_info >= (3, 9):
from importlib.abc import Traversable
if sys.version_info >= (3, 9):
from importlib.resources import (
as_file,
files,
Package as Anchor,
)

if sys.version_info >= (3, 12):
from importlib.resources.abc import Traversable
else:
from importlib.abc import Traversable
else:
from importlib_resources import (
as_file,
Expand Down
1 change: 1 addition & 0 deletions packages/app/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ classifiers =
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Topic :: Software Development
Topic :: Software Development :: Code Generators
Topic :: Software Development :: Testing
Expand Down
1 change: 1 addition & 0 deletions packages/auth/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ classifiers =
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Topic :: Software Development
Topic :: Software Development :: Code Generators
Topic :: Software Development :: Testing
Expand Down
1 change: 1 addition & 0 deletions packages/config/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ classifiers =
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Topic :: Software Development
Topic :: Software Development :: Code Generators
Topic :: Software Development :: Testing
Expand Down
1 change: 1 addition & 0 deletions packages/data/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ classifiers =
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Topic :: Software Development
Topic :: Software Development :: Code Generators
Topic :: Software Development :: Testing
Expand Down
1 change: 1 addition & 0 deletions packages/files/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ classifiers =
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Topic :: Software Development
Topic :: Software Development :: Code Generators
Topic :: Software Development :: Testing
Expand Down
1 change: 1 addition & 0 deletions packages/job_execution/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ classifiers =
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Topic :: Software Development
Topic :: Software Development :: Code Generators
Topic :: Software Development :: Testing
Expand Down
3 changes: 2 additions & 1 deletion packages/job_metrics/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ classifiers =
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Topic :: Software Development
Topic :: Software Development :: Code Generators
Topic :: Software Development :: Testing
Expand All @@ -38,4 +39,4 @@ python_requires = >=3.7

[options.packages.find]
exclude =
tests*
tests*
1 change: 1 addition & 0 deletions packages/meta/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ classifiers =
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Topic :: Scientific/Engineering :: Bio-Informatics
Topic :: Software Development
Topic :: Software Development :: Code Generators
Expand Down
1 change: 1 addition & 0 deletions packages/navigation/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ classifiers =
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Topic :: Software Development
Topic :: Software Development :: Code Generators
Topic :: Software Development :: Testing
Expand Down
1 change: 1 addition & 0 deletions packages/objectstore/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ classifiers =
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Topic :: Software Development
Topic :: Software Development :: Code Generators
Topic :: Software Development :: Testing
Expand Down
2 changes: 2 additions & 0 deletions packages/schema/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ classifiers =
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Topic :: Software Development
Topic :: Software Development :: Code Generators
Topic :: Software Development :: Testing
Expand Down
1 change: 1 addition & 0 deletions packages/selenium/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ classifiers =
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Topic :: Software Development
Topic :: Software Development :: Code Generators
Topic :: Software Development :: Testing
Expand Down
1 change: 1 addition & 0 deletions packages/test_api/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ classifiers =
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Topic :: Software Development
Topic :: Software Development :: Code Generators
Topic :: Software Development :: Testing
Expand Down
1 change: 1 addition & 0 deletions packages/test_base/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ classifiers =
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Topic :: Software Development
Topic :: Software Development :: Code Generators
Topic :: Software Development :: Testing
Expand Down
1 change: 1 addition & 0 deletions packages/test_driver/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ classifiers =
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Topic :: Software Development
Topic :: Software Development :: Code Generators
Topic :: Software Development :: Testing
Expand Down
1 change: 1 addition & 0 deletions packages/test_selenium/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ classifiers =
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Topic :: Software Development
Topic :: Software Development :: Code Generators
Topic :: Software Development :: Testing
Expand Down
1 change: 1 addition & 0 deletions packages/tool_shed/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ classifiers =
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Topic :: Software Development
Topic :: Software Development :: Code Generators
Topic :: Software Development :: Testing
Expand Down
1 change: 1 addition & 0 deletions packages/tool_util/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ classifiers =
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Topic :: Software Development
Topic :: Software Development :: Code Generators
Topic :: Software Development :: Testing
Expand Down
1 change: 1 addition & 0 deletions packages/tours/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ classifiers =
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Topic :: Software Development
Topic :: Software Development :: Code Generators
Topic :: Software Development :: Testing
Expand Down
3 changes: 2 additions & 1 deletion packages/util/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ classifiers =
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Topic :: Software Development
Topic :: Software Development :: Code Generators
Topic :: Software Development :: Testing
Expand Down Expand Up @@ -51,7 +52,7 @@ jstree =
dictobj
template =
Cheetah3!=3.2.6.post2
future
future @ git+https://github.com/nsoranzo/python-future.git@python312-imp-module_past

[options.packages.find]
exclude =
Expand Down
1 change: 1 addition & 0 deletions packages/web_apps/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ classifiers =
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Topic :: Software Development
Topic :: Software Development :: Code Generators
Topic :: Software Development :: Testing
Expand Down
1 change: 1 addition & 0 deletions packages/web_framework/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ classifiers =
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Topic :: Software Development
Topic :: Software Development :: Code Generators
Topic :: Software Development :: Testing
Expand Down
1 change: 1 addition & 0 deletions packages/web_stack/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ classifiers =
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Topic :: Software Development
Topic :: Software Development :: Code Generators
Topic :: Software Development :: Testing
Expand Down
Loading
Loading