diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-07-02 14:45:49 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-07-02 14:45:49 +0300 |
commit | ae184cb9de9ec9a61bbb56d316ecf9f1b9543a4b (patch) | |
tree | 2d96698e7b1ed9fe3626134ec5deaa1c4b95a1d0 | |
parent | c880f91ac0d5157c23a78e5e9739388b57419e5d (diff) | |
download | micropython-ae184cb9de9ec9a61bbb56d316ecf9f1b9543a4b.tar.gz micropython-ae184cb9de9ec9a61bbb56d316ecf9f1b9543a4b.zip |
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.
-rw-r--r-- | py/builtinimport.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/py/builtinimport.c b/py/builtinimport.c index d3670858e5..ef3545d653 100644 --- a/py/builtinimport.c +++ b/py/builtinimport.c @@ -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 |