Skip to content

Commit

Permalink
bpo-32517: fix test_read_pty_output() hangs on macOS 10.13.2+ (GH-6037)
Browse files Browse the repository at this point in the history
test_asyncio hangs indefinitely on macOS 10.13.2+ on `read_pty_output()`
using the KqueueSelector. Closing `proto.transport` (as is done in
`write_pty_output()`) seems to fix it.
  • Loading branch information
n8henrie authored and 1st1 committed Mar 9, 2018
1 parent 32efcd1 commit 12f74d8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions Lib/test/test_asyncio/test_events.py
Expand Up @@ -1533,6 +1533,7 @@ def connect():
self.assertEqual(5, proto.nbytes)

os.close(slave)
proto.transport.close()
self.loop.run_until_complete(proto.done)
self.assertEqual(
['INITIAL', 'CONNECTED', 'EOF', 'CLOSED'], proto.state)
Expand Down
1 change: 1 addition & 0 deletions Misc/ACKS
Expand Up @@ -614,6 +614,7 @@ Thomas Heller
Malte Helmert
Lance Finn Helsten
Jonathan Hendry
Nathan Henrie
Michael Henry
James Henstridge
Kasun Herath
Expand Down
@@ -0,0 +1,2 @@
Fix failing ``test_asyncio`` on macOS 10.12.2+ due to transport of
``KqueueSelector`` loop was not being closed.

0 comments on commit 12f74d8

Please sign in to comment.