Skip to content
Snippets Groups Projects
Commit ae184cb9 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

py/builtinimport: Disable "imported as namespace package" warning.

Namespace packages are natural part of Python3, CPython3 doesn't have such
warning, it made sense only from point of view of Python2 legacy.
parent c880f91a
No related branches found
No related tags found
No related merge requests found
......@@ -462,7 +462,7 @@ mp_obj_t mp_builtin___import__(size_t n_args, const mp_obj_t *args) {
vstr_add_str(&path, "__init__.py");
if (mp_import_stat_any(vstr_null_terminated_str(&path)) != MP_IMPORT_STAT_FILE) {
vstr_cut_tail_bytes(&path, sizeof("/__init__.py") - 1); // cut off /__init__.py
mp_warning("%s is imported as namespace package", vstr_str(&path));
//mp_warning("%s is imported as namespace package", vstr_str(&path));
} else {
do_load(module_obj, &path);
vstr_cut_tail_bytes(&path, sizeof("/__init__.py") - 1); // cut off /__init__.py
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment