File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,6 @@ cdef aio_wait = asyncio.wait
3737cdef aio_wrap_future = asyncio.wrap_future
3838cdef aio_logger = asyncio.log.logger
3939cdef aio_iscoroutine = asyncio.iscoroutine
40- cdef aio_iscoroutinefunction = asyncio.iscoroutinefunction
4140cdef aio_BaseProtocol = asyncio.BaseProtocol
4241cdef aio_Protocol = asyncio.Protocol
4342cdef aio_isfuture = getattr (asyncio, ' isfuture' , None )
@@ -65,6 +64,7 @@ cdef gc_disable = gc.disable
6564
6665cdef iter_chain = itertools.chain
6766cdef inspect_isgenerator = inspect.isgenerator
67+ cdef inspect_iscoroutinefunction = inspect.iscoroutinefunction
6868
6969cdef int has_IPV6_V6ONLY = hasattr (socket, ' IPV6_V6ONLY' )
7070cdef int IPV6_V6ONLY = getattr (socket, ' IPV6_V6ONLY' , - 1 )
Original file line number Diff line number Diff line change @@ -2731,7 +2731,7 @@ cdef class Loop:
27312731 return transport, protocol
27322732
27332733 def run_in_executor (self , executor , func , *args ):
2734- if aio_iscoroutine(func) or aio_iscoroutinefunction (func):
2734+ if aio_iscoroutine(func) or inspect_iscoroutinefunction (func):
27352735 raise TypeError (" coroutines cannot be used with run_in_executor()" )
27362736
27372737 self ._check_closed()
@@ -2910,7 +2910,7 @@ cdef class Loop:
29102910 ' the main thread' )
29112911
29122912 if (aio_iscoroutine(callback)
2913- or aio_iscoroutinefunction (callback)):
2913+ or inspect_iscoroutinefunction (callback)):
29142914 raise TypeError (
29152915 " coroutines cannot be used with add_signal_handler()" )
29162916
You can’t perform that action at this time.
0 commit comments