From f41435fae375e91e4eef4c00526445604e0d3bbe Mon Sep 17 00:00:00 2001 From: tomaszdrozdz Date: Mon, 19 Oct 2020 10:12:20 +0200 Subject: [PATCH 1/2] Improving documentation. --- docs/sanic/static_files.rst | 2 +- sanic/exceptions.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/sanic/static_files.rst b/docs/sanic/static_files.rst index 1c93a682..bef5f6fb 100644 --- a/docs/sanic/static_files.rst +++ b/docs/sanic/static_files.rst @@ -88,5 +88,5 @@ When `stream_large_files` is `True`, Sanic will use `file_stream()` instead of ` app = Sanic(__name__) - chunk_size = 1024 * 1024 * 8 # Set chunk size to 8KB + chunk_size = 1024 * 1024 * 8 # Set chunk size to 8MiB app.static('/large_video.mp4', '/home/ubuntu/large_video.mp4', stream_large_files=chunk_size) diff --git a/sanic/exceptions.py b/sanic/exceptions.py index 000b9e76..8c747f60 100644 --- a/sanic/exceptions.py +++ b/sanic/exceptions.py @@ -175,8 +175,8 @@ def abort(status_code, message=None): message appropriate for the given status code, unless provided. :param status_code: The HTTP status code to return. - :param message: The HTTP response body. Defaults to the messages - in response.py for the given status code. + :param message: The HTTP response body. Defaults to the messages in + STATUS_CODES from sanic.helpers for the given status code. """ if message is None: message = STATUS_CODES.get(status_code) From 4ca3e98082b58e019c5b3624d19505de442251a4 Mon Sep 17 00:00:00 2001 From: Ashley Sommer Date: Mon, 26 Oct 2020 05:31:34 +1000 Subject: [PATCH 2/2] Add `pytest-dependency` requirement to tests_require list in setup.py (#1955) Co-authored-by: Adam Hopkins --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index f0351b91..3a44fb5a 100644 --- a/setup.py +++ b/setup.py @@ -96,6 +96,7 @@ tests_require = [ "pytest-sanic", "pytest-sugar", "pytest-benchmark", + "pytest-dependency", ] docs_require = [