Skip to content

Remove option to not support readline(size) #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions proposal.rst
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ the following methods:
Method Stream Notes
=================== ========== ========
``read(size)`` ``input`` 1
``readline()`` ``input`` 1, 2
``readline(hint)`` ``input`` 1, 2
``readlines(hint)`` ``input`` 1, 3
``__iter__()`` ``input``
``flush()`` ``errors`` 4
Expand All @@ -749,16 +749,10 @@ 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.
2. Servers **must** support the optional "size" argument to ``readline()``.

(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!)

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
Expand Down