kopia lustrzana https://github.com/micropython/micropython-lib
uasyncio.core: async() was renamed to ensure_future() upstream.
The old name is deprecated since CPyton 3.4.4. That's great relief, because CPython has special parser hacks to support both 3.5-style "async" keyword, and still allow it be used as an identifier in other contexts. MicroPython lacks such hacks, so "async" is SyntaxError as a function name with the latest versions which implement async keyword.pull/75/merge
rodzic
6cd414e0b5
commit
e6ca37faa8
|
@ -167,7 +167,7 @@ def coroutine(f):
|
|||
# for compatibility with CPython asyncio
|
||||
#
|
||||
|
||||
def async(coro, loop=_event_loop):
|
||||
def ensure_future(coro, loop=_event_loop):
|
||||
_event_loop.call_soon(coro)
|
||||
# CPython asyncio incompatibility: we don't return Task object
|
||||
return coro
|
||||
|
|
Ładowanie…
Reference in New Issue