diff --git a/tests/io/open_append.py b/tests/io/open_append.py index da420a16ea72122fae3c20103cc305dcc3d6ab76..2120b72f04283358d703d58c8da3bc7d00eca3d3 100644 --- a/tests/io/open_append.py +++ b/tests/io/open_append.py @@ -1,6 +1,6 @@ import sys try: - import _os as os + import uos as os except ImportError: import os diff --git a/tests/run-tests-exp.py b/tests/run-tests-exp.py index a4ac26dba2a5e0cea3efce72149803e174785043..3af8feae7c7138e4f14f4ea19745101370027b3d 100644 --- a/tests/run-tests-exp.py +++ b/tests/run-tests-exp.py @@ -6,7 +6,7 @@ # which is to be tested, so should use minimal language functionality. # import sys -import _os as os +import uos as os tests = [ diff --git a/unix/modos.c b/unix/modos.c index faf33dac9cb25bb995b296743fa7e7cc5cebc349..f681acaff274d8f1eb241e923d2171414d264f28 100644 --- a/unix/modos.c +++ b/unix/modos.c @@ -156,7 +156,7 @@ STATIC mp_obj_t mod_os_mkdir(mp_obj_t path_in) { STATIC MP_DEFINE_CONST_FUN_OBJ_1(mod_os_mkdir_obj, mod_os_mkdir); STATIC const mp_rom_map_elem_t mp_module_os_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR__os) }, + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_uos) }, { MP_ROM_QSTR(MP_QSTR_stat), MP_ROM_PTR(&mod_os_stat_obj) }, #if MICROPY_PY_OS_STATVFS { MP_ROM_QSTR(MP_QSTR_statvfs), MP_ROM_PTR(&mod_os_statvfs_obj) }, @@ -171,6 +171,6 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_os_globals, mp_module_os_globals_table); const mp_obj_module_t mp_module_os = { .base = { &mp_type_module }, - .name = MP_QSTR__os, + .name = MP_QSTR_uos, .globals = (mp_obj_dict_t*)&mp_module_os_globals, }; diff --git a/unix/mpconfigport.h b/unix/mpconfigport.h index 7a4b6e523ec230c6379c603500f4b7d647ad4093..d85b98b8dc567e80e1fecdba068767035f54f7f1 100644 --- a/unix/mpconfigport.h +++ b/unix/mpconfigport.h @@ -163,7 +163,7 @@ extern const struct _mp_obj_module_t mp_module_jni; MICROPY_PY_JNI_DEF \ MICROPY_PY_TIME_DEF \ MICROPY_PY_SOCKET_DEF \ - { MP_ROM_QSTR(MP_QSTR__os), MP_ROM_PTR(&mp_module_os) }, \ + { MP_ROM_QSTR(MP_QSTR_uos), MP_ROM_PTR(&mp_module_os) }, \ { MP_ROM_QSTR(MP_QSTR_uselect), MP_ROM_PTR(&mp_module_uselect) }, \ MICROPY_PY_TERMIOS_DEF \ diff --git a/unix/mpconfigport_minimal.h b/unix/mpconfigport_minimal.h index 09d5fbf6d33be32566e99ebc8d2fd8319a0fb670..cffc9a6250b3f36f354d5a1d87f99152bffd8ed3 100644 --- a/unix/mpconfigport_minimal.h +++ b/unix/mpconfigport_minimal.h @@ -98,7 +98,7 @@ extern const struct _mp_obj_module_t mp_module_os; #define MICROPY_PORT_BUILTIN_MODULES \ - { MP_OBJ_NEW_QSTR(MP_QSTR__os), (mp_obj_t)&mp_module_os }, \ + { MP_OBJ_NEW_QSTR(MP_QSTR_uos), (mp_obj_t)&mp_module_os }, \ // type definitions for the specific machine diff --git a/unix/qstrdefsport.h b/unix/qstrdefsport.h index f6ba9e4106fcf35cbf54cbdb2dc88dce438e343a..7323b97a4d986927ece57b0a4a93b68f0616d831 100644 --- a/unix/qstrdefsport.h +++ b/unix/qstrdefsport.h @@ -34,7 +34,7 @@ Q(makefile) Q(FileIO) Q(flush) -Q(_os) +Q(uos) Q(stat) #if MICROPY_PY_OS_STATVFS Q(statvfs) diff --git a/windows/mpconfigport.h b/windows/mpconfigport.h index 4b13fedad2616cc3343de11a550a89f905f033ef..5f0b34f57b6966d64d117c05cb958bb0b2163cff 100644 --- a/windows/mpconfigport.h +++ b/windows/mpconfigport.h @@ -152,7 +152,7 @@ extern const struct _mp_obj_module_t mp_module_os; extern const struct _mp_obj_module_t mp_module_time; #define MICROPY_PORT_BUILTIN_MODULES \ { MP_OBJ_NEW_QSTR(MP_QSTR_utime), (mp_obj_t)&mp_module_time }, \ - { MP_OBJ_NEW_QSTR(MP_QSTR__os), (mp_obj_t)&mp_module_os }, \ + { MP_OBJ_NEW_QSTR(MP_QSTR_uos), (mp_obj_t)&mp_module_os }, \ #if MICROPY_USE_READLINE == 1 #define MICROPY_PORT_ROOT_POINTERS \