From 87eabd06d8136aa433202278f9f85afb8bd15336 Mon Sep 17 00:00:00 2001 From: galaxybot Date: Sat, 30 Dec 2023 03:08:32 +0000 Subject: [PATCH 1/3] Update Python dependencies --- lib/galaxy/dependencies/dev-requirements.txt | 6 +++--- lib/galaxy/dependencies/pinned-requirements.txt | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/galaxy/dependencies/dev-requirements.txt b/lib/galaxy/dependencies/dev-requirements.txt index 0872758427f4..3cd3ac96a376 100644 --- a/lib/galaxy/dependencies/dev-requirements.txt +++ b/lib/galaxy/dependencies/dev-requirements.txt @@ -25,7 +25,7 @@ click==8.1.7 ; python_version >= "3.8" and python_version < "3.12" codespell==2.2.6 ; python_version >= "3.8" and python_version < "3.12" colorama==0.4.6 ; python_version >= "3.8" and python_version < "3.12" and (sys_platform == "win32" or platform_system == "Windows" or os_name == "nt") contourpy==1.1.1 ; python_version >= "3.8" and python_version < "3.12" -coverage[toml]==7.3.4 ; python_version >= "3.8" and python_version < "3.12" +coverage[toml]==7.4.0 ; python_version >= "3.8" and python_version < "3.12" cryptography==41.0.7 ; python_version >= "3.8" and python_version < "3.12" cwltest==2.4.20231031143732 ; python_version >= "3.8" and python_version < "3.12" cycler==0.12.1 ; python_version >= "3.8" and python_version < "3.12" @@ -132,7 +132,7 @@ scipy==1.11.4 ; python_version >= "3.9" and python_version < "3.12" secretstorage==3.3.3 ; python_version >= "3.8" and python_version < "3.12" and sys_platform == "linux" selenium==4.16.0 ; python_version >= "3.8" and python_version < "3.12" seletools==1.4.0 ; python_version >= "3.8" and python_version < "3.12" -setuptools==69.0.2 ; python_version >= "3.8" and python_version < "3.12" +setuptools==69.0.3 ; python_version >= "3.8" and python_version < "3.12" six==1.16.0 ; python_version >= "3.8" and python_version < "3.12" sniffio==1.3.0 ; python_version >= "3.8" and python_version < "3.12" snowballstemmer==2.2.0 ; python_version >= "3.8" and python_version < "3.12" @@ -158,7 +158,7 @@ tuspy==1.0.3 ; python_version >= "3.8" and python_version < "3.12" twill==3.2.1 ; python_version >= "3.8" and python_version < "3.12" twine==4.0.2 ; python_version >= "3.8" and python_version < "3.12" typing-extensions==4.9.0 ; python_version >= "3.8" and python_version < "3.12" -tzdata==2023.3 ; python_version >= "3.8" and python_version < "3.12" +tzdata==2023.4 ; python_version >= "3.8" and python_version < "3.12" urllib3==1.26.18 ; python_version >= "3.8" and python_version < "3.12" urllib3[socks]==1.26.18 ; python_version >= "3.8" and python_version < "3.12" vine==5.1.0 ; python_version >= "3.8" and python_version < "3.12" diff --git a/lib/galaxy/dependencies/pinned-requirements.txt b/lib/galaxy/dependencies/pinned-requirements.txt index b7d512dc724a..1ba8403cdfd2 100644 --- a/lib/galaxy/dependencies/pinned-requirements.txt +++ b/lib/galaxy/dependencies/pinned-requirements.txt @@ -1,4 +1,4 @@ -a2wsgi==1.9.0 ; python_version >= "3.8" and python_version < "3.12" +a2wsgi==1.10.0 ; python_version >= "3.8" and python_version < "3.12" adal==1.2.7 ; python_version >= "3.8" and python_version < "3.12" aiobotocore==2.9.0 ; python_version >= "3.8" and python_version < "3.12" aiodataloader==0.4.0 ; python_version >= "3.8" and python_version < "3.12" @@ -92,7 +92,7 @@ isodate==0.6.1 ; python_version >= "3.8" and python_version < "3.12" jinja2==3.1.2 ; python_version >= "3.8" and python_version < "3.12" jmespath==1.0.1 ; python_version >= "3.8" and python_version < "3.12" jsonref==1.1.0 ; python_version >= "3.8" and python_version < "3.12" -jsonschema-specifications==2023.11.2 ; python_version >= "3.8" and python_version < "3.12" +jsonschema-specifications==2023.12.1 ; python_version >= "3.8" and python_version < "3.12" jsonschema==4.20.0 ; python_version >= "3.8" and python_version < "3.12" kombu==5.3.4 ; python_version >= "3.8" and python_version < "3.12" lagom==2.6.0 ; python_version >= "3.8" and python_version < "3.12" @@ -121,7 +121,7 @@ paramiko==3.4.0 ; python_version >= "3.8" and python_version < "3.12" parsley==1.3 ; python_version >= "3.8" and python_version < "3.12" paste==3.7.1 ; python_version >= "3.8" and python_version < "3.12" pastedeploy==3.1.0 ; python_version >= "3.8" and python_version < "3.12" -pebble==5.0.5 ; python_version >= "3.8" and python_version < "3.12" +pebble==5.0.6 ; python_version >= "3.8" and python_version < "3.12" pkgutil-resolve-name==1.3.10 ; python_version >= "3.8" and python_version < "3.9" promise==2.3 ; python_version >= "3.8" and python_version < "3.12" prompt-toolkit==3.0.43 ; python_version >= "3.8" and python_version < "3.12" @@ -130,7 +130,7 @@ psutil==5.9.7 ; python_version >= "3.8" and python_version < "3.12" pulsar-galaxy-lib==0.15.5 ; python_version >= "3.8" and python_version < "3.12" pyasn1==0.5.1 ; python_version >= "3.8" and python_version < "3.12" pycparser==2.21 ; python_version >= "3.8" and python_version < "3.12" -pycryptodome==3.19.0 ; python_version >= "3.8" and python_version < "3.12" +pycryptodome==3.19.1 ; python_version >= "3.8" and python_version < "3.12" pydantic-tes==0.1.5 ; python_version >= "3.8" and python_version < "3.12" pydantic==1.10.13 ; python_version >= "3.8" and python_version < "3.12" pydantic[email]==1.10.13 ; python_version >= "3.8" and python_version < "3.12" @@ -157,7 +157,7 @@ pyzmq==25.1.2 ; python_version >= "3.8" and python_version < "3.12" rdflib==6.3.2 ; python_version >= "3.8" and python_version < "3.12" referencing==0.32.0 ; python_version >= "3.8" and python_version < "3.12" refgenconf==0.12.2 ; python_version >= "3.8" and python_version < "3.12" -regex==2023.10.3 ; python_version >= "3.8" and python_version < "3.12" +regex==2023.12.25 ; python_version >= "3.8" and python_version < "3.12" repoze-lru==0.7 ; python_version >= "3.8" and python_version < "3.12" requests-oauthlib==1.3.1 ; python_version >= "3.8" and python_version < "3.12" requests-toolbelt==1.0.0 ; python_version >= "3.8" and python_version < "3.12" @@ -166,14 +166,14 @@ requests==2.31.0 ; python_version >= "3.8" and python_version < "3.12" rich==13.7.0 ; python_version >= "3.8" and python_version < "3.12" rocrate==0.9.0 ; python_version >= "3.8" and python_version < "3.12" routes==2.5.1 ; python_version >= "3.8" and python_version < "3.12" -rpds-py==0.15.2 ; python_version >= "3.8" and python_version < "3.12" +rpds-py==0.16.2 ; python_version >= "3.8" and python_version < "3.12" rsa==4.9 ; python_version >= "3.8" and python_version < "3.12" ruamel-yaml-clib==0.2.8 ; platform_python_implementation == "CPython" and python_version < "3.12" and python_version >= "3.8" ruamel-yaml==0.18.5 ; python_version >= "3.8" and python_version < "3.12" s3fs==2023.12.2 ; python_version >= "3.8" and python_version < "3.12" schema-salad==8.5.20231201181309 ; python_version >= "3.8" and python_version < "3.12" setuptools-scm==5.0.2 ; python_version >= "3.8" and python_version < "3.12" -setuptools==69.0.2 ; python_version >= "3.8" and python_version < "3.12" +setuptools==69.0.3 ; python_version >= "3.8" and python_version < "3.12" shellescape==3.8.1 ; python_version >= "3.8" and python_version < "3.12" six==1.16.0 ; python_version >= "3.8" and python_version < "3.12" sniffio==1.3.0 ; python_version >= "3.8" and python_version < "3.12" @@ -197,7 +197,7 @@ tqdm==4.66.1 ; python_version >= "3.8" and python_version < "3.12" tuspy==1.0.3 ; python_version >= "3.8" and python_version < "3.12" tuswsgi==0.5.5 ; python_version >= "3.8" and python_version < "3.12" typing-extensions==4.9.0 ; python_version >= "3.8" and python_version < "3.12" -tzdata==2023.3 ; python_version >= "3.8" and python_version < "3.12" +tzdata==2023.4 ; python_version >= "3.8" and python_version < "3.12" tzlocal==5.2 ; python_version >= "3.8" and python_version < "3.12" ubiquerg==0.6.3 ; python_version >= "3.8" and python_version < "3.12" urllib3==1.26.18 ; python_version >= "3.8" and python_version < "3.12" From 242f75ceec5871d32cd4505cedd4b1e4f69b703c Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Mon, 1 Jan 2024 11:13:27 +0200 Subject: [PATCH 2/3] Type fixes for starlette 0.34.0 Starlette removed some Any annotations in 0.34.0. Issue tracked in https://github.com/abersheeran/a2wsgi/issues/44 --- lib/galaxy/webapps/galaxy/api/__init__.py | 6 +++--- lib/galaxy/webapps/galaxy/fast_app.py | 2 +- lib/galaxy/webapps/reports/fast_app.py | 3 ++- lib/tool_shed/webapp/fast_app.py | 3 ++- test/unit/webapps/test_send_file.py | 3 ++- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/lib/galaxy/webapps/galaxy/api/__init__.py b/lib/galaxy/webapps/galaxy/api/__init__.py index 93b4fa0b9da3..267f483115cd 100644 --- a/lib/galaxy/webapps/galaxy/api/__init__.py +++ b/lib/galaxy/webapps/galaxy/api/__init__.py @@ -8,7 +8,6 @@ Any, AsyncGenerator, cast, - MutableMapping, NamedTuple, Optional, Tuple, @@ -21,6 +20,7 @@ ) from a2wsgi.wsgi import build_environ +from a2wsgi.wsgi_typing import Environ from fastapi import ( APIRouter, Form, @@ -205,7 +205,7 @@ class GalaxyASGIRequest(GalaxyAbstractRequest): def __init__(self, request: Request): self.__request = request - self.__environ: Optional[MutableMapping[str, Any]] = None + self.__environ: Optional[Environ] = None @property def base(self) -> str: @@ -224,7 +224,7 @@ def host(self) -> str: return self.__request.base_url.netloc @property - def environ(self) -> MutableMapping[str, Any]: + def environ(self) -> Environ: """ Fallback WSGI environ. diff --git a/lib/galaxy/webapps/galaxy/fast_app.py b/lib/galaxy/webapps/galaxy/fast_app.py index 792a0a5f56d0..5ad703bd10dd 100644 --- a/lib/galaxy/webapps/galaxy/fast_app.py +++ b/lib/galaxy/webapps/galaxy/fast_app.py @@ -181,7 +181,7 @@ def initialize_fast_app(gx_wsgi_webapp, gx_app): include_legacy_openapi(app, gx_app) wsgi_handler = WSGIMiddleware(gx_wsgi_webapp) gx_app.haltables.append(("WSGI Middleware threadpool", wsgi_handler.executor.shutdown)) - app.mount("/", wsgi_handler) + app.mount("/", wsgi_handler) # type: ignore[arg-type] if gx_app.config.galaxy_url_prefix != "/": parent_app = FastAPI() parent_app.mount(gx_app.config.galaxy_url_prefix, app=app) diff --git a/lib/galaxy/webapps/reports/fast_app.py b/lib/galaxy/webapps/reports/fast_app.py index fb343e528f89..73d663bbc7b9 100644 --- a/lib/galaxy/webapps/reports/fast_app.py +++ b/lib/galaxy/webapps/reports/fast_app.py @@ -22,5 +22,6 @@ def initialize_fast_app(gx_webapp): add_request_id_middleware(app) include_all_package_routers(app, "galaxy.webapps.reports.api") wsgi_handler = WSGIMiddleware(gx_webapp) - app.mount("/", wsgi_handler) + # https://github.com/abersheeran/a2wsgi/issues/44 + app.mount("/", wsgi_handler) # type: ignore[arg-type] return app diff --git a/lib/tool_shed/webapp/fast_app.py b/lib/tool_shed/webapp/fast_app.py index d4429255017e..ba094c74ec2c 100644 --- a/lib/tool_shed/webapp/fast_app.py +++ b/lib/tool_shed/webapp/fast_app.py @@ -193,7 +193,8 @@ def mount_static(directory: Path): include_all_package_routers(app, routes_package) wsgi_handler = WSGIMiddleware(gx_webapp) tool_shed_app.haltables.append(("WSGI Middleware threadpool", wsgi_handler.executor.shutdown)) - app.mount("/", wsgi_handler) + # https://github.com/abersheeran/a2wsgi/issues/44 + app.mount("/", wsgi_handler) # type: ignore[arg-type] return app diff --git a/test/unit/webapps/test_send_file.py b/test/unit/webapps/test_send_file.py index 4736e3703293..1130e6c8804c 100644 --- a/test/unit/webapps/test_send_file.py +++ b/test/unit/webapps/test_send_file.py @@ -29,7 +29,8 @@ def wsgi_application(env, start_response): return send_file(start_response, trans, fh) app = FastAPI() - app.mount("/test/send_file", WSGIMiddleware(wsgi_application)) + # https://github.com/abersheeran/a2wsgi/issues/44 + app.mount("/test/send_file", WSGIMiddleware(wsgi_application)) # type: ignore[arg-type] return app From 68211090e632f28b3911d77be6255cb8fb56ee72 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Mon, 1 Jan 2024 10:07:30 +0200 Subject: [PATCH 3/3] Skip test when ftp.gnu.org not available --- test/unit/files/test_ftp.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/test/unit/files/test_ftp.py b/test/unit/files/test_ftp.py index 55b63944dc01..0a8d3018344d 100644 --- a/test/unit/files/test_ftp.py +++ b/test/unit/files/test_ftp.py @@ -1,5 +1,8 @@ import os +import pytest +from fs.errors import RemoteConnectionError + from ._util import ( assert_realizes_contains, configured_file_sources, @@ -19,12 +22,15 @@ def test_file_source_ftp_specific(): assert file_source_pair.path == test_url assert file_source_pair.file_source.id == "test1" - assert_realizes_contains( - file_sources, - test_url, - "This is ftp.gnu.org, the FTP server of the the GNU project.", - user_context=user_context, - ) + try: + assert_realizes_contains( + file_sources, + test_url, + "This is ftp.gnu.org, the FTP server of the the GNU project.", + user_context=user_context, + ) + except RemoteConnectionError: + pytest.skip("ftp.gnu.org not available") def test_file_source_ftp_generic():