Skip to content

Commit 3c39beb

Browse files
bpo-32517: fix test_read_pty_output() hangs on macOS 10.13.2+ (GH-6037)
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. (cherry picked from commit 12f74d8) Co-authored-by: Nathan Henrie <[email protected]>
1 parent 8c163bb commit 3c39beb

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

Lib/test/test_asyncio/test_events.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1502,6 +1502,7 @@ async def connect():
15021502
self.assertEqual(5, proto.nbytes)
15031503

15041504
os.close(slave)
1505+
proto.transport.close()
15051506
self.loop.run_until_complete(proto.done)
15061507
self.assertEqual(
15071508
['INITIAL', 'CONNECTED', 'EOF', 'CLOSED'], proto.state)

Misc/ACKS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,7 @@ Thomas Heller
628628
Malte Helmert
629629
Lance Finn Helsten
630630
Jonathan Hendry
631+
Nathan Henrie
631632
Michael Henry
632633
James Henstridge
633634
Kasun Herath
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fix failing ``test_asyncio`` on macOS 10.12.2+ due to transport of
2+
``KqueueSelector`` loop was not being closed.

0 commit comments

Comments
 (0)