sanic/sanic
Ashley Sommer 30e6a310f1 Pausable response streams (#1179)
* This commit adds handlers for the asyncio/uvloop protocol callbacks for pause_writing and resume_writing.
These are needed for the correct functioning of built-in tcp flow-control provided by uvloop and asyncio.
This is somewhat of a breaking change, because the `write` function in user streaming callbacks now must be `await`ed.
This is necessary because it is possible now that the http protocol may be paused, and any calls to write may need to wait on an async event to be called to become unpaused.

Updated examples and tests to reflect this change.

This change does not apply to websocket connections. A change to websocket connections may be required to match this change.

* Fix a couple of PEP8 errors caused by previous rebase.

* update docs

add await syntax to response.write in response-streaming docs.

* remove commented out code from a test file
2018-08-18 18:12:13 -07:00
..
__init__.py Increment to 0.8.0 2018-08-17 11:43:15 -07:00
__main__.py fix flake8 2017-09-13 07:40:42 -07:00
app.py Merge pull request #1278 from ashleysommer/graceful_cancel 2018-08-17 11:41:39 -07:00
blueprints.py Add blueprint groups + nesting 2018-01-18 17:20:51 -08:00
config.py fixed #1143 (#1276) 2018-08-15 10:23:04 -07:00
constants.py Add a pesky newline 2017-01-27 22:15:34 -06:00
cookies.py Fix response ci header (#1244) 2018-07-11 01:44:21 -07:00
exceptions.py HTTP Entity Headers (#1127) 2018-06-26 22:25:25 -07:00
handlers.py close #1136 2018-02-21 00:50:27 +01:00
http.py HTTP Entity Headers (#1127) 2018-06-26 22:25:25 -07:00
log.py fixing small issue 2017-09-13 10:35:34 -07:00
reloader_helpers.py Fix auto_reload in Linux (#1286) 2018-08-16 23:30:03 -07:00
request.py Add url_bytes to Request (#1258) 2018-07-16 12:13:27 -07:00
response.py Pausable response streams (#1179) 2018-08-18 18:12:13 -07:00
router.py add UUID support (#1241) 2018-06-09 01:16:17 -07:00
server.py Pausable response streams (#1179) 2018-08-18 18:12:13 -07:00
static.py Add content_type flag to Sanic.static (#1267) 2018-07-20 22:31:15 -07:00
testing.py default to auto_reload in debug mode (#1159) 2018-04-01 20:52:56 -07:00
views.py is_request_stream for CompositionView and HTTPMethodView 2017-05-09 01:04:03 +09:00
websocket.py Extend WebSocketProtocol arguments to accept all arguments of websockets.protocol.WebSocketCommonProtocol 2018-02-01 16:23:10 +01:00
worker.py py37 (#1256) 2018-07-03 22:07:08 -07:00