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.
This commit is contained in:
Paul Sokolovsky 2016-07-02 14:45:49 +03:00
parent c880f91ac0
commit ae184cb9de
1 changed files with 1 additions and 1 deletions

View File

@ -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