Revert "bpo-36802: Drop awrite()/aclose(), support await write() and await close() instead (#13099)" by vstinner · Pull Request #13316 · python/cpython (original) (raw)
Without this change, python -m test test_asyncio -m test_drain_raises -v pass but logs a warning on my Windows VM:
test_drain_raises (test.test_asyncio.test_streams.StreamTests) ... Task exception was never retrieved
future: <Task finished name='Task-2' coro=<StreamWriter.drain() done, defined at C:\vstinner\python\master\lib\asyncio\streams.py:417> exception=ConnectionAbor
tedError(10053, 'An established connection was aborted by the software in your host machine', None, 10053, None)>
Traceback (most recent call last):
File "C:\vstinner\python\master\lib\asyncio\streams.py", line 434, in drain
await fut
File "C:\vstinner\python\master\lib\asyncio\proactor_events.py", line 370, in _loop_writing
self._write_fut = self._loop._proactor.send(self._sock, data)
File "C:\vstinner\python\master\lib\asyncio\windows_events.py", line 488, in send
ov.WSASend(conn.fileno(), buf, flags)
ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine
With this PR, it pass but doesn't log any warning.