From 4ac65a1719dfea7996b67b02b9a13826f02fdac7 Mon Sep 17 00:00:00 2001 From: Cory Benfield Date: Thu, 11 Feb 2016 14:38:42 +0000 Subject: [PATCH 1/2] Remove option to not support readline(size) --- proposal.rst | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/proposal.rst b/proposal.rst index cb0833e..b42192c 100644 --- a/proposal.rst +++ b/proposal.rst @@ -726,7 +726,7 @@ the following methods: Method Stream Notes =================== ========== ======== ``read(size)`` ``input`` 1 -``readline()`` ``input`` 1, 2 +``readline(size)`` ``input`` 1, 2 ``readlines(hint)`` ``input`` 1, 3 ``__iter__()`` ``input`` ``flush()`` ``errors`` 4 @@ -749,13 +749,7 @@ Reference, except for these notes as listed in the table above: A server **should** return empty bytestrings from any attempt to read from an empty or exhausted input stream. -2. Servers **should** support the optional "size" argument to ``readline()``, - but as in WSGI 1.0, they are allowed to omit support for it. - - (In WSGI 1.0, the size argument was not supported, on the grounds that - it might have been complex to implement, and was not often used in - practice... but then the ``cgi`` module started using it, and so - practical servers had to start supporting it anyway!) +2. Servers **must** support the optional "size" argument to ``readline()``. 3. Note that the ``hint`` argument to ``readlines()`` is optional for both caller and implementer. The application is free not to From 990802637be381568e29c6058284335b038efd12 Mon Sep 17 00:00:00 2001 From: Cory Benfield Date: Sun, 14 Feb 2016 09:05:58 +0000 Subject: [PATCH 2/2] size -> hint --- proposal.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/proposal.rst b/proposal.rst index b42192c..df34fd7 100644 --- a/proposal.rst +++ b/proposal.rst @@ -726,7 +726,7 @@ the following methods: Method Stream Notes =================== ========== ======== ``read(size)`` ``input`` 1 -``readline(size)`` ``input`` 1, 2 +``readline(hint)`` ``input`` 1, 2 ``readlines(hint)`` ``input`` 1, 3 ``__iter__()`` ``input`` ``flush()`` ``errors`` 4 @@ -751,8 +751,8 @@ Reference, except for these notes as listed in the table above: 2. Servers **must** support the optional "size" argument to ``readline()``. -3. Note that the ``hint`` argument to ``readlines()`` is optional for - both caller and implementer. The application is free not to +3. Note that the ``hint`` argument to ``readline()`` and ``readlines()`` is + optional for both caller and implementer. The application is free not to supply it, and the server or gateway is free to ignore it. 4. Since the ``errors`` stream may not be rewound, servers and gateways