New submission from Laurent Peuch <pyt...@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@python
components: Documentation, asyncio
messages: 324873
nosy: asvetlov, docs@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue34613>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to