Skip to content

Commit

Permalink
fix(api): solve warning related to Starlette's WSGIMiddleware class
Browse files Browse the repository at this point in the history
  • Loading branch information
bameda committed Sep 18, 2023
1 parent 6aa3f00 commit 632e7b5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions python/apps/taiga/requirements/commons.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
fastapi
pydantic[email,dotenv]<2.0
python-multipart
a2wsgi # WSGI to ASGI adapter
uvicorn[standard]
httpx

Expand Down
4 changes: 3 additions & 1 deletion python/apps/taiga/requirements/devel.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --config=pyproject.toml --resolver=backtracking requirements/devel.in
# pip-compile --config=pyproject.toml requirements/devel.in
#
a2wsgi==1.7.0
# via -r requirements/commons.in
aiopg==1.4.0
# via procrastinate
aiosmtplib==1.1.7
Expand Down
4 changes: 3 additions & 1 deletion python/apps/taiga/requirements/prod.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --config=pyproject.toml --resolver=backtracking requirements/prod.in
# pip-compile --config=pyproject.toml requirements/prod.in
#
a2wsgi==1.7.0
# via -r requirements/commons.in
aiopg==1.4.0
# via procrastinate
aiosmtplib==1.1.7
Expand Down
4 changes: 2 additions & 2 deletions python/apps/taiga/src/taiga/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#
# Copyright (c) 2023-present Kaleidos INC

from a2wsgi import WSGIMiddleware
from fastapi import FastAPI
from starlette.middleware.wsgi import WSGIMiddleware
from taiga.base.django.wsgi import application as django_app
from taiga.events import app as events_app
from taiga.events import connect_events_manager, disconnect_events_manager
Expand All @@ -28,4 +28,4 @@
app.on_event("shutdown")(disconnect_taskqueue_manager)

# Serve /media /admin and /static files urls
app.mount("/", WSGIMiddleware(django_app))
app.mount("/", WSGIMiddleware(django_app)) # type: ignore

0 comments on commit 632e7b5

Please sign in to comment.