]> granicus.if.org Git - python/commitdiff
asyncio: sync with github asyncio
authorVictor Stinner <victor.stinner@gmail.com>
Thu, 9 Jul 2015 21:13:50 +0000 (23:13 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Thu, 9 Jul 2015 21:13:50 +0000 (23:13 +0200)
* queues: get coroutine from asyncio.coroutines, not from asyncio.tasks
* tets: replace tulip with asyncio in comments

Lib/asyncio/queues.py
Lib/test/test_asyncio/test_selector_events.py
Lib/test/test_asyncio/test_streams.py
Lib/test/test_asyncio/test_subprocess.py
Lib/test/test_asyncio/test_windows_events.py

index ed116620b4aed9b659fd73be987ef8fe4c337b6e..3b4dc21ab8641f97e1e7cbf3ce543bdff6505f5a 100644 (file)
@@ -9,7 +9,7 @@ import heapq
 from . import events
 from . import futures
 from . import locks
-from .tasks import coroutine
+from .coroutines import coroutine
 
 
 class QueueEmpty(Exception):
index 9478b954835dab3bec82d18bce3a5eb05b65ff3b..f0fcdd22ae626bd45855dd83e4176785fc6f52f3 100644 (file)
@@ -348,7 +348,7 @@ class BaseSelectorEventLoopTests(test_utils.TestCase):
             self.loop._sock_connect.call_args[0])
 
     def test_sock_connect_timeout(self):
-        # Tulip issue #205: sock_connect() must unregister the socket on
+        # asyncio issue #205: sock_connect() must unregister the socket on
         # timeout error
 
         # prepare mocks
index 2273049b81577c0ded9e200cd8a26e90ff58adb8..242b377eb46b095842eb24ad3126f91bfe765b4a 100644 (file)
@@ -580,7 +580,7 @@ class StreamReaderTests(test_utils.TestCase):
 
     @unittest.skipIf(sys.platform == 'win32', "Don't have pipes")
     def test_read_all_from_pipe_reader(self):
-        # See Tulip issue 168.  This test is derived from the example
+        # See asyncio issue 168.  This test is derived from the example
         # subprocess_attach_read_pipe.py, but we configure the
         # StreamReader's limit so that twice it is less than the size
         # of the data writter.  Also we must explicitly attach a child
@@ -621,7 +621,7 @@ os.close(fd)
         self.addCleanup(asyncio.set_event_loop, None)
         asyncio.set_event_loop(self.loop)
 
-        # Tulip issue #184: Ensure that StreamReaderProtocol constructor
+        # asyncio issue #184: Ensure that StreamReaderProtocol constructor
         # retrieves the current loop if the loop parameter is not set
         reader = asyncio.StreamReader()
         self.assertIs(reader._loop, self.loop)
@@ -630,7 +630,7 @@ os.close(fd)
         self.addCleanup(asyncio.set_event_loop, None)
         asyncio.set_event_loop(self.loop)
 
-        # Tulip issue #184: Ensure that StreamReaderProtocol constructor
+        # asyncio issue #184: Ensure that StreamReaderProtocol constructor
         # retrieves the current loop if the loop parameter is not set
         reader = mock.Mock()
         protocol = asyncio.StreamReaderProtocol(reader)
index 5ccdafb151f6871b61dc7e0736090b2be9790760..ea85e1912e8e409a3a7e59b667e8672d06f5dc6b 100644 (file)
@@ -266,7 +266,7 @@ class SubprocessMixin:
         self.assertTrue(transport.resume_reading.called)
 
     def test_stdin_not_inheritable(self):
-        # Tulip issue #209: stdin must not be inheritable, otherwise
+        # asyncio issue #209: stdin must not be inheritable, otherwise
         # the Process.communicate() hangs
         @asyncio.coroutine
         def len_message(message):
index 657a42743470c9504f5e909a7eaf5221970638c8..7fcf4023eecdcbbf7e7ceffa6f8aa47eea1101e3 100644 (file)
@@ -132,7 +132,8 @@ class ProactorTests(test_utils.TestCase):
         self.assertTrue(fut.result())
         self.assertTrue(0 <= elapsed < 0.3, elapsed)
 
-        # Tulip issue #195: cancelling a done _WaitHandleFuture must not crash
+        # asyncio issue #195: cancelling a done _WaitHandleFuture
+        # must not crash
         fut.cancel()
 
     def test_wait_for_handle_cancel(self):
@@ -149,7 +150,8 @@ class ProactorTests(test_utils.TestCase):
         elapsed = self.loop.time() - start
         self.assertTrue(0 <= elapsed < 0.1, elapsed)
 
-        # Tulip issue #195: cancelling a _WaitHandleFuture twice must not crash
+        # asyncio issue #195: cancelling a _WaitHandleFuture twice
+        # must not crash
         fut = self.loop._proactor.wait_for_handle(event)
         fut.cancel()
         fut.cancel()