Skip to content

Commit

Permalink
Fix wsgi dependency (#270)
Browse files Browse the repository at this point in the history
  • Loading branch information
tarsil authored Mar 7, 2024
1 parent 76168bc commit e028308
Show file tree
Hide file tree
Showing 13 changed files with 12 additions and 14 deletions.
2 changes: 1 addition & 1 deletion docs/references/middleware/middlewares.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ All the `Esmerald` native middlewares.

::: esmerald.middleware.GZipMiddleware

::: esmerald.middleware.WSGIMiddleware
::: esmerald.middleware.wsgi.WSGIMiddleware
2 changes: 1 addition & 1 deletion docs_src/middleware/available/wsgi.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from flask import Flask, make_response

from esmerald import Esmerald, Include
from esmerald.middleware import WSGIMiddleware
from esmerald.middleware.wsgi import WSGIMiddleware

flask = Flask(__name__)

Expand Down
2 changes: 1 addition & 1 deletion docs_src/routing/routes/solution3.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from flask import Flask, escape, request

from esmerald import Esmerald, Include
from esmerald.middleware import WSGIMiddleware
from esmerald.middleware.wsgi import WSGIMiddleware

flask_app = Flask(__name__)
another_flask_app = Flask(__name__)
Expand Down
2 changes: 1 addition & 1 deletion docs_src/wsgi/childesmerald.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from flask import Flask, escape, request

from esmerald import ChildEsmerald, Esmerald, Gateway, Include, Request, get
from esmerald.middleware import WSGIMiddleware
from esmerald.middleware.wsgi import WSGIMiddleware

flask_app = Flask(__name__)
second_flask_app = Flask(__name__)
Expand Down
2 changes: 1 addition & 1 deletion docs_src/wsgi/complex_routing.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from flask import Flask, escape, request

from esmerald import Esmerald, Gateway, Include, Request, get
from esmerald.middleware import WSGIMiddleware
from esmerald.middleware.wsgi import WSGIMiddleware

flask_app = Flask(__name__)
second_flask_app = Flask(__name__)
Expand Down
2 changes: 1 addition & 1 deletion docs_src/wsgi/esmerald.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from flask import Flask, escape, request

from esmerald import Esmerald, Gateway, Include, Request, get
from esmerald.middleware import WSGIMiddleware
from esmerald.middleware.wsgi import WSGIMiddleware

flask_app = Flask(__name__)
second_flask_app = Flask(__name__)
Expand Down
2 changes: 1 addition & 1 deletion docs_src/wsgi/multiple.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from flask import Flask, escape, request

from esmerald import Esmerald, Gateway, Include, Request, get
from esmerald.middleware import WSGIMiddleware
from esmerald.middleware.wsgi import WSGIMiddleware

flask_app = Flask(__name__)
second_flask_app = Flask(__name__)
Expand Down
2 changes: 1 addition & 1 deletion docs_src/wsgi/nested_routing.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from flask import Flask, escape, request

from esmerald import Esmerald, Gateway, Include, Request, get
from esmerald.middleware import WSGIMiddleware
from esmerald.middleware.wsgi import WSGIMiddleware

flask_app = Flask(__name__)

Expand Down
2 changes: 1 addition & 1 deletion docs_src/wsgi/simple_routing.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from flask import Flask, escape, request

from esmerald import Esmerald, Gateway, Include, Request, get
from esmerald.middleware import WSGIMiddleware
from esmerald.middleware.wsgi import WSGIMiddleware

flask_app = Flask(__name__)

Expand Down
2 changes: 0 additions & 2 deletions esmerald/middleware/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from .sessions import SessionMiddleware
from .settings_middleware import RequestSettingsMiddleware
from .trustedhost import TrustedHostMiddleware
from .wsgi import WSGIMiddleware

__all__ = [
"AsyncExitStackMiddleware",
Expand All @@ -21,5 +20,4 @@
"SessionMiddleware",
"RequestSettingsMiddleware",
"TrustedHostMiddleware",
"WSGIMiddleware",
]
2 changes: 1 addition & 1 deletion esmerald/routing/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -1606,7 +1606,7 @@ def __init__(
from flask import Flask, escape, request
from esmerald import Esmerald, Gateway, Include, Request, get
from esmerald.middleware import WSGIMiddleware
from esmerald.middleware.wsgi import WSGIMiddleware
flask_app = Flask(__name__)
Expand Down
2 changes: 1 addition & 1 deletion tests/middleware/test_wsgi_middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from markupsafe import escape

from esmerald import Esmerald, Gateway, Include, Request, get
from esmerald.middleware import WSGIMiddleware
from esmerald.middleware.wsgi import WSGIMiddleware
from esmerald.testclient import create_client

flask_app = Flask(__name__)
Expand Down
2 changes: 1 addition & 1 deletion tests/openapi/test_external_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from pydantic import BaseModel

from esmerald import JSON, Gateway, Include, get
from esmerald.middleware import WSGIMiddleware
from esmerald.middleware.wsgi import WSGIMiddleware
from esmerald.openapi.datastructures import OpenAPIResponse
from esmerald.testclient import create_client
from tests.settings import TestSettings
Expand Down

0 comments on commit e028308

Please sign in to comment.