FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Do not use deprecated asyncio.iscoroutinefunction by MatthieuDartiailh · Pull Request #705 · MagicStack/uvloop · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .pxi  (1) .pyx  (1) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
2 changes: 1 addition & 1 deletion uvloop/includes/stdlib.pxi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Back | FazBrowse Home | New Git URL