]> granicus.if.org Git - python/commitdiff
bpo-32517: fix test_read_pty_output() hangs on macOS 10.13.2+ (GH-6037)
authorNathan Henrie <n8henrie@users.noreply.github.com>
Fri, 9 Mar 2018 17:43:45 +0000 (10:43 -0700)
committerYury Selivanov <yury@magic.io>
Fri, 9 Mar 2018 17:43:45 +0000 (12:43 -0500)
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.

Lib/test/test_asyncio/test_events.py
Misc/ACKS
Misc/NEWS.d/next/Tests/2018-03-09-07-05-12.bpo-32517.ugc1iW.rst [new file with mode: 0644]

index 27781a2d91b336de08a18d2d16afc8851848c741..2c4629ab49246639ffd869d2d8a44ecfbd03a109 100644 (file)
@@ -1533,6 +1533,7 @@ class EventLoopTestsMixin:
         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)
index 9403e110675aeb93c1fa648c85a0f4a5cc5cbcf0..b2033ee9d3f388da1844f4182d8a3c7d286bf5cf 100644 (file)
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -614,6 +614,7 @@ Thomas Heller
 Malte Helmert
 Lance Finn Helsten
 Jonathan Hendry
+Nathan Henrie
 Michael Henry
 James Henstridge
 Kasun Herath
diff --git a/Misc/NEWS.d/next/Tests/2018-03-09-07-05-12.bpo-32517.ugc1iW.rst b/Misc/NEWS.d/next/Tests/2018-03-09-07-05-12.bpo-32517.ugc1iW.rst
new file mode 100644 (file)
index 0000000..43f148f
--- /dev/null
@@ -0,0 +1,2 @@
+Fix failing ``test_asyncio`` on macOS 10.12.2+ due to transport of
+``KqueueSelector`` loop was not being closed.