diff options
author | Jim Mussared <jim.mussared@gmail.com> | 2022-08-19 22:58:37 +1000 |
---|---|---|
committer | Jim Mussared <jim.mussared@gmail.com> | 2023-06-08 17:54:24 +1000 |
commit | 5fd042e7d1610b4d42acfc523441468f2ac28c6f (patch) | |
tree | 87903a5cec5409b89f38fa7d0809d80ca7b127d5 /extmod/uasyncio | |
parent | 9d7eac07138b6e02f4c0775dc70f36fdd69432a2 (diff) | |
download | micropython-5fd042e7d1610b4d42acfc523441468f2ac28c6f.tar.gz micropython-5fd042e7d1610b4d42acfc523441468f2ac28c6f.zip |
all: Replace all uses of umodule in Python code.
Applies to drivers/examples/extmod/port-modules/tools.
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Diffstat (limited to 'extmod/uasyncio')
-rw-r--r-- | extmod/uasyncio/event.py | 4 | ||||
-rw-r--r-- | extmod/uasyncio/stream.py | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/extmod/uasyncio/event.py b/extmod/uasyncio/event.py index 43d47eb5f0..8a90534590 100644 --- a/extmod/uasyncio/event.py +++ b/extmod/uasyncio/event.py @@ -40,9 +40,9 @@ class Event: # that asyncio will poll until a flag is set. # Note: Unlike Event, this is self-clearing after a wait(). try: - import uio + import io - class ThreadSafeFlag(uio.IOBase): + class ThreadSafeFlag(io.IOBase): def __init__(self): self.state = 0 diff --git a/extmod/uasyncio/stream.py b/extmod/uasyncio/stream.py index 875353c940..ac297cce04 100644 --- a/extmod/uasyncio/stream.py +++ b/extmod/uasyncio/stream.py @@ -101,8 +101,8 @@ StreamWriter = Stream # # async def open_connection(host, port): - from uerrno import EINPROGRESS - import usocket as socket + from errno import EINPROGRESS + import socket ai = socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM)[0] # TODO this is blocking! s = socket.socket(ai[0], ai[1], ai[2]) @@ -154,7 +154,7 @@ class Server: # Helper function to start a TCP stream server, running as a new task # TODO could use an accept-callback on socket read activity instead of creating a task async def start_server(cb, host, port, backlog=5): - import usocket as socket + import socket # Create and bind server socket. host = socket.getaddrinfo(host, port)[0] # TODO this is blocking! |