From 7271f1ddc75d4d64341e9701a7a21e9b39968b4b Mon Sep 17 00:00:00 2001 From: Damien George Date: Wed, 12 Jun 2024 13:44:20 +1000 Subject: [PATCH] all: Change use of "uasyncio" to "asyncio". Signed-off-by: Damien George --- micropython/aioespnow/README.md | 4 ++-- micropython/aioespnow/aioespnow.py | 6 +++--- micropython/aiorepl/aiorepl.py | 2 +- micropython/bluetooth/aioble/aioble/central.py | 2 +- micropython/bluetooth/aioble/aioble/client.py | 2 +- micropython/bluetooth/aioble/aioble/device.py | 2 +- micropython/bluetooth/aioble/aioble/l2cap.py | 2 +- micropython/bluetooth/aioble/aioble/peripheral.py | 2 +- micropython/bluetooth/aioble/aioble/security.py | 2 +- micropython/bluetooth/aioble/aioble/server.py | 2 +- micropython/bluetooth/aioble/examples/l2cap_file_client.py | 2 +- micropython/bluetooth/aioble/examples/l2cap_file_server.py | 2 +- micropython/bluetooth/aioble/examples/temp_client.py | 2 +- micropython/bluetooth/aioble/examples/temp_sensor.py | 2 +- .../aioble/multitests/ble_buffered_characteristic.py | 2 +- .../bluetooth/aioble/multitests/ble_characteristic.py | 2 +- micropython/bluetooth/aioble/multitests/ble_descriptor.py | 2 +- micropython/bluetooth/aioble/multitests/ble_notify.py | 2 +- micropython/bluetooth/aioble/multitests/ble_shutdown.py | 2 +- .../bluetooth/aioble/multitests/ble_write_capture.py | 2 +- micropython/bluetooth/aioble/multitests/ble_write_order.py | 2 +- micropython/bluetooth/aioble/multitests/perf_gatt_notify.py | 2 +- micropython/bluetooth/aioble/multitests/perf_l2cap.py | 2 +- micropython/uaiohttpclient/README | 2 +- micropython/uaiohttpclient/example.py | 2 +- micropython/uaiohttpclient/manifest.py | 2 +- micropython/uaiohttpclient/uaiohttpclient.py | 2 +- 27 files changed, 30 insertions(+), 30 deletions(-) diff --git a/micropython/aioespnow/README.md b/micropython/aioespnow/README.md index a68e765a..132bce10 100644 --- a/micropython/aioespnow/README.md +++ b/micropython/aioespnow/README.md @@ -4,7 +4,7 @@ A supplementary module which extends the micropython `espnow` module to provide `asyncio` support. - Asyncio support is available on all ESP32 targets as well as those ESP8266 -boards which include the `uasyncio` module (ie. ESP8266 devices with at least +boards which include the `asyncio` module (ie. ESP8266 devices with at least 2MB flash storage). ## API reference @@ -52,7 +52,7 @@ A small async server example:: ```python import network import aioespnow - import uasyncio as asyncio + import asyncio # A WLAN interface must be active to send()/recv() network.WLAN(network.STA_IF).active(True) diff --git a/micropython/aioespnow/aioespnow.py b/micropython/aioespnow/aioespnow.py index c00c6fb2..dec925de 100644 --- a/micropython/aioespnow/aioespnow.py +++ b/micropython/aioespnow/aioespnow.py @@ -1,12 +1,12 @@ # aioespnow module for MicroPython on ESP32 and ESP8266 # MIT license; Copyright (c) 2022 Glenn Moloney @glenn20 -import uasyncio as asyncio +import asyncio import espnow -# Modelled on the uasyncio.Stream class (extmod/stream/stream.py) -# NOTE: Relies on internal implementation of uasyncio.core (_io_queue) +# Modelled on the asyncio.Stream class (extmod/asyncio/stream.py) +# NOTE: Relies on internal implementation of asyncio.core (_io_queue) class AIOESPNow(espnow.ESPNow): # Read one ESPNow message async def arecv(self): diff --git a/micropython/aiorepl/aiorepl.py b/micropython/aiorepl/aiorepl.py index 14d5d55b..8f45dfac 100644 --- a/micropython/aiorepl/aiorepl.py +++ b/micropython/aiorepl/aiorepl.py @@ -41,7 +41,7 @@ async def execute(code, g, s): code = "return {}".format(code) code = """ -import uasyncio as asyncio +import asyncio async def __code(): {} diff --git a/micropython/bluetooth/aioble/aioble/central.py b/micropython/bluetooth/aioble/aioble/central.py index 2f1492d0..6d90cd0f 100644 --- a/micropython/bluetooth/aioble/aioble/central.py +++ b/micropython/bluetooth/aioble/aioble/central.py @@ -6,7 +6,7 @@ from micropython import const import bluetooth import struct -import uasyncio as asyncio +import asyncio from .core import ( ensure_active, diff --git a/micropython/bluetooth/aioble/aioble/client.py b/micropython/bluetooth/aioble/aioble/client.py index ccde0352..859c6e93 100644 --- a/micropython/bluetooth/aioble/aioble/client.py +++ b/micropython/bluetooth/aioble/aioble/client.py @@ -3,7 +3,7 @@ from micropython import const from collections import deque -import uasyncio as asyncio +import asyncio import struct import bluetooth diff --git a/micropython/bluetooth/aioble/aioble/device.py b/micropython/bluetooth/aioble/aioble/device.py index 8844eb42..d02d6385 100644 --- a/micropython/bluetooth/aioble/aioble/device.py +++ b/micropython/bluetooth/aioble/aioble/device.py @@ -3,7 +3,7 @@ from micropython import const -import uasyncio as asyncio +import asyncio import binascii from .core import ble, register_irq_handler, log_error diff --git a/micropython/bluetooth/aioble/aioble/l2cap.py b/micropython/bluetooth/aioble/aioble/l2cap.py index 713c441f..e2d3bd9d 100644 --- a/micropython/bluetooth/aioble/aioble/l2cap.py +++ b/micropython/bluetooth/aioble/aioble/l2cap.py @@ -3,7 +3,7 @@ from micropython import const -import uasyncio as asyncio +import asyncio from .core import ble, log_error, register_irq_handler from .device import DeviceConnection diff --git a/micropython/bluetooth/aioble/aioble/peripheral.py b/micropython/bluetooth/aioble/aioble/peripheral.py index a156ccd2..d3dda8bc 100644 --- a/micropython/bluetooth/aioble/aioble/peripheral.py +++ b/micropython/bluetooth/aioble/aioble/peripheral.py @@ -6,7 +6,7 @@ from micropython import const import bluetooth import struct -import uasyncio as asyncio +import asyncio from .core import ( ensure_active, diff --git a/micropython/bluetooth/aioble/aioble/security.py b/micropython/bluetooth/aioble/aioble/security.py index a0b46e6d..8e04d5b7 100644 --- a/micropython/bluetooth/aioble/aioble/security.py +++ b/micropython/bluetooth/aioble/aioble/security.py @@ -2,7 +2,7 @@ # MIT license; Copyright (c) 2021 Jim Mussared from micropython import const, schedule -import uasyncio as asyncio +import asyncio import binascii import json diff --git a/micropython/bluetooth/aioble/aioble/server.py b/micropython/bluetooth/aioble/aioble/server.py index 403700c5..5d5d7399 100644 --- a/micropython/bluetooth/aioble/aioble/server.py +++ b/micropython/bluetooth/aioble/aioble/server.py @@ -4,7 +4,7 @@ from micropython import const from collections import deque import bluetooth -import uasyncio as asyncio +import asyncio from .core import ( ensure_active, diff --git a/micropython/bluetooth/aioble/examples/l2cap_file_client.py b/micropython/bluetooth/aioble/examples/l2cap_file_client.py index 2a75bc30..9dce349a 100644 --- a/micropython/bluetooth/aioble/examples/l2cap_file_client.py +++ b/micropython/bluetooth/aioble/examples/l2cap_file_client.py @@ -10,7 +10,7 @@ sys.path.append("") from micropython import const -import uasyncio as asyncio +import asyncio import aioble import bluetooth diff --git a/micropython/bluetooth/aioble/examples/l2cap_file_server.py b/micropython/bluetooth/aioble/examples/l2cap_file_server.py index 0c45bd1f..fb806eff 100644 --- a/micropython/bluetooth/aioble/examples/l2cap_file_server.py +++ b/micropython/bluetooth/aioble/examples/l2cap_file_server.py @@ -21,7 +21,7 @@ sys.path.append("") from micropython import const -import uasyncio as asyncio +import asyncio import aioble import bluetooth diff --git a/micropython/bluetooth/aioble/examples/temp_client.py b/micropython/bluetooth/aioble/examples/temp_client.py index 42752d8c..0840359f 100644 --- a/micropython/bluetooth/aioble/examples/temp_client.py +++ b/micropython/bluetooth/aioble/examples/temp_client.py @@ -5,7 +5,7 @@ sys.path.append("") from micropython import const -import uasyncio as asyncio +import asyncio import aioble import bluetooth diff --git a/micropython/bluetooth/aioble/examples/temp_sensor.py b/micropython/bluetooth/aioble/examples/temp_sensor.py index 29f774be..54580f59 100644 --- a/micropython/bluetooth/aioble/examples/temp_sensor.py +++ b/micropython/bluetooth/aioble/examples/temp_sensor.py @@ -5,7 +5,7 @@ sys.path.append("") from micropython import const -import uasyncio as asyncio +import asyncio import aioble import bluetooth diff --git a/micropython/bluetooth/aioble/multitests/ble_buffered_characteristic.py b/micropython/bluetooth/aioble/multitests/ble_buffered_characteristic.py index 91307908..e41c3fd1 100644 --- a/micropython/bluetooth/aioble/multitests/ble_buffered_characteristic.py +++ b/micropython/bluetooth/aioble/multitests/ble_buffered_characteristic.py @@ -9,7 +9,7 @@ from micropython import const import machine import time -import uasyncio as asyncio +import asyncio import aioble import bluetooth diff --git a/micropython/bluetooth/aioble/multitests/ble_characteristic.py b/micropython/bluetooth/aioble/multitests/ble_characteristic.py index b5d1df2f..0c42bc19 100644 --- a/micropython/bluetooth/aioble/multitests/ble_characteristic.py +++ b/micropython/bluetooth/aioble/multitests/ble_characteristic.py @@ -9,7 +9,7 @@ from micropython import const import machine import time -import uasyncio as asyncio +import asyncio import aioble import bluetooth diff --git a/micropython/bluetooth/aioble/multitests/ble_descriptor.py b/micropython/bluetooth/aioble/multitests/ble_descriptor.py index 888222ff..8e32a469 100644 --- a/micropython/bluetooth/aioble/multitests/ble_descriptor.py +++ b/micropython/bluetooth/aioble/multitests/ble_descriptor.py @@ -9,7 +9,7 @@ from micropython import const import machine import time -import uasyncio as asyncio +import asyncio import aioble import bluetooth diff --git a/micropython/bluetooth/aioble/multitests/ble_notify.py b/micropython/bluetooth/aioble/multitests/ble_notify.py index 200e784c..6eb85f68 100644 --- a/micropython/bluetooth/aioble/multitests/ble_notify.py +++ b/micropython/bluetooth/aioble/multitests/ble_notify.py @@ -9,7 +9,7 @@ from micropython import const import machine import time -import uasyncio as asyncio +import asyncio import aioble import bluetooth diff --git a/micropython/bluetooth/aioble/multitests/ble_shutdown.py b/micropython/bluetooth/aioble/multitests/ble_shutdown.py index dea915bf..28fc5353 100644 --- a/micropython/bluetooth/aioble/multitests/ble_shutdown.py +++ b/micropython/bluetooth/aioble/multitests/ble_shutdown.py @@ -9,7 +9,7 @@ from micropython import const import machine import time -import uasyncio as asyncio +import asyncio import aioble import bluetooth diff --git a/micropython/bluetooth/aioble/multitests/ble_write_capture.py b/micropython/bluetooth/aioble/multitests/ble_write_capture.py index 23c6d442..0577229e 100644 --- a/micropython/bluetooth/aioble/multitests/ble_write_capture.py +++ b/micropython/bluetooth/aioble/multitests/ble_write_capture.py @@ -9,7 +9,7 @@ from micropython import const import machine import time -import uasyncio as asyncio +import asyncio import aioble import bluetooth diff --git a/micropython/bluetooth/aioble/multitests/ble_write_order.py b/micropython/bluetooth/aioble/multitests/ble_write_order.py index 10b44bca..ca47f383 100644 --- a/micropython/bluetooth/aioble/multitests/ble_write_order.py +++ b/micropython/bluetooth/aioble/multitests/ble_write_order.py @@ -9,7 +9,7 @@ from micropython import const import machine import time -import uasyncio as asyncio +import asyncio import aioble import bluetooth diff --git a/micropython/bluetooth/aioble/multitests/perf_gatt_notify.py b/micropython/bluetooth/aioble/multitests/perf_gatt_notify.py index 3d3159f5..d8a0ea17 100644 --- a/micropython/bluetooth/aioble/multitests/perf_gatt_notify.py +++ b/micropython/bluetooth/aioble/multitests/perf_gatt_notify.py @@ -9,7 +9,7 @@ from micropython import const import machine import time -import uasyncio as asyncio +import asyncio import aioble import bluetooth diff --git a/micropython/bluetooth/aioble/multitests/perf_l2cap.py b/micropython/bluetooth/aioble/multitests/perf_l2cap.py index e21efd6f..05fd4863 100644 --- a/micropython/bluetooth/aioble/multitests/perf_l2cap.py +++ b/micropython/bluetooth/aioble/multitests/perf_l2cap.py @@ -7,7 +7,7 @@ from micropython import const import machine import time -import uasyncio as asyncio +import asyncio import aioble import bluetooth import random diff --git a/micropython/uaiohttpclient/README b/micropython/uaiohttpclient/README index a3d88b0a..1222f9d6 100644 --- a/micropython/uaiohttpclient/README +++ b/micropython/uaiohttpclient/README @@ -1,4 +1,4 @@ -uaiohttpclient is an HTTP client module for MicroPython uasyncio module, +uaiohttpclient is an HTTP client module for MicroPython asyncio module, with API roughly compatible with aiohttp (https://github.com/KeepSafe/aiohttp) module. Note that only client is implemented, for server see picoweb microframework. diff --git a/micropython/uaiohttpclient/example.py b/micropython/uaiohttpclient/example.py index d265c9db..540d1b3d 100644 --- a/micropython/uaiohttpclient/example.py +++ b/micropython/uaiohttpclient/example.py @@ -2,7 +2,7 @@ # uaiohttpclient - fetch URL passed as command line argument. # import sys -import uasyncio as asyncio +import asyncio import uaiohttpclient as aiohttp diff --git a/micropython/uaiohttpclient/manifest.py b/micropython/uaiohttpclient/manifest.py index a204d57b..8b35e0a7 100644 --- a/micropython/uaiohttpclient/manifest.py +++ b/micropython/uaiohttpclient/manifest.py @@ -1,4 +1,4 @@ -metadata(description="HTTP client module for MicroPython uasyncio module", version="0.5.2") +metadata(description="HTTP client module for MicroPython asyncio module", version="0.5.2") # Originally written by Paul Sokolovsky. diff --git a/micropython/uaiohttpclient/uaiohttpclient.py b/micropython/uaiohttpclient/uaiohttpclient.py index 6347c337..2e782638 100644 --- a/micropython/uaiohttpclient/uaiohttpclient.py +++ b/micropython/uaiohttpclient/uaiohttpclient.py @@ -1,4 +1,4 @@ -import uasyncio as asyncio +import asyncio class ClientResponse: