[docs] [issue34613] asyncio.StreamReader initialization documentation incorrectly declare limit as None

Laurent Peuch report at bugs.python.org
Sun Sep 9 03:00:39 EDT 2018


New submission from Laurent Peuch <python at worlddomination.be>:

asyncio.StreamReader documentation incorrectly declare its initialization argument "limit" to be "None" by default https://docs.python.org/3/library/asyncio-stream.html#asyncio.StreamReader

In the source code it is set to _DEFAULT_LIMIT https://github.com/python/cpython/blob/0afada163c7ef25c3a9d46ed445481fb69f2ecaf/Lib/asyncio/streams.py#L353 

_DEFAULT_LIMIT is set to "2 ** 16 # 64 KiB" https://github.com/python/cpython/blob/0afada163c7ef25c3a9d46ed445481fb69f2ecaf/Lib/asyncio/streams.py#L19

This information is especially needed when you get the exception "asyncio.streams.LimitOverrunError: Separator is not found, and chunk exceed the limit" and want to increase the limit, but you don't have the initial value and you have to look at the source code to get it.

PS: this is my first ticket, I don't know if I should have open one for such a minor detail in the documentation

----------
assignee: docs at python
components: Documentation, asyncio
messages: 324873
nosy: asvetlov, docs at python, psycojoker, yselivanov
priority: normal
severity: normal
status: open
title: asyncio.StreamReader initialization documentation incorrectly declare limit as None
type: enhancement
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34613>
_______________________________________


More information about the docs mailing list