Skip to content
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

[3.7] Revert "bpo-36801: Fix waiting in StreamWriter.drain for closing SSL transport (GH-13098)" #13328

Merged
merged 1 commit into from
May 14, 2019
Merged

[3.7] Revert "bpo-36801: Fix waiting in StreamWriter.drain for closing SSL transport (GH-13098)" #13328

merged 1 commit into from
May 14, 2019

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented May 14, 2019

@vstinner vstinner changed the title Revert "bpo-36801: Fix waiting in StreamWriter.drain for closing SSL transport (GH-13098)" [3.7] Revert "bpo-36801: Fix waiting in StreamWriter.drain for closing SSL transport (GH-13098)" May 14, 2019
@vstinner
Copy link
Member Author

The revert is motivated by https://bugs.python.org/issue36870 : test_asyncio fails randomly which causes a lot of pain in the Python CI and the Python workflow. See:
https://bugs.python.org/issue36870#msg342509

@asvetlov
Copy link
Contributor

asvetlov commented May 14, 2019

I guess the reversion PR should be backported to 3.7 as well

UPD.
Sorry, I mean master.

This PR is a reversion for #13176 on 3.7
#13098 should be reverted on the master too

@vstinner
Copy link
Member Author

I guess the reversion PR should be backported to 3.7 as well

This revert is for Python 3.7.

@asvetlov
Copy link
Contributor

Sorry, I mean the same code should be reverted on the master too

@vstinner
Copy link
Member Author

Without this change, I easily reproduce the failure on Windows:

vstinner@WIN C:\vstinner\python\3.7>python -m test test_asyncio -m test_drain_raises -v
(...)
test_drain_raises (test.test_asyncio.test_streams.StreamTests) ... Warning -- threading_cleanup() failed to cleanup 0 threads (count: 0, dangling: 2)     
Dangling thread: <Thread(Thread-1, stopped daemon 1568)>
Dangling thread: <_MainThread(MainThread, started 1244)>
ERROR

======================================================================
ERROR: test_drain_raises (test.test_asyncio.test_streams.StreamTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\vstinner\python\3.7\lib\test\test_asyncio\test_streams.py", line 820, in test_drain_raises
    self.loop.run_until_complete(client(*addr))
  File "C:\vstinner\python\3.7\lib\asyncio\base_events.py", line 584, in run_until_complete
    return future.result()
  File "C:\vstinner\python\3.7\lib\test\test_asyncio\test_streams.py", line 810, in client
    await writer.drain()
  File "C:\vstinner\python\3.7\lib\asyncio\streams.py", line 351, in drain
    await fut
  File "C:\vstinner\python\3.7\lib\asyncio\selector_events.py", line 860, in write
    n = self._sock.send(data)
ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine
(...)

With this change, the test pass as expected:

vstinner@WIN C:\vstinner\python\3.7>python -m test test_asyncio -m test_drain_raises -v
(...)
test_drain_raises (test.test_asyncio.test_streams.StreamTests) ... ok
(...)
Tests result: SUCCESS

@vstinner vstinner merged commit c647ad9 into python:3.7 May 14, 2019
@vstinner vstinner deleted the revert_asyncio_ssl37 branch May 14, 2019 20:30
@asvetlov
Copy link
Contributor

Cool!
Sorry for making troubles :(

@vstinner
Copy link
Member Author

Sorry, I mean the same code should be reverted on the master too

Well, I don't know yet if PR #13313 fixed https://bugs.python.org/issue36870 on master. Anyway, I created PR #13329 for master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants