Closed
Description
- uvloop version: uvloop==0.14.0
- Python version: Python 3.8.6
- Platform: MacOS
- Can you reproduce the bug with
PYTHONASYNCIODEBUG
in env?: yes - Does uvloop behave differently from vanilla asyncio? How?: yes. vanilla asyncio just works
The following code never returns with uvloop :
import asyncio
from asyncio.subprocess import PIPE
import uvloop
import logging
logging.basicConfig(level=logging.DEBUG)
async def main():
proc = await asyncio.create_subprocess_exec("/bin/cat", stdin=PIPE, stderr=PIPE, stdout=PIPE)
stdin = b'x' * 65_537
stdout, stderr = await proc.communicate(stdin)
print(stdout)
uvloop.install()
asyncio.run(main())
changing 65_537 to 65_536 makes the script work as expected and returns immediately.
The debug output is :
% PYTHONASYNCIODEBUG=1 python xxx.py
DEBUG:asyncio:<Process 13746> communicate: feed stdin (65537 bytes)
DEBUG:asyncio:<Process 13746> communicate: close stdin
DEBUG:asyncio:<Process 13746> communicate: read stdout
DEBUG:asyncio:<Process 13746> communicate: read stderr
Metadata
Metadata
Assignees
Labels
No labels