Skip to content

Commit 12f74d8

Browse files
n8henrie1st1
authored andcommitted
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.
1 parent 32efcd1 commit 12f74d8

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
@@ -1533,6 +1533,7 @@ def connect():
15331533
self.assertEqual(5, proto.nbytes)
15341534

15351535
os.close(slave)
1536+
proto.transport.close()
15361537
self.loop.run_until_complete(proto.done)
15371538
self.assertEqual(
15381539
['INITIAL', 'CONNECTED', 'EOF', 'CLOSED'], proto.state)

Misc/ACKS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,7 @@ Thomas Heller
614614
Malte Helmert
615615
Lance Finn Helsten
616616
Jonathan Hendry
617+
Nathan Henrie
617618
Michael Henry
618619
James Henstridge
619620
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)