[New-bugs-announce] [issue36889] Merge StreamWriter and StreamReader into just asyncio.Stream

Andrew Svetlov report at bugs.python.org
Sat May 11 14:15:14 EDT 2019


New submission from Andrew Svetlov <andrew.svetlov at gmail.com>:

The separation was a bad idea, sorry. Both classes are coupled too much.
1. Writer should know about the reader to make `drain()` work
2. Reader has no .close() method.

The idea is: 
1. Merge StreamReader and StreamWriter into just a Stream.
2. The Stream should support three modes: readonly, writeonly, readwrite.
3. Keep StreamReader/StreamWriter but deprecate these classes.
4. Replace all asyncio internals to use Stream class.

----------
components: asyncio
messages: 342212
nosy: asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: Merge StreamWriter and StreamReader into just asyncio.Stream
versions: Python 3.8

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


More information about the New-bugs-announce mailing list