Streaming migration for 20.3 release (#1800)

* Compatibility and deprecations for Sanic 20.3 in preparation of the streaming branch.

* Add test for new API.

* isort tests

* More coverage

* json takes str, not bytes

Co-authored-by: L. Kärkkäinen <tronic@users.noreply.github.com>
This commit is contained in:
L. Kärkkäinen
2020-03-24 19:11:09 +02:00
committed by GitHub
parent 60b4efad67
commit 4db075ffc1
3 changed files with 69 additions and 2 deletions

View File

@@ -15,6 +15,7 @@ from aiofiles import os as async_os
from sanic.response import (
HTTPResponse,
StreamingHTTPResponse,
empty,
file,
file_stream,
json,
@@ -22,7 +23,6 @@ from sanic.response import (
stream,
text,
)
from sanic.response import empty
from sanic.server import HttpProtocol
from sanic.testing import HOST, PORT