[Python-checkins] bpo-32517: fix test_read_pty_output() hangs on macOS 10.13.2+ (GH-6037)
Miss Islington (bot)
webhook-mailer at python.org
Fri Mar 9 13:14:19 EST 2018
https://github.com/python/cpython/commit/3c39beb65d003b209a98a79af4aaf94ba16d0d29
commit: 3c39beb65d003b209a98a79af4aaf94ba16d0d29
branch: 3.7
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2018-03-09T10:14:14-08:00
summary:
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 12f74d8608c15cacd9d5786524e2be9ca36f007e)
Co-authored-by: Nathan Henrie <n8henrie at users.noreply.github.com>
files:
A Misc/NEWS.d/next/Tests/2018-03-09-07-05-12.bpo-32517.ugc1iW.rst
M Lib/test/test_asyncio/test_events.py
M Misc/ACKS
diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py
index 6accbdae8b3e..f8bb01bd4e72 100644
--- a/Lib/test/test_asyncio/test_events.py
+++ b/Lib/test/test_asyncio/test_events.py
@@ -1502,6 +1502,7 @@ def test_read_pty_output(self):
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)
diff --git a/Misc/ACKS b/Misc/ACKS
index d598520e9385..b0a9136170d6 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -628,6 +628,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
index 000000000000..43f148f06ecb
--- /dev/null
+++ b/Misc/NEWS.d/next/Tests/2018-03-09-07-05-12.bpo-32517.ugc1iW.rst
@@ -0,0 +1,2 @@
+Fix failing ``test_asyncio`` on macOS 10.12.2+ due to transport of
+``KqueueSelector`` loop was not being closed.
More information about the Python-checkins
mailing list