forked from encode/uvicorn
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove
asgiref
dependency (encode#1532)
* Remove `asgiref` dependency * Format debug.py * Add missing string annotations
- Loading branch information
Showing
18 changed files
with
237 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
-e .[standard] | ||
|
||
# Type annotation | ||
asgiref==3.5.2 | ||
|
||
# Explicit optionals | ||
wsproto==1.1.0 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,20 @@ | ||
from asgiref.typing import ( | ||
ASGI2Application, | ||
ASGIReceiveCallable, | ||
ASGISendCallable, | ||
Scope, | ||
) | ||
import typing | ||
|
||
if typing.TYPE_CHECKING: | ||
from asgiref.typing import ( | ||
ASGI2Application, | ||
ASGIReceiveCallable, | ||
ASGISendCallable, | ||
Scope, | ||
) | ||
|
||
|
||
class ASGI2Middleware: | ||
def __init__(self, app: ASGI2Application): | ||
def __init__(self, app: "ASGI2Application"): | ||
self.app = app | ||
|
||
async def __call__( | ||
self, scope: Scope, receive: ASGIReceiveCallable, send: ASGISendCallable | ||
self, scope: "Scope", receive: "ASGIReceiveCallable", send: "ASGISendCallable" | ||
) -> None: | ||
instance = self.app(scope) | ||
await instance(receive, send) |
Oops, something went wrong.