Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion uvloop/includes/stdlib.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ cdef aio_wait = asyncio.wait
cdef aio_wrap_future = asyncio.wrap_future
cdef aio_logger = asyncio.log.logger
cdef aio_iscoroutine = asyncio.iscoroutine
cdef aio_iscoroutinefunction = asyncio.iscoroutinefunction
cdef aio_BaseProtocol = asyncio.BaseProtocol
cdef aio_Protocol = asyncio.Protocol
cdef aio_isfuture = getattr(asyncio, 'isfuture', None)
Expand Down Expand Up @@ -65,6 +64,7 @@ cdef gc_disable = gc.disable

cdef iter_chain = itertools.chain
cdef inspect_isgenerator = inspect.isgenerator
cdef inspect_iscoroutinefunction = inspect.iscoroutinefunction

cdef int has_IPV6_V6ONLY = hasattr(socket, 'IPV6_V6ONLY')
cdef int IPV6_V6ONLY = getattr(socket, 'IPV6_V6ONLY', -1)
Expand Down
4 changes: 2 additions & 2 deletions uvloop/loop.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2731,7 +2731,7 @@ cdef class Loop:
return transport, protocol

def run_in_executor(self, executor, func, *args):
if aio_iscoroutine(func) or aio_iscoroutinefunction(func):
if aio_iscoroutine(func) or inspect_iscoroutinefunction(func):
raise TypeError("coroutines cannot be used with run_in_executor()")

self._check_closed()
Expand Down Expand Up @@ -2910,7 +2910,7 @@ cdef class Loop:
'the main thread')

if (aio_iscoroutine(callback)
or aio_iscoroutinefunction(callback)):
or inspect_iscoroutinefunction(callback)):
raise TypeError(
"coroutines cannot be used with add_signal_handler()")

Expand Down
Loading