- 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 :
importasynciofromasyncio.subprocessimportPIPEimportuvloopimportlogginglogging.basicConfig(level=logging.DEBUG)
asyncdefmain():
proc=awaitasyncio.create_subprocess_exec("/bin/cat", stdin=PIPE, stderr=PIPE, stdout=PIPE)
stdin=b'x'*65_537stdout, stderr=awaitproc.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
PYTHONASYNCIODEBUGin env?: yesThe following code never returns with uvloop :
changing 65_537 to 65_536 makes the script work as expected and returns immediately.
The debug output is :