diff --git a/lib/galaxy/dependencies/dev-requirements.txt b/lib/galaxy/dependencies/dev-requirements.txt index 1513ba45325..e809b654c97 100644 --- a/lib/galaxy/dependencies/dev-requirements.txt +++ b/lib/galaxy/dependencies/dev-requirements.txt @@ -1,5 +1,6 @@ --extra-index-url https://wheels.galaxyproject.org/simple +a2wsgi==1.4.0; python_version >= "3.6" and python_version < "4.0" adal==1.2.7 aiofiles==0.8.0; python_version >= "3.6" and python_version < "4.0" alabaster==0.7.12; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6" diff --git a/lib/galaxy/dependencies/pinned-requirements.txt b/lib/galaxy/dependencies/pinned-requirements.txt index 1aaed9f9450..1ac221dfb5b 100644 --- a/lib/galaxy/dependencies/pinned-requirements.txt +++ b/lib/galaxy/dependencies/pinned-requirements.txt @@ -1,5 +1,6 @@ --extra-index-url https://wheels.galaxyproject.org/simple +a2wsgi==1.4.0; python_version >= "3.6" and python_version < "4.0" adal==1.2.7 aiofiles==0.8.0; python_version >= "3.6" and python_version < "4.0" amqp==5.0.9; python_version >= "3.7" diff --git a/lib/galaxy/webapps/galaxy/fast_app.py b/lib/galaxy/webapps/galaxy/fast_app.py index ebb28541572..ca99572d429 100644 --- a/lib/galaxy/webapps/galaxy/fast_app.py +++ b/lib/galaxy/webapps/galaxy/fast_app.py @@ -1,8 +1,8 @@ from pathlib import Path from typing import cast +from a2wsgi import WSGIMiddleware from fastapi import FastAPI, Request -from fastapi.middleware.wsgi import WSGIMiddleware from starlette.middleware.cors import CORSMiddleware from starlette.responses import ( FileResponse, diff --git a/lib/galaxy/webapps/reports/fast_app.py b/lib/galaxy/webapps/reports/fast_app.py index f5affed37a9..e03fb02fdd3 100644 --- a/lib/galaxy/webapps/reports/fast_app.py +++ b/lib/galaxy/webapps/reports/fast_app.py @@ -1,5 +1,5 @@ +from a2wsgi import WSGIMiddleware from fastapi import FastAPI -from fastapi.middleware.wsgi import WSGIMiddleware from galaxy.webapps.base.api import ( add_exception_handler, diff --git a/lib/tool_shed/webapp/fast_app.py b/lib/tool_shed/webapp/fast_app.py index 2d0c70d4d97..9fef316b764 100644 --- a/lib/tool_shed/webapp/fast_app.py +++ b/lib/tool_shed/webapp/fast_app.py @@ -1,5 +1,5 @@ +from a2wsgi import WSGIMiddleware from fastapi import FastAPI -from fastapi.middleware.wsgi import WSGIMiddleware from galaxy.webapps.base.api import ( add_exception_handler, diff --git a/packages/webapps/requirements.txt b/packages/webapps/requirements.txt index 7a195cd8db1..a6c4c554e94 100644 --- a/packages/webapps/requirements.txt +++ b/packages/webapps/requirements.txt @@ -1,3 +1,4 @@ +a2wsgi galaxy-app Cheetah3 fastapi>=0.68.2,!=0.69.0,!=0.70.0,!=0.70.1 diff --git a/pyproject.toml b/pyproject.toml index f0cc84f1e01..09114e68eec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,6 +14,7 @@ name = "galaxyproject" url = "https://wheels.galaxyproject.org/simple" [tool.poetry.dependencies] +a2wsgi = "*" aiofiles = "*" Babel = "*" bdbag = "*" diff --git a/test/unit/webapps/test_send_file.py b/test/unit/webapps/test_send_file.py index 2ee0bdd248c..755ce16a120 100644 --- a/test/unit/webapps/test_send_file.py +++ b/test/unit/webapps/test_send_file.py @@ -1,8 +1,8 @@ import tempfile import pytest +from a2wsgi import WSGIMiddleware from fastapi.applications import FastAPI -from fastapi.middleware.wsgi import WSGIMiddleware from fastapi.testclient import TestClient from galaxy.util.bunch import Bunch