summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngus Gratton <angus@redyak.com.au>2025-09-24 11:17:51 +1000
committerDamien George <damien@micropython.org>2025-10-04 00:19:40 +1000
commit3ec8b9a77c598104d5caf02e0b6e45d9f5d139dd (patch)
tree11307d99ad7642b45c5ac256c812aadfb46086f1
parentfb2b638ba0837b188deb0386270973261eb41fc0 (diff)
all: Replace legacy name with MicroPython and MPy as applicable.
With the aim of getting consistency, and removing the need to learn an additional term, replace uses of uPy/uPython with MPy/MicroPython. Rule of thumb was to use "MPy" abbreviation where "CPy" is used nearby, but the full word MicroPython otherwise. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
-rw-r--r--docs/pyboard/tutorial/lcd_skin.rst4
-rw-r--r--docs/reference/asm_thumb2_index.rst2
-rw-r--r--extmod/asyncio/core.py2
-rw-r--r--extmod/modtls_mbedtls.c2
-rw-r--r--extmod/vfs.c2
-rw-r--r--ports/esp32/machine_hw_spi.c8
-rw-r--r--ports/webassembly/asyncio/core.py2
-rw-r--r--ports/windows/msvc/paths.props2
-rw-r--r--py/gc.c2
-rw-r--r--py/mpconfig.h2
-rw-r--r--py/objexcept.c2
-rw-r--r--py/objstr.c2
-rw-r--r--tests/basics/async_await2.py2
-rw-r--r--tests/basics/async_for2.py2
-rw-r--r--tests/basics/async_with2.py2
-rw-r--r--tests/basics/boundmeth1.py2
-rw-r--r--tests/basics/builtin_range.py2
-rw-r--r--tests/basics/builtin_setattr.py2
-rw-r--r--tests/basics/class_bind_self.py2
-rw-r--r--tests/basics/del_attr.py2
-rw-r--r--tests/basics/del_global.py2
-rw-r--r--tests/basics/del_name.py2
-rw-r--r--tests/basics/frozenset_set.py2
-rw-r--r--tests/basics/fun_name.py2
-rw-r--r--tests/basics/gc1.py4
-rw-r--r--tests/basics/io_iobase.py2
-rw-r--r--tests/basics/list_pop.py2
-rw-r--r--tests/basics/module2.py2
-rw-r--r--tests/basics/parser.py2
-rw-r--r--tests/basics/python34.py2
-rw-r--r--tests/basics/syntaxerror.py4
-rw-r--r--tests/basics/sys_tracebacklimit.py2
-rw-r--r--tests/basics/tuple1.py2
-rw-r--r--tests/cpydiff/modules_struct_fewargs.py2
-rw-r--r--tests/cpydiff/modules_struct_manyargs.py2
-rw-r--r--tests/cpydiff/modules_struct_whitespace_in_format.py2
-rw-r--r--tests/cpydiff/types_float_implicit_conversion.py2
-rw-r--r--tests/extmod/asyncio_set_exception_handler.py2
-rw-r--r--tests/extmod/hashlib_md5.py3
-rw-r--r--tests/extmod/hashlib_sha1.py3
-rw-r--r--tests/extmod/hashlib_sha256.py3
-rw-r--r--tests/extmod/json_dump.py4
-rw-r--r--tests/extmod/json_dump_iobase.py2
-rw-r--r--tests/extmod/json_dump_separators.py6
-rw-r--r--tests/extmod/json_dumps_extra.py2
-rw-r--r--tests/extmod/json_dumps_separators.py2
-rw-r--r--tests/extmod/re_error.py2
-rw-r--r--tests/extmod/re_sub.py2
-rw-r--r--tests/float/string_format2.py4
-rw-r--r--tests/float/string_format_modulo.py2
-rw-r--r--tests/frozen/frozentest.mpybin196 -> 201 bytes
-rw-r--r--tests/frozen/frozentest.py2
-rw-r--r--tests/io/builtin_print_file.py2
-rw-r--r--tests/io/file_seek.py2
-rw-r--r--tests/micropython/decorator_error.py2
-rw-r--r--tests/micropython/heapalloc_traceback.py2
-rw-r--r--tests/misc/non_compliant.py6
-rw-r--r--tests/misc/non_compliant_lexer.py2
-rw-r--r--tests/misc/print_exception.py6
-rw-r--r--tests/ports/unix/extra_coverage.py2
-rw-r--r--tests/ports/unix/extra_coverage.py.exp2
61 files changed, 74 insertions, 77 deletions
diff --git a/docs/pyboard/tutorial/lcd_skin.rst b/docs/pyboard/tutorial/lcd_skin.rst
index 4df004160..9d0ff473e 100644
--- a/docs/pyboard/tutorial/lcd_skin.rst
+++ b/docs/pyboard/tutorial/lcd_skin.rst
@@ -29,7 +29,7 @@ Make sure the LCD skin is attached to the pyboard as pictured at the top of this
>>> import pyb
>>> lcd = pyb.LCD('X')
>>> lcd.light(True)
- >>> lcd.write('Hello uPy!\n')
+ >>> lcd.write('Hello MPy!\n')
You can make a simple animation using the code::
@@ -38,7 +38,7 @@ You can make a simple animation using the code::
lcd.light(True)
for x in range(-80, 128):
lcd.fill(0)
- lcd.text('Hello uPy!', x, 10, 1)
+ lcd.text('Hello MPy!', x, 10, 1)
lcd.show()
pyb.delay(25)
diff --git a/docs/reference/asm_thumb2_index.rst b/docs/reference/asm_thumb2_index.rst
index ccf020148..97b3a8687 100644
--- a/docs/reference/asm_thumb2_index.rst
+++ b/docs/reference/asm_thumb2_index.rst
@@ -63,7 +63,7 @@ References
- :ref:`Assembler Tutorial <pyboard_tutorial_assembler>`
- `Wiki hints and tips
<http://wiki.micropython.org/platforms/boards/pyboard/assembler>`__
-- `uPy Inline Assembler source-code,
+- `MicroPython Inline Assembler source-code,
emitinlinethumb.c <https://github.com/micropython/micropython/blob/master/py/emitinlinethumb.c>`__
- `ARM Thumb2 Instruction Set Quick Reference
Card <http://infocenter.arm.com/help/topic/com.arm.doc.qrc0001l/QRC0001_UAL.pdf>`__
diff --git a/extmod/asyncio/core.py b/extmod/asyncio/core.py
index 5d46b4b80..7b70b43bc 100644
--- a/extmod/asyncio/core.py
+++ b/extmod/asyncio/core.py
@@ -50,7 +50,7 @@ class SingletonGenerator:
raise self.exc
-# Pause task execution for the given time (integer in milliseconds, uPy extension)
+# Pause task execution for the given time (integer in milliseconds, MicroPython extension)
# Use a SingletonGenerator to do it without allocating on the heap
def sleep_ms(t, sgen=SingletonGenerator()):
assert sgen.state is None
diff --git a/extmod/modtls_mbedtls.c b/extmod/modtls_mbedtls.c
index 586342573..e2f7254f7 100644
--- a/extmod/modtls_mbedtls.c
+++ b/extmod/modtls_mbedtls.c
@@ -304,7 +304,7 @@ static mp_obj_t ssl_context_make_new(const mp_obj_type_t *type_in, size_t n_args
psa_crypto_init();
#endif
- const byte seed[] = "upy";
+ const byte seed[] = "mpy";
int ret = mbedtls_ctr_drbg_seed(&self->ctr_drbg, mbedtls_entropy_func, &self->entropy, seed, sizeof(seed));
if (ret != 0) {
mbedtls_raise_error(ret);
diff --git a/extmod/vfs.c b/extmod/vfs.c
index aebf5ed29..d2a7af5de 100644
--- a/extmod/vfs.c
+++ b/extmod/vfs.c
@@ -96,7 +96,7 @@ mp_vfs_mount_t *mp_vfs_lookup_path(const char *path, const char **path_out) {
return MP_STATE_VM(vfs_cur);
}
-// Version of mp_vfs_lookup_path that takes and returns uPy string objects.
+// Version of mp_vfs_lookup_path that takes and returns MicroPython string objects.
static mp_vfs_mount_t *lookup_path(mp_obj_t path_in, mp_obj_t *path_out) {
const char *path = mp_obj_str_get_str(path_in);
const char *p_out;
diff --git a/ports/esp32/machine_hw_spi.c b/ports/esp32/machine_hw_spi.c
index 6eb83fc09..dcf8b3942 100644
--- a/ports/esp32/machine_hw_spi.c
+++ b/ports/esp32/machine_hw_spi.c
@@ -38,10 +38,10 @@
#include "soc/spi_pins.h"
// SPI mappings by device, naming used by IDF old/new
-// upython | ESP32 | ESP32S2 | ESP32S3 | ESP32C3 | ESP32C6
-// ----------+-----------+-----------+---------+---------+---------
-// SPI(id=1) | HSPI/SPI2 | FSPI/SPI2 | SPI2 | SPI2 | SPI2
-// SPI(id=2) | VSPI/SPI3 | HSPI/SPI3 | SPI3 | err | err
+// MicroPython | ESP32 | ESP32S2 | ESP32S3 | ESP32C3 | ESP32C6
+// ------------+-----------+-----------+---------+---------+---------
+// SPI(id=1) | HSPI/SPI2 | FSPI/SPI2 | SPI2 | SPI2 | SPI2
+// SPI(id=2) | VSPI/SPI3 | HSPI/SPI3 | SPI3 | err | err
// Number of available hardware SPI peripherals.
#if SOC_SPI_PERIPH_NUM > 2
diff --git a/ports/webassembly/asyncio/core.py b/ports/webassembly/asyncio/core.py
index 9d07bd7b8..eeffa253b 100644
--- a/ports/webassembly/asyncio/core.py
+++ b/ports/webassembly/asyncio/core.py
@@ -47,7 +47,7 @@ class SingletonGenerator:
raise self.exc
-# Pause task execution for the given time (integer in milliseconds, uPy extension)
+# Pause task execution for the given time (integer in milliseconds, MicroPython extension)
# Use a SingletonGenerator to do it without allocating on the heap
def sleep_ms(t, sgen=SingletonGenerator()):
assert sgen.state is None
diff --git a/ports/windows/msvc/paths.props b/ports/windows/msvc/paths.props
index 767772a1a..a88182f4c 100644
--- a/ports/windows/msvc/paths.props
+++ b/ports/windows/msvc/paths.props
@@ -31,7 +31,7 @@
<PyVariantDir Condition="'$(PyVariantDir)' == ''">$(PyWinDir)variants\$(PyVariant)\</PyVariantDir>
<PyTargetDir Condition="'$(PyTargetDir)' == ''">$(PyBuildDir)</PyTargetDir>
- <!-- All include directories needed for uPy -->
+ <!-- All include directories needed for MicroPython -->
<PyIncDirs>$(PyIncDirs);$(PyBaseDir);$(PyWinDir);$(PyBuildDir);$(PyWinDir)msvc;$(PyVariantDir)</PyIncDirs>
<!-- Within PyBuildDir different subdirectories are used based on configuration and platform.
diff --git a/py/gc.c b/py/gc.c
index de66137f5..aa9f1e38b 100644
--- a/py/gc.c
+++ b/py/gc.c
@@ -1245,7 +1245,7 @@ void gc_dump_alloc_table(const mp_print_t *print) {
break;
}
*/
- /* this prints the uPy object type of the head block */
+ /* this prints the MicroPython object type of the head block */
case AT_HEAD: {
void **ptr = (void **)(area->gc_pool_start + bl * BYTES_PER_BLOCK);
if (*ptr == &mp_type_tuple) {
diff --git a/py/mpconfig.h b/py/mpconfig.h
index c25401b8c..6da872c56 100644
--- a/py/mpconfig.h
+++ b/py/mpconfig.h
@@ -2099,7 +2099,7 @@ typedef time_t mp_timestamp_t;
/*****************************************************************************/
/* Miscellaneous settings */
-// All uPy objects in ROM must be aligned on at least a 4 byte boundary
+// All MicroPython objects in ROM must be aligned on at least a 4 byte boundary
// so that the small-int/qstr/pointer distinction can be made. For machines
// that don't do this (eg 16-bit CPU), define the following macro to something
// like __attribute__((aligned(4))).
diff --git a/py/objexcept.c b/py/objexcept.c
index 5bf4e672b..df91c32b1 100644
--- a/py/objexcept.c
+++ b/py/objexcept.c
@@ -272,7 +272,7 @@ void mp_obj_exception_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) {
// We allow 'exc.__traceback__ = None' assignment as low-level
// optimization of pre-allocating exception instance and raising
// it repeatedly - this avoids memory allocation during raise.
- // However, uPy will keep adding traceback entries to such
+ // However, MicroPython will keep adding traceback entries to such
// exception instance, so before throwing it, traceback should
// be cleared like above.
self->traceback_len = 0;
diff --git a/py/objstr.c b/py/objstr.c
index c81fc682f..df543041a 100644
--- a/py/objstr.c
+++ b/py/objstr.c
@@ -1304,7 +1304,7 @@ static vstr_t mp_obj_str_format_helper(const char *str, const char *top, int *ar
}
case '\0': // No explicit format type implies 'd'
- case 'n': // I don't think we support locales in uPy so use 'd'
+ case 'n': // I don't think we support locales in MicroPython so use 'd'
case 'd':
mp_print_mp_int(&print, arg, 10, 'a', flags, fill, width, 0);
continue;
diff --git a/tests/basics/async_await2.py b/tests/basics/async_await2.py
index 1e3164df9..7c1c85bfa 100644
--- a/tests/basics/async_await2.py
+++ b/tests/basics/async_await2.py
@@ -2,7 +2,7 @@
import sys
if sys.implementation.name == 'micropython':
- # uPy allows normal generators to be awaitables
+ # MicroPython allows normal generators to be awaitables
coroutine = lambda f: f
else:
import types
diff --git a/tests/basics/async_for2.py b/tests/basics/async_for2.py
index aad23a3e5..530ff390c 100644
--- a/tests/basics/async_for2.py
+++ b/tests/basics/async_for2.py
@@ -2,7 +2,7 @@
import sys
if sys.implementation.name == 'micropython':
- # uPy allows normal generators to be awaitables
+ # MicroPython allows normal generators to be awaitables
coroutine = lambda f: f
else:
import types
diff --git a/tests/basics/async_with2.py b/tests/basics/async_with2.py
index 44421ae91..bcdbfa906 100644
--- a/tests/basics/async_with2.py
+++ b/tests/basics/async_with2.py
@@ -2,7 +2,7 @@
import sys
if sys.implementation.name == 'micropython':
- # uPy allows normal generators to be awaitables
+ # MicroPython allows normal generators to be awaitables
coroutine = lambda f: f
else:
import types
diff --git a/tests/basics/boundmeth1.py b/tests/basics/boundmeth1.py
index fe1b45468..9f08d9bbb 100644
--- a/tests/basics/boundmeth1.py
+++ b/tests/basics/boundmeth1.py
@@ -1,6 +1,6 @@
# tests basics of bound methods
-# uPy and CPython differ when printing a bound method, so just print the type
+# MicroPython and CPython differ when printing a bound method, so just print the type
print(type(repr([].append)))
diff --git a/tests/basics/builtin_range.py b/tests/basics/builtin_range.py
index 728679bc9..9608a8163 100644
--- a/tests/basics/builtin_range.py
+++ b/tests/basics/builtin_range.py
@@ -54,7 +54,7 @@ print(range(1, 100, 5)[15:5:3])
print(range(1, 100, -5)[5:15:-3])
print(range(1, 100, -5)[15:5:3])
-# for this case uPy gives a different stop value but the listed elements are still correct
+# for this case MicroPython gives a different stop value but the listed elements are still correct
print(list(range(7, -2, -4)[2:-2:]))
# zero step
diff --git a/tests/basics/builtin_setattr.py b/tests/basics/builtin_setattr.py
index e4acb14ca..2c9a452c3 100644
--- a/tests/basics/builtin_setattr.py
+++ b/tests/basics/builtin_setattr.py
@@ -21,5 +21,5 @@ except TypeError:
try:
setattr(int, 'to_bytes', 1)
except (AttributeError, TypeError):
- # uPy raises AttributeError, CPython raises TypeError
+ # MicroPython raises AttributeError, CPython raises TypeError
print('AttributeError/TypeError')
diff --git a/tests/basics/class_bind_self.py b/tests/basics/class_bind_self.py
index 813f87644..8bece902c 100644
--- a/tests/basics/class_bind_self.py
+++ b/tests/basics/class_bind_self.py
@@ -52,7 +52,7 @@ print(C.f7(12))
print(C.f8(13))
print(C.f9(14))
-# not working in uPy
+# not working in MicroPython
#class C(list):
# # this acts like a method and binds self
# f1 = list.extend
diff --git a/tests/basics/del_attr.py b/tests/basics/del_attr.py
index 8487b97e3..90a8a5a6f 100644
--- a/tests/basics/del_attr.py
+++ b/tests/basics/del_attr.py
@@ -35,5 +35,5 @@ except AttributeError:
try:
del int.to_bytes
except (AttributeError, TypeError):
- # uPy raises AttributeError, CPython raises TypeError
+ # MicroPython raises AttributeError, CPython raises TypeError
print('AttributeError/TypeError')
diff --git a/tests/basics/del_global.py b/tests/basics/del_global.py
index d740357b0..e1aa074b9 100644
--- a/tests/basics/del_global.py
+++ b/tests/basics/del_global.py
@@ -14,7 +14,7 @@ except NameError:
try:
do_del()
except: # NameError:
- # FIXME uPy returns KeyError for this
+ # FIXME MicroPython returns KeyError for this
print("NameError")
# delete globals using a list
diff --git a/tests/basics/del_name.py b/tests/basics/del_name.py
index c92be54d3..8393b2df9 100644
--- a/tests/basics/del_name.py
+++ b/tests/basics/del_name.py
@@ -10,7 +10,7 @@ except NameError:
try:
del x
except: # NameError:
- # FIXME uPy returns KeyError for this
+ # FIXME MicroPython returns KeyError for this
print("NameError")
class C:
diff --git a/tests/basics/frozenset_set.py b/tests/basics/frozenset_set.py
index 3bf456acf..2b3c68326 100644
--- a/tests/basics/frozenset_set.py
+++ b/tests/basics/frozenset_set.py
@@ -8,5 +8,5 @@ except NameError:
# "Instances of set are compared to instances of frozenset based on their
# members. For example:"
print(set('abc') == frozenset('abc'))
-# This doesn't work in uPy
+# This doesn't work in MicroPython
#print(set('abc') in set([frozenset('abc')]))
diff --git a/tests/basics/fun_name.py b/tests/basics/fun_name.py
index b2642280a..8aac35eea 100644
--- a/tests/basics/fun_name.py
+++ b/tests/basics/fun_name.py
@@ -16,7 +16,7 @@ except AttributeError:
print('SKIP')
raise SystemExit
-# __name__ of a bound native method is not implemented in uPy
+# __name__ of a bound native method is not implemented in MicroPython
# the test here is to make sure it doesn't crash
try:
str((1).to_bytes.__name__)
diff --git a/tests/basics/gc1.py b/tests/basics/gc1.py
index 332bf9744..dff9538b1 100644
--- a/tests/basics/gc1.py
+++ b/tests/basics/gc1.py
@@ -15,13 +15,13 @@ print(gc.isenabled())
gc.collect()
if hasattr(gc, 'mem_free'):
- # uPy has these extra functions
+ # MicroPython has these extra functions
# just test they execute and return an int
assert type(gc.mem_free()) is int
assert type(gc.mem_alloc()) is int
if hasattr(gc, 'threshold'):
- # uPy has this extra function
+ # MicroPython has this extra function
# check execution and returns
assert(gc.threshold(1) is None)
assert(gc.threshold() == 0)
diff --git a/tests/basics/io_iobase.py b/tests/basics/io_iobase.py
index c01ca6a50..de7e4a0b0 100644
--- a/tests/basics/io_iobase.py
+++ b/tests/basics/io_iobase.py
@@ -9,7 +9,7 @@ except (AttributeError, ImportError):
class MyIO(io.IOBase):
def write(self, buf):
- # CPython and uPy pass in different types for buf (str vs bytearray)
+ # CPython and MicroPython pass in different types for buf (str vs bytearray)
print('write', len(buf))
return len(buf)
diff --git a/tests/basics/list_pop.py b/tests/basics/list_pop.py
index 87ed456f8..58bcdd91e 100644
--- a/tests/basics/list_pop.py
+++ b/tests/basics/list_pop.py
@@ -10,7 +10,7 @@ except IndexError:
else:
raise AssertionError("No IndexError raised")
-# popping such that list storage shrinks (tests implementation detail of uPy)
+# popping such that list storage shrinks (tests implementation detail of MicroPython)
l = list(range(20))
for i in range(len(l)):
l.pop()
diff --git a/tests/basics/module2.py b/tests/basics/module2.py
index a13560157..d1dc18930 100644
--- a/tests/basics/module2.py
+++ b/tests/basics/module2.py
@@ -1,4 +1,4 @@
-# uPy behaviour only: builtin modules are read-only
+# MicroPython behaviour only: builtin modules are read-only
import sys
try:
sys.x = 1
diff --git a/tests/basics/parser.py b/tests/basics/parser.py
index 626b67ad7..6ae5f05ba 100644
--- a/tests/basics/parser.py
+++ b/tests/basics/parser.py
@@ -7,7 +7,7 @@ except NameError:
raise SystemExit
# completely empty string
-# uPy and CPy differ for this case
+# MPy and CPy differ for this case
#try:
# compile("", "stdin", "single")
#except SyntaxError:
diff --git a/tests/basics/python34.py b/tests/basics/python34.py
index 922234d22..3071b55ef 100644
--- a/tests/basics/python34.py
+++ b/tests/basics/python34.py
@@ -28,7 +28,7 @@ test_syntax("() = []") # can't assign to empty tuple (in 3.6 we can)
test_syntax("del ()") # can't delete empty tuple (in 3.6 we can)
# from basics/sys1.py
-# uPy prints version 3.4
+# MicroPython prints version 3.4
import sys
print(sys.version[:3])
print(sys.version_info[0], sys.version_info[1])
diff --git a/tests/basics/syntaxerror.py b/tests/basics/syntaxerror.py
index c0702cb24..7b6ef9b75 100644
--- a/tests/basics/syntaxerror.py
+++ b/tests/basics/syntaxerror.py
@@ -86,7 +86,7 @@ test_syntax("yield")
test_syntax("nonlocal a")
test_syntax("await 1")
-# error on uPy, warning on CPy
+# error on MPy, warning on CPy
#test_syntax("def f():\n a = 1\n global a")
# default except must be last
@@ -98,7 +98,7 @@ test_syntax("f(1=2)")
# non-keyword after keyword
test_syntax("f(a=1, 2)")
-# doesn't error on uPy but should
+# doesn't error on MPy but should
#test_syntax("f(1, i for i in i)")
# all elements of dict/set must be pairs or singles
diff --git a/tests/basics/sys_tracebacklimit.py b/tests/basics/sys_tracebacklimit.py
index 3ae372b8d..6f575fde6 100644
--- a/tests/basics/sys_tracebacklimit.py
+++ b/tests/basics/sys_tracebacklimit.py
@@ -30,7 +30,7 @@ def print_exc(e):
if l.startswith(" File "):
l = l.split('"')
print(l[0], l[2])
- # uPy and CPy tracebacks differ in that CPy prints a source line for
+ # MPy and CPy tracebacks differ in that CPy prints a source line for
# each traceback entry. In this case, we know that offending line
# has 4-space indent, so filter it out.
elif not l.startswith(" "):
diff --git a/tests/basics/tuple1.py b/tests/basics/tuple1.py
index 72bb3f01b..70ae07189 100644
--- a/tests/basics/tuple1.py
+++ b/tests/basics/tuple1.py
@@ -17,7 +17,7 @@ print(x + (10, 100, 10000))
x += (10, 11, 12)
print(x)
-# construction of tuple from large iterator (tests implementation detail of uPy)
+# construction of tuple from large iterator (tests implementation detail of MicroPython)
print(tuple(range(20)))
# unsupported unary operation
diff --git a/tests/cpydiff/modules_struct_fewargs.py b/tests/cpydiff/modules_struct_fewargs.py
index 49b2a3213..f6346a679 100644
--- a/tests/cpydiff/modules_struct_fewargs.py
+++ b/tests/cpydiff/modules_struct_fewargs.py
@@ -1,6 +1,6 @@
"""
categories: Modules,struct
-description: Struct pack with too few args, not checked by uPy
+description: Struct pack with too few args, not checked by MicroPython
cause: Unknown
workaround: Unknown
"""
diff --git a/tests/cpydiff/modules_struct_manyargs.py b/tests/cpydiff/modules_struct_manyargs.py
index e3b78930f..b2ea93b6c 100644
--- a/tests/cpydiff/modules_struct_manyargs.py
+++ b/tests/cpydiff/modules_struct_manyargs.py
@@ -1,6 +1,6 @@
"""
categories: Modules,struct
-description: Struct pack with too many args, not checked by uPy
+description: Struct pack with too many args, not checked by MicroPython
cause: Unknown
workaround: Unknown
"""
diff --git a/tests/cpydiff/modules_struct_whitespace_in_format.py b/tests/cpydiff/modules_struct_whitespace_in_format.py
index a7a1d2fac..8b609425e 100644
--- a/tests/cpydiff/modules_struct_whitespace_in_format.py
+++ b/tests/cpydiff/modules_struct_whitespace_in_format.py
@@ -1,6 +1,6 @@
"""
categories: Modules,struct
-description: Struct pack with whitespace in format, whitespace ignored by CPython, error on uPy
+description: Struct pack with whitespace in format, whitespace ignored by CPython, error on MicroPython
cause: MicroPython is optimised for code size.
workaround: Don't use spaces in format strings.
"""
diff --git a/tests/cpydiff/types_float_implicit_conversion.py b/tests/cpydiff/types_float_implicit_conversion.py
index 3726839fa..764c9e4e6 100644
--- a/tests/cpydiff/types_float_implicit_conversion.py
+++ b/tests/cpydiff/types_float_implicit_conversion.py
@@ -1,6 +1,6 @@
"""
categories: Types,float
-description: uPy allows implicit conversion of objects in maths operations while CPython does not.
+description: MicroPython allows implicit conversion of objects in maths operations while CPython does not.
cause: Unknown
workaround: Objects should be wrapped in ``float(obj)`` for compatibility with CPython.
"""
diff --git a/tests/extmod/asyncio_set_exception_handler.py b/tests/extmod/asyncio_set_exception_handler.py
index 5935f0f4e..0ac4a6242 100644
--- a/tests/extmod/asyncio_set_exception_handler.py
+++ b/tests/extmod/asyncio_set_exception_handler.py
@@ -12,7 +12,7 @@ def custom_handler(loop, context):
async def task(i):
- # Raise with 2 args so exception prints the same in uPy and CPython
+ # Raise with 2 args so exception prints the same in MicroPython and CPython
raise ValueError(i, i + 1)
diff --git a/tests/extmod/hashlib_md5.py b/tests/extmod/hashlib_md5.py
index 5f925fc97..ebbe9155e 100644
--- a/tests/extmod/hashlib_md5.py
+++ b/tests/extmod/hashlib_md5.py
@@ -1,8 +1,7 @@
try:
import hashlib
except ImportError:
- # This is neither uPy, nor cPy, so must be uPy with
- # hashlib module disabled.
+ # MicroPython with hashlib module disabled.
print("SKIP")
raise SystemExit
diff --git a/tests/extmod/hashlib_sha1.py b/tests/extmod/hashlib_sha1.py
index af23033a5..46ffb73fc 100644
--- a/tests/extmod/hashlib_sha1.py
+++ b/tests/extmod/hashlib_sha1.py
@@ -1,8 +1,7 @@
try:
import hashlib
except ImportError:
- # This is neither uPy, nor cPy, so must be uPy with
- # hashlib module disabled.
+ # MicroPython with hashlib module disabled.
print("SKIP")
raise SystemExit
diff --git a/tests/extmod/hashlib_sha256.py b/tests/extmod/hashlib_sha256.py
index f0d07e148..ffa0922a1 100644
--- a/tests/extmod/hashlib_sha256.py
+++ b/tests/extmod/hashlib_sha256.py
@@ -1,8 +1,7 @@
try:
import hashlib
except ImportError:
- # This is neither uPy, nor cPy, so must be uPy with
- # hashlib module disabled.
+ # MicroPython with hashlib module disabled.
print("SKIP")
raise SystemExit
diff --git a/tests/extmod/json_dump.py b/tests/extmod/json_dump.py
index 897d33cc8..0beb4f5f8 100644
--- a/tests/extmod/json_dump.py
+++ b/tests/extmod/json_dump.py
@@ -16,11 +16,11 @@ print(s.getvalue())
# dump to a small-int not allowed
try:
json.dump(123, 1)
-except (AttributeError, OSError): # CPython and uPy have different errors
+except (AttributeError, OSError): # CPython and MicroPython have different errors
print("Exception")
# dump to an object not allowed
try:
json.dump(123, {})
-except (AttributeError, OSError): # CPython and uPy have different errors
+except (AttributeError, OSError): # CPython and MicroPython have different errors
print("Exception")
diff --git a/tests/extmod/json_dump_iobase.py b/tests/extmod/json_dump_iobase.py
index 94d317b87..81105e36d 100644
--- a/tests/extmod/json_dump_iobase.py
+++ b/tests/extmod/json_dump_iobase.py
@@ -18,7 +18,7 @@ class S(io.IOBase):
def write(self, buf):
if type(buf) == bytearray:
- # uPy passes a bytearray, CPython passes a str
+ # MicroPython passes a bytearray, CPython passes a str
buf = str(buf, "ascii")
self.buf += buf
return len(buf)
diff --git a/tests/extmod/json_dump_separators.py b/tests/extmod/json_dump_separators.py
index 4f8e56dce..ce3929482 100644
--- a/tests/extmod/json_dump_separators.py
+++ b/tests/extmod/json_dump_separators.py
@@ -25,20 +25,20 @@ for sep in [
# dump to a small-int not allowed
try:
json.dump(123, 1, separators=sep)
- except (AttributeError, OSError): # CPython and uPy have different errors
+ except (AttributeError, OSError): # CPython and MicroPython have different errors
print("Exception")
# dump to an object not allowed
try:
json.dump(123, {}, separators=sep)
- except (AttributeError, OSError): # CPython and uPy have different errors
+ except (AttributeError, OSError): # CPython and MicroPython have different errors
print("Exception")
try:
s = StringIO()
json.dump(False, s, separators={"a": 1})
-except (TypeError, ValueError): # CPython and uPy have different errors
+except (TypeError, ValueError): # CPython and MicroPython have different errors
print("Exception")
# invalid separator types
diff --git a/tests/extmod/json_dumps_extra.py b/tests/extmod/json_dumps_extra.py
index 9074416a9..9faf8eefa 100644
--- a/tests/extmod/json_dumps_extra.py
+++ b/tests/extmod/json_dumps_extra.py
@@ -1,4 +1,4 @@
-# test uPy json behaviour that's not valid in CPy
+# test MicroPython json behaviour that's not valid in CPython
try:
import json
diff --git a/tests/extmod/json_dumps_separators.py b/tests/extmod/json_dumps_separators.py
index a3a9ec308..0a95f489a 100644
--- a/tests/extmod/json_dumps_separators.py
+++ b/tests/extmod/json_dumps_separators.py
@@ -39,7 +39,7 @@ for sep in [
try:
json.dumps(False, separators={"a": 1})
-except (TypeError, ValueError): # CPython and uPy have different errors
+except (TypeError, ValueError): # CPython and MicroPython have different errors
print("Exception")
# invalid separator types
diff --git a/tests/extmod/re_error.py b/tests/extmod/re_error.py
index f61d09132..bd678c9d2 100644
--- a/tests/extmod/re_error.py
+++ b/tests/extmod/re_error.py
@@ -11,7 +11,7 @@ def test_re(r):
try:
re.compile(r)
print("OK")
- except: # uPy and CPy use different errors, so just ignore the type
+ except: # MPy and CPy use different errors, so just ignore the type
print("Error")
diff --git a/tests/extmod/re_sub.py b/tests/extmod/re_sub.py
index ecaa66d83..95ba1d70d 100644
--- a/tests/extmod/re_sub.py
+++ b/tests/extmod/re_sub.py
@@ -61,7 +61,7 @@ try:
except:
print("invalid group")
-# invalid group with very large number (to test overflow in uPy)
+# invalid group with very large number (to test overflow in MicroPython)
try:
re.sub("(a)", "b\\199999999999999999999999999999999999999", "a")
except:
diff --git a/tests/float/string_format2.py b/tests/float/string_format2.py
index 7a36f4d2f..cdea4c119 100644
--- a/tests/float/string_format2.py
+++ b/tests/float/string_format2.py
@@ -144,7 +144,7 @@ if full_tests:
for alignment in ("", "<", ">", "=", "^"):
for fill in ("", " ", "0", "@"):
for sign in ("", "+", "-", " "):
- # An empty precision defaults to 6, but when uPy is
+ # An empty precision defaults to 6, but when MicroPython is
# configured to use a float, we can only use a
# precision of 6 with numbers less than 10 and still
# get results that compare to CPython (which uses
@@ -164,7 +164,7 @@ if full_tests:
for alignment in ("", "<", ">", "=", "^"):
for fill in ("", " ", "0", "@"):
for sign in ("", "+", "-", " "):
- # An empty precision defaults to 6, but when uPy is
+ # An empty precision defaults to 6, but when MicroPython is
# configured to use a float, we can only use a
# precision of 6 with numbers less than 10 and still
# get results that compare to CPython (which uses
diff --git a/tests/float/string_format_modulo.py b/tests/float/string_format_modulo.py
index 3c206b739..553146433 100644
--- a/tests/float/string_format_modulo.py
+++ b/tests/float/string_format_modulo.py
@@ -6,7 +6,7 @@ print("%i" % 1.0)
print("%u" % 1.0)
# these 3 have different behaviour in Python 3.x versions
-# uPy raises a TypeError, following Python 3.5 (earlier versions don't)
+# MicroPython raises a TypeError, following Python 3.5 (earlier versions don't)
# print("%x" % 18.0)
# print("%o" % 18.0)
# print("%X" % 18.0)
diff --git a/tests/frozen/frozentest.mpy b/tests/frozen/frozentest.mpy
index 99581617a..ccdf5e1a9 100644
--- a/tests/frozen/frozentest.mpy
+++ b/tests/frozen/frozentest.mpy
Binary files differ
diff --git a/tests/frozen/frozentest.py b/tests/frozen/frozentest.py
index 78cdd60bf..74bdfb3b2 100644
--- a/tests/frozen/frozentest.py
+++ b/tests/frozen/frozentest.py
@@ -1,4 +1,4 @@
-print("uPy")
+print("interned")
print("a long string that is not interned")
print("a string that has unicode αβγ chars")
print(b"bytes 1234\x01")
diff --git a/tests/io/builtin_print_file.py b/tests/io/builtin_print_file.py
index 822356a6c..e00f58635 100644
--- a/tests/io/builtin_print_file.py
+++ b/tests/io/builtin_print_file.py
@@ -13,5 +13,5 @@ print("test", file=sys.stdout)
try:
print(file=1)
-except (AttributeError, OSError): # CPython and uPy differ in error message
+except (AttributeError, OSError): # CPython and MicroPython differ in error message
print("Error")
diff --git a/tests/io/file_seek.py b/tests/io/file_seek.py
index 3990df840..b9f959378 100644
--- a/tests/io/file_seek.py
+++ b/tests/io/file_seek.py
@@ -30,5 +30,5 @@ f.close()
try:
f.seek(1)
except (OSError, ValueError):
- # CPy raises ValueError, uPy raises OSError
+ # CPy raises ValueError, MPy raises OSError
print("OSError or ValueError")
diff --git a/tests/micropython/decorator_error.py b/tests/micropython/decorator_error.py
index 94772ac1e..b5eae65b2 100644
--- a/tests/micropython/decorator_error.py
+++ b/tests/micropython/decorator_error.py
@@ -1,4 +1,4 @@
-# test syntax errors for uPy-specific decorators
+# test syntax errors for MicroPython-specific decorators
def test_syntax(code):
diff --git a/tests/micropython/heapalloc_traceback.py b/tests/micropython/heapalloc_traceback.py
index 5ded8c5f0..1743d4956 100644
--- a/tests/micropython/heapalloc_traceback.py
+++ b/tests/micropython/heapalloc_traceback.py
@@ -34,7 +34,7 @@ test()
buf = io.StringIO()
sys.print_exception(global_exc, buf)
for l in buf.getvalue().split("\n"):
- # uPy on pyboard prints <stdin> as file, so remove filename.
+ # MicroPython on pyboard prints <stdin> as file, so remove filename.
if l.startswith(" File "):
l = l.split('"')
print(l[0], l[2])
diff --git a/tests/misc/non_compliant.py b/tests/misc/non_compliant.py
index dd62f6325..54ad2960e 100644
--- a/tests/misc/non_compliant.py
+++ b/tests/misc/non_compliant.py
@@ -39,7 +39,7 @@ try:
except NotImplementedError:
print("NotImplementedError")
-# uPy raises TypeError, should be ValueError
+# MicroPython raises TypeError, should be ValueError
try:
"%c" % b"\x01\x02"
except (TypeError, ValueError):
@@ -99,10 +99,10 @@ try:
except NotImplementedError:
print("NotImplementedError")
-# struct pack with too many args, not checked by uPy
+# struct pack with too many args, not checked by MicroPython
print(struct.pack("bb", 1, 2, 3))
-# struct pack with too few args, not checked by uPy
+# struct pack with too few args, not checked by MicroPython
print(struct.pack("bb", 1))
# array slice assignment with unsupported RHS
diff --git a/tests/misc/non_compliant_lexer.py b/tests/misc/non_compliant_lexer.py
index e1c21f3d7..04c605953 100644
--- a/tests/misc/non_compliant_lexer.py
+++ b/tests/misc/non_compliant_lexer.py
@@ -11,7 +11,7 @@ def test(code):
print("NotImplementedError")
-# uPy requires spaces between literal numbers and keywords, CPy doesn't
+# MPy requires spaces between literal numbers and keywords, CPy doesn't
try:
eval("1and 0")
except SyntaxError:
diff --git a/tests/misc/print_exception.py b/tests/misc/print_exception.py
index d41478360..fdf5711c5 100644
--- a/tests/misc/print_exception.py
+++ b/tests/misc/print_exception.py
@@ -20,11 +20,11 @@ def print_exc(e):
print_exception(e, buf)
s = buf.getvalue()
for l in s.split("\n"):
- # uPy on pyboard prints <stdin> as file, so remove filename.
+ # MPy on pyboard prints <stdin> as file, so remove filename.
if l.startswith(" File "):
l = l.split('"')
print(l[0], l[2])
- # uPy and CPy tracebacks differ in that CPy prints a source line for
+ # MPy and CPy tracebacks differ in that CPy prints a source line for
# each traceback entry. In this case, we know that offending line
# has 4-space indent, so filter it out.
elif not l.startswith(" "):
@@ -89,7 +89,7 @@ try:
except Exception as e:
print_exc(e)
-# Test non-stream object passed as output object, only valid for uPy
+# Test non-stream object passed as output object, only valid for MicroPython
if hasattr(sys, "print_exception"):
try:
sys.print_exception(Exception, 1)
diff --git a/tests/ports/unix/extra_coverage.py b/tests/ports/unix/extra_coverage.py
index 493d02cde..2087e7ea2 100644
--- a/tests/ports/unix/extra_coverage.py
+++ b/tests/ports/unix/extra_coverage.py
@@ -128,7 +128,7 @@ from frzqstr import returns_NULL
print(returns_NULL())
-# test for freeze_mpy
+# test for freeze_mpy (importing prints several lines)
import frozentest
print(frozentest.__file__)
diff --git a/tests/ports/unix/extra_coverage.py.exp b/tests/ports/unix/extra_coverage.py.exp
index 5b6e1f3f0..d11e5ee6f 100644
--- a/tests/ports/unix/extra_coverage.py.exp
+++ b/tests/ports/unix/extra_coverage.py.exp
@@ -250,7 +250,7 @@ b'\x00\xff'
frzmpy4 1
frzmpy4 2
NULL
-uPy
+interned
a long string that is not interned
a string that has unicode αβγ chars
b'bytes 1234\x01'