Skip to content

Revert "bpo-36802: Drop awrite()/aclose(), support await write() and await close() instead (#13099)" #13316

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented May 14, 2019

@vstinner
Copy link
Member Author

This revert is an attempt to fix https://bugs.python.org/issue36870 regression.

@vstinner
Copy link
Member Author

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.

@asvetlov
Copy link
Contributor

Please take a look on #13313
I believe it has a proper fix for messages generated by test_drain_raises()

@vstinner
Copy link
Member Author

I merged PR #13313 instead.

@vstinner vstinner closed this May 14, 2019
@vstinner vstinner deleted the revert_aclose branch May 14, 2019 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants