Skip to content

Commit 2fbc08c

Browse files
jimmodpgeorge
authored andcommitted
extmod/asyncio: Rename uasyncio to asyncio.
The asyncio module now has much better CPython compatibility and deserves to be just called "asyncio". This will avoid people having to write `from uasyncio import asyncio`. Renames all files, and updates port manifests to use the new path. Also renames the built-in _uasyncio to _asyncio. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <[email protected]>
1 parent ed962f1 commit 2fbc08c

File tree

28 files changed

+47
-47
lines changed

28 files changed

+47
-47
lines changed

extmod/uasyncio/__init__.py renamed to extmod/asyncio/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# MicroPython uasyncio module
1+
# MicroPython asyncio module
22
# MIT license; Copyright (c) 2019 Damien P. George
33

44
from .core import *

extmod/uasyncio/core.py renamed to extmod/asyncio/core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# MicroPython uasyncio module
1+
# MicroPython asyncio module
22
# MIT license; Copyright (c) 2019 Damien P. George
33

44
from time import ticks_ms as ticks, ticks_diff, ticks_add
55
import sys, select
66

77
# Import TaskQueue and Task, preferring built-in C code over Python code
88
try:
9-
from _uasyncio import TaskQueue, Task
9+
from _asyncio import TaskQueue, Task
1010
except:
1111
from .task import TaskQueue, Task
1212

extmod/uasyncio/event.py renamed to extmod/asyncio/event.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# MicroPython uasyncio module
1+
# MicroPython asyncio module
22
# MIT license; Copyright (c) 2019-2020 Damien P. George
33

44
from . import core

extmod/uasyncio/funcs.py renamed to extmod/asyncio/funcs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# MicroPython uasyncio module
1+
# MicroPython asyncio module
22
# MIT license; Copyright (c) 2019-2022 Damien P. George
33

44
from . import core

extmod/uasyncio/lock.py renamed to extmod/asyncio/lock.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# MicroPython uasyncio module
1+
# MicroPython asyncio module
22
# MIT license; Copyright (c) 2019-2020 Damien P. George
33

44
from . import core

extmod/uasyncio/manifest.py renamed to extmod/asyncio/manifest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This list of package files doesn't include task.py because that's provided
22
# by the C module.
33
package(
4-
"uasyncio",
4+
"asyncio",
55
(
66
"__init__.py",
77
"core.py",

extmod/uasyncio/stream.py renamed to extmod/asyncio/stream.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# MicroPython uasyncio module
1+
# MicroPython asyncio module
22
# MIT license; Copyright (c) 2019-2020 Damien P. George
33

44
from . import core

extmod/uasyncio/task.py renamed to extmod/asyncio/task.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# MicroPython uasyncio module
1+
# MicroPython asyncio module
22
# MIT license; Copyright (c) 2019-2020 Damien P. George
33

44
# This file contains the core TaskQueue based on a pairing heap, and the core Task class.

extmod/extmod.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ set(MICROPY_SOURCE_EXTMOD
1919
${MICROPY_EXTMOD_DIR}/modlwip.c
2020
${MICROPY_EXTMOD_DIR}/modnetwork.c
2121
${MICROPY_EXTMOD_DIR}/modonewire.c
22-
${MICROPY_EXTMOD_DIR}/moduasyncio.c
22+
${MICROPY_EXTMOD_DIR}/modasyncio.c
2323
${MICROPY_EXTMOD_DIR}/modbinascii.c
2424
${MICROPY_EXTMOD_DIR}/modcryptolib.c
2525
${MICROPY_EXTMOD_DIR}/moductypes.c

extmod/extmod.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ SRC_EXTMOD_C += \
1111
extmod/machine_signal.c \
1212
extmod/machine_spi.c \
1313
extmod/machine_timer.c \
14+
extmod/modasyncio.c \
1415
extmod/modbinascii.c \
1516
extmod/modbluetooth.c \
1617
extmod/modbtree.c \
@@ -31,7 +32,6 @@ SRC_EXTMOD_C += \
3132
extmod/modssl_axtls.c \
3233
extmod/modssl_mbedtls.c \
3334
extmod/modtime.c \
34-
extmod/moduasyncio.c \
3535
extmod/moductypes.c \
3636
extmod/modwebrepl.c \
3737
extmod/modwebsocket.c \

0 commit comments

Comments
 (0)