[Python-checkins] cpython: Fix asyncio issue #19293 (hangs on AIX).
guido.van.rossum
python-checkins at python.org
Tue Oct 22 06:29:20 CEST 2013
http://hg.python.org/cpython/rev/c2e018c54689
changeset: 86560:c2e018c54689
user: Guido van Rossum <guido at dropbox.com>
date: Mon Oct 21 21:28:45 2013 -0700
summary:
Fix asyncio issue #19293 (hangs on AIX).
files:
Lib/test/test_asyncio/test_events.py | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py
--- a/Lib/test/test_asyncio/test_events.py
+++ b/Lib/test/test_asyncio/test_events.py
@@ -887,9 +887,6 @@
@unittest.skipUnless(sys.platform != 'win32',
"Don't support pipes for Windows")
- # Issue #19293
- @unittest.skipIf(sys.platform.startswith("aix"),
- 'cannot be interrupted with signal on AIX')
def test_write_pipe_disconnect_on_close(self):
proto = None
transport = None
@@ -899,8 +896,8 @@
proto = MyWritePipeProto(loop=self.loop)
return proto
- rpipe, wpipe = os.pipe()
- pipeobj = io.open(wpipe, 'wb', 1024)
+ rsock, wsock = self.loop._socketpair()
+ pipeobj = io.open(wsock.detach(), 'wb', 1024)
@tasks.coroutine
def connect():
@@ -916,11 +913,10 @@
self.assertEqual('CONNECTED', proto.state)
transport.write(b'1')
- test_utils.run_briefly(self.loop)
- data = os.read(rpipe, 1024)
+ data = self.loop.run_until_complete(self.loop.sock_recv(rsock, 1024))
self.assertEqual(b'1', data)
- os.close(rpipe)
+ rsock.close()
self.loop.run_until_complete(proto.done)
self.assertEqual('CLOSED', proto.state)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list