Skip to content

Commit

Permalink
extmod/modtimeq: Remove timeq module.
Browse files Browse the repository at this point in the history
This is a MicroPython-specific module that existed to support the old
version of uasyncio.  It's undocumented and not enabled on all ports and
takes up code size unnecessarily.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
  • Loading branch information
jimmo committed Jun 8, 2023
1 parent 8211d56 commit a1fbb19
Show file tree
Hide file tree
Showing 27 changed files with 4 additions and 439 deletions.
1 change: 0 additions & 1 deletion extmod/extmod.cmake
Expand Up @@ -34,7 +34,6 @@ set(MICROPY_SOURCE_EXTMOD
${MICROPY_EXTMOD_DIR}/modssl_axtls.c
${MICROPY_EXTMOD_DIR}/modssl_mbedtls.c
${MICROPY_EXTMOD_DIR}/modtime.c
${MICROPY_EXTMOD_DIR}/modtimeq.c
${MICROPY_EXTMOD_DIR}/modwebsocket.c
${MICROPY_EXTMOD_DIR}/modzlib.c
${MICROPY_EXTMOD_DIR}/modwebrepl.c
Expand Down
1 change: 0 additions & 1 deletion extmod/extmod.mk
Expand Up @@ -31,7 +31,6 @@ SRC_EXTMOD_C += \
extmod/modssl_axtls.c \
extmod/modssl_mbedtls.c \
extmod/modtime.c \
extmod/modtimeq.c \
extmod/moduasyncio.c \
extmod/moductypes.c \
extmod/modwebrepl.c \
Expand Down
235 changes: 0 additions & 235 deletions extmod/modtimeq.c

This file was deleted.

1 change: 0 additions & 1 deletion ports/esp32/mpconfigport.h
Expand Up @@ -83,7 +83,6 @@
#define MICROPY_BLUETOOTH_NIMBLE (1)
#define MICROPY_BLUETOOTH_NIMBLE_BINDINGS_ONLY (1)
#endif
#define MICROPY_PY_TIMEQ (1)
#define MICROPY_PY_HASHLIB_SHA1 (1)
#define MICROPY_PY_HASHLIB_SHA256 (1)
#define MICROPY_PY_CRYPTOLIB (1)
Expand Down
1 change: 0 additions & 1 deletion ports/renesas-ra/boards/EK_RA4M1/mpconfigboard.h
Expand Up @@ -11,7 +11,6 @@
#define MICROPY_PY_GENERATOR_PEND_THROW (0)
#define MICROPY_PY_MATH (0)
#define MICROPY_PY_HEAPQ (0)
#define MICROPY_PY_TIMEQ (0)
#define MICROPY_PY_THREAD (0)

// peripheral config
Expand Down
1 change: 0 additions & 1 deletion ports/renesas-ra/boards/EK_RA4W1/mpconfigboard.h
Expand Up @@ -11,7 +11,6 @@
#define MICROPY_PY_GENERATOR_PEND_THROW (1)
#define MICROPY_PY_MATH (1)
#define MICROPY_PY_HEAPQ (1)
#define MICROPY_PY_TIMEQ (1)
#define MICROPY_PY_THREAD (0) // disable ARM_THUMB_FP using vldr due to RA has single float only

// peripheral config
Expand Down
1 change: 0 additions & 1 deletion ports/renesas-ra/boards/EK_RA6M1/mpconfigboard.h
Expand Up @@ -11,7 +11,6 @@
#define MICROPY_PY_GENERATOR_PEND_THROW (1)
#define MICROPY_PY_MATH (1)
#define MICROPY_PY_HEAPQ (1)
#define MICROPY_PY_TIMEQ (1)
#define MICROPY_PY_THREAD (0) // disable ARM_THUMB_FP using vldr due to RA has single float only

// peripheral config
Expand Down
1 change: 0 additions & 1 deletion ports/renesas-ra/boards/EK_RA6M2/mpconfigboard.h
Expand Up @@ -11,7 +11,6 @@
#define MICROPY_PY_GENERATOR_PEND_THROW (1)
#define MICROPY_PY_MATH (1)
#define MICROPY_PY_HEAPQ (1)
#define MICROPY_PY_TIMEQ (1)
#define MICROPY_PY_THREAD (0) // disable ARM_THUMB_FP using vldr due to RA has single float only

// peripheral config
Expand Down
1 change: 0 additions & 1 deletion ports/renesas-ra/boards/RA4M1_CLICKER/mpconfigboard.h
Expand Up @@ -11,7 +11,6 @@
#define MICROPY_PY_GENERATOR_PEND_THROW (0)
#define MICROPY_PY_MATH (0)
#define MICROPY_PY_HEAPQ (0)
#define MICROPY_PY_TIMEQ (0)
#define MICROPY_PY_THREAD (0)

// peripheral config
Expand Down
3 changes: 0 additions & 3 deletions ports/renesas-ra/mpconfigport.h
Expand Up @@ -102,9 +102,6 @@
#define MICROPY_PY_TIME_GMTIME_LOCALTIME_MKTIME (1)
#define MICROPY_PY_TIME_TIME_TIME_NS (1)
#define MICROPY_PY_TIME_INCLUDEFILE "ports/renesas-ra/modtime.c"
#ifndef MICROPY_PY_TIMEQ
#define MICROPY_PY_TIMEQ (1)
#endif
#ifndef MICROPY_PY_MACHINE
#define MICROPY_PY_MACHINE (1)
#ifndef MICROPY_PY_MACHINE_BITSTREAM
Expand Down
1 change: 0 additions & 1 deletion ports/stm32/boards/B_L072Z_LRWAN1/mpconfigboard.h
Expand Up @@ -18,7 +18,6 @@
#define MICROPY_PY_STM (0)
#define MICROPY_PY_PYB_LEGACY (0)
#define MICROPY_PY_HEAPQ (0)
#define MICROPY_PY_TIMEQ (0)

#define MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE (0)
#define MICROPY_HW_ENABLE_RTC (1)
Expand Down
1 change: 0 additions & 1 deletion ports/stm32/boards/NUCLEO_F091RC/mpconfigboard.h
Expand Up @@ -10,7 +10,6 @@
#define MICROPY_PY_STM (0)
#define MICROPY_PY_PYB_LEGACY (0)
#define MICROPY_PY_HEAPQ (0)
#define MICROPY_PY_TIMEQ (0)
#define MICROPY_PY_FRAMEBUF (0)

#define MICROPY_HW_ENABLE_RTC (1)
Expand Down
1 change: 0 additions & 1 deletion ports/stm32/boards/NUCLEO_L073RZ/mpconfigboard.h
Expand Up @@ -18,7 +18,6 @@
#define MICROPY_PY_STM (0)
#define MICROPY_PY_PYB_LEGACY (0)
#define MICROPY_PY_HEAPQ (0)
#define MICROPY_PY_TIMEQ (0)

#define MICROPY_PY_MACHINE_BITSTREAM (0)

Expand Down
1 change: 0 additions & 1 deletion ports/stm32/boards/NUCLEO_L432KC/mpconfigboard.h
Expand Up @@ -12,7 +12,6 @@
#define MICROPY_PY_STM (0)
#define MICROPY_PY_PYB_LEGACY (0)
#define MICROPY_PY_HEAPQ (0)
#define MICROPY_PY_TIMEQ (0)

#define MICROPY_HW_ENABLE_RTC (1)
#define MICROPY_HW_ENABLE_ADC (1)
Expand Down
1 change: 0 additions & 1 deletion ports/stm32/boards/NUCLEO_WL55/mpconfigboard.h
Expand Up @@ -17,7 +17,6 @@
#define MICROPY_PY_STM (0)
#define MICROPY_PY_PYB_LEGACY (0)
#define MICROPY_PY_HEAPQ (0)
#define MICROPY_PY_TIMEQ (0)

#define MICROPY_HW_HAS_FLASH (1)
#define MICROPY_HW_ENABLE_RTC (1)
Expand Down
3 changes: 0 additions & 3 deletions ports/stm32/mpconfigport.h
Expand Up @@ -108,9 +108,6 @@
#define MICROPY_PY_TIME_GMTIME_LOCALTIME_MKTIME (1)
#define MICROPY_PY_TIME_TIME_TIME_NS (1)
#define MICROPY_PY_TIME_INCLUDEFILE "ports/stm32/modtime.c"
#ifndef MICROPY_PY_TIMEQ
#define MICROPY_PY_TIMEQ (1)
#endif
#define MICROPY_PY_LWIP_SOCK_RAW (MICROPY_PY_LWIP)
#ifndef MICROPY_PY_MACHINE
#define MICROPY_PY_MACHINE (1)
Expand Down
2 changes: 1 addition & 1 deletion ports/unix/coverage.c
Expand Up @@ -364,7 +364,7 @@ STATIC mp_obj_t extra_coverage(void) {
mp_repl_autocomplete("import ", 7, &mp_plat_print, &str); // expect the list of builtins
len = mp_repl_autocomplete("import ti", 9, &mp_plat_print, &str); // expect "me"
mp_printf(&mp_plat_print, "%.*s\n", (int)len, str);
mp_repl_autocomplete("import time", 11, &mp_plat_print, &str); // expect "time timeq"
mp_repl_autocomplete("import m", 8, &mp_plat_print, &str); // expect "micropython machine math"

mp_store_global(MP_QSTR_sys, mp_import_name(MP_QSTR_sys, mp_const_none, MP_OBJ_NEW_SMALL_INT(0)));
mp_repl_autocomplete("sys.", 4, &mp_plat_print, &str); // expect dir(sys)
Expand Down
3 changes: 0 additions & 3 deletions ports/unix/variants/mpconfigvariant_common.h
Expand Up @@ -100,9 +100,6 @@
#define MICROPY_PY_TIME_CUSTOM_SLEEP (1)
#define MICROPY_PY_TIME_INCLUDEFILE "ports/unix/modtime.c"

// Enable the utimeq module used by the previous (v2) version of uasyncio.
#define MICROPY_PY_TIMEQ (1)

#if MICROPY_PY_SSL
#define MICROPY_PY_HASHLIB_MD5 (1)
#define MICROPY_PY_HASHLIB_SHA1 (1)
Expand Down
1 change: 0 additions & 1 deletion ports/windows/mpconfigport.h
Expand Up @@ -148,7 +148,6 @@
#define MICROPY_PY_JSON (1)
#define MICROPY_PY_RE (1)
#define MICROPY_PY_HEAPQ (1)
#define MICROPY_PY_TIMEQ (1)
#define MICROPY_PY_HASHLIB (1)
#define MICROPY_PY_BINASCII (1)
#define MICROPY_PY_BINASCII_CRC32 (1)
Expand Down
1 change: 0 additions & 1 deletion ports/windows/msvc/sources.props
Expand Up @@ -18,7 +18,6 @@
<PyExtModSource Include="$(PyBaseDir)extmod\modre.c" />
<PyExtModSource Include="$(PyBaseDir)extmod\modselect.c" />
<PyExtModSource Include="$(PyBaseDir)extmod\modtime.c" />
<PyExtModSource Include="$(PyBaseDir)extmod\modtimeq.c" />
<PyExtModSource Include="$(PyBaseDir)extmod\modzlib.c" />
<PyExtModSource Include="$(PyBaseDir)extmod\virtpin.c" />
<PyExtModSource Include="$(PyBaseDir)extmod\vfs.c" />
Expand Down

0 comments on commit a1fbb19

Please sign in to comment.