Skip to content

Commit e6ecea5

Browse files
committed
asyncio: sync with github asyncio
* queues: get coroutine from asyncio.coroutines, not from asyncio.tasks * tets: replace tulip with asyncio in comments
1 parent af320b3 commit e6ecea5

File tree

5 files changed

+10
-8
lines changed

5 files changed

+10
-8
lines changed

Lib/asyncio/queues.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from . import events
1010
from . import futures
1111
from . import locks
12-
from .tasks import coroutine
12+
from .coroutines import coroutine
1313

1414

1515
class QueueEmpty(Exception):

Lib/test/test_asyncio/test_selector_events.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ def test_sock_connect(self):
348348
self.loop._sock_connect.call_args[0])
349349

350350
def test_sock_connect_timeout(self):
351-
# Tulip issue #205: sock_connect() must unregister the socket on
351+
# asyncio issue #205: sock_connect() must unregister the socket on
352352
# timeout error
353353

354354
# prepare mocks

Lib/test/test_asyncio/test_streams.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ def client(path):
580580

581581
@unittest.skipIf(sys.platform == 'win32', "Don't have pipes")
582582
def test_read_all_from_pipe_reader(self):
583-
# See Tulip issue 168. This test is derived from the example
583+
# See asyncio issue 168. This test is derived from the example
584584
# subprocess_attach_read_pipe.py, but we configure the
585585
# StreamReader's limit so that twice it is less than the size
586586
# of the data writter. Also we must explicitly attach a child
@@ -621,7 +621,7 @@ def test_streamreader_constructor(self):
621621
self.addCleanup(asyncio.set_event_loop, None)
622622
asyncio.set_event_loop(self.loop)
623623

624-
# Tulip issue #184: Ensure that StreamReaderProtocol constructor
624+
# asyncio issue #184: Ensure that StreamReaderProtocol constructor
625625
# retrieves the current loop if the loop parameter is not set
626626
reader = asyncio.StreamReader()
627627
self.assertIs(reader._loop, self.loop)
@@ -630,7 +630,7 @@ def test_streamreaderprotocol_constructor(self):
630630
self.addCleanup(asyncio.set_event_loop, None)
631631
asyncio.set_event_loop(self.loop)
632632

633-
# Tulip issue #184: Ensure that StreamReaderProtocol constructor
633+
# asyncio issue #184: Ensure that StreamReaderProtocol constructor
634634
# retrieves the current loop if the loop parameter is not set
635635
reader = mock.Mock()
636636
protocol = asyncio.StreamReaderProtocol(reader)

Lib/test/test_asyncio/test_subprocess.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ def connect_read_pipe_mock(*args, **kw):
266266
self.assertTrue(transport.resume_reading.called)
267267

268268
def test_stdin_not_inheritable(self):
269-
# Tulip issue #209: stdin must not be inheritable, otherwise
269+
# asyncio issue #209: stdin must not be inheritable, otherwise
270270
# the Process.communicate() hangs
271271
@asyncio.coroutine
272272
def len_message(message):

Lib/test/test_asyncio/test_windows_events.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ def test_wait_for_handle(self):
132132
self.assertTrue(fut.result())
133133
self.assertTrue(0 <= elapsed < 0.3, elapsed)
134134

135-
# Tulip issue #195: cancelling a done _WaitHandleFuture must not crash
135+
# asyncio issue #195: cancelling a done _WaitHandleFuture
136+
# must not crash
136137
fut.cancel()
137138

138139
def test_wait_for_handle_cancel(self):
@@ -149,7 +150,8 @@ def test_wait_for_handle_cancel(self):
149150
elapsed = self.loop.time() - start
150151
self.assertTrue(0 <= elapsed < 0.1, elapsed)
151152

152-
# Tulip issue #195: cancelling a _WaitHandleFuture twice must not crash
153+
# asyncio issue #195: cancelling a _WaitHandleFuture twice
154+
# must not crash
153155
fut = self.loop._proactor.wait_for_handle(event)
154156
fut.cancel()
155157
fut.cancel()

0 commit comments

Comments
 (0)