Rename builtin io to _io

This commit is contained in:
Aviv Palivoda committed 2019-06-10 19:18:32 +03:00
1 parent fbaff7fd50
commit a57f38b07f
3 files changed
+3 -2

No files matched your search

+1
View File
@@ -0,0 +1 @@
from _io import *
+1 -1
View File
@@ -471,7 +471,7 @@ pub fn make_module(vm: &VirtualMachine) -> PyObjectRef {
"getvalue" => ctx.new_rustfunc(bytes_io_getvalue)
});
py_module!(vm, "io", {
py_module!(vm, "_io", {
"open" => ctx.new_rustfunc(io_open),
"IOBase" => io_base,
"RawIOBase" => raw_io_base,
+1 -1
View File
@@ -61,7 +61,7 @@ pub fn get_module_inits() -> HashMap<String, StdlibInitFunc> {
// disable some modules on WASM
#[cfg(not(target_arch = "wasm32"))]
{
modules.insert("io".to_string(), Box::new(io::make_module));
modules.insert("_io".to_string(), Box::new(io::make_module));
modules.insert("_os".to_string(), Box::new(os::make_module));
modules.insert("socket".to_string(), Box::new(socket::make_module));
}