Skip to content

Commit a6eff05

Browse files
committed
unix: Rename "_os" module to "uos" for consistency with baremetal ports.
1 parent 967ceba commit a6eff05

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

tests/io/open_append.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import sys
22
try:
3-
import _os as os
3+
import uos as os
44
except ImportError:
55
import os
66

tests/run-tests-exp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# which is to be tested, so should use minimal language functionality.
77
#
88
import sys
9-
import _os as os
9+
import uos as os
1010

1111

1212
tests = [

unix/modos.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ STATIC mp_obj_t mod_os_mkdir(mp_obj_t path_in) {
156156
STATIC MP_DEFINE_CONST_FUN_OBJ_1(mod_os_mkdir_obj, mod_os_mkdir);
157157

158158
STATIC const mp_rom_map_elem_t mp_module_os_globals_table[] = {
159-
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR__os) },
159+
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_uos) },
160160
{ MP_ROM_QSTR(MP_QSTR_stat), MP_ROM_PTR(&mod_os_stat_obj) },
161161
#if MICROPY_PY_OS_STATVFS
162162
{ 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);
171171

172172
const mp_obj_module_t mp_module_os = {
173173
.base = { &mp_type_module },
174-
.name = MP_QSTR__os,
174+
.name = MP_QSTR_uos,
175175
.globals = (mp_obj_dict_t*)&mp_module_os_globals,
176176
};

unix/mpconfigport.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ extern const struct _mp_obj_module_t mp_module_jni;
163163
MICROPY_PY_JNI_DEF \
164164
MICROPY_PY_TIME_DEF \
165165
MICROPY_PY_SOCKET_DEF \
166-
{ MP_ROM_QSTR(MP_QSTR__os), MP_ROM_PTR(&mp_module_os) }, \
166+
{ MP_ROM_QSTR(MP_QSTR_uos), MP_ROM_PTR(&mp_module_os) }, \
167167
{ MP_ROM_QSTR(MP_QSTR_uselect), MP_ROM_PTR(&mp_module_uselect) }, \
168168
MICROPY_PY_TERMIOS_DEF \
169169

unix/mpconfigport_minimal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
extern const struct _mp_obj_module_t mp_module_os;
9999

100100
#define MICROPY_PORT_BUILTIN_MODULES \
101-
{ MP_OBJ_NEW_QSTR(MP_QSTR__os), (mp_obj_t)&mp_module_os }, \
101+
{ MP_OBJ_NEW_QSTR(MP_QSTR_uos), (mp_obj_t)&mp_module_os }, \
102102

103103
// type definitions for the specific machine
104104

unix/qstrdefsport.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Q(makefile)
3434
Q(FileIO)
3535
Q(flush)
3636

37-
Q(_os)
37+
Q(uos)
3838
Q(stat)
3939
#if MICROPY_PY_OS_STATVFS
4040
Q(statvfs)

windows/mpconfigport.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ extern const struct _mp_obj_module_t mp_module_os;
152152
extern const struct _mp_obj_module_t mp_module_time;
153153
#define MICROPY_PORT_BUILTIN_MODULES \
154154
{ MP_OBJ_NEW_QSTR(MP_QSTR_utime), (mp_obj_t)&mp_module_time }, \
155-
{ MP_OBJ_NEW_QSTR(MP_QSTR__os), (mp_obj_t)&mp_module_os }, \
155+
{ MP_OBJ_NEW_QSTR(MP_QSTR_uos), (mp_obj_t)&mp_module_os }, \
156156

157157
#if MICROPY_USE_READLINE == 1
158158
#define MICROPY_PORT_ROOT_POINTERS \

0 commit comments

Comments
 (0)