Skip to content

Commit ae184cb

Browse files
committed
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.
1 parent c880f91 commit ae184cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

py/builtinimport.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ mp_obj_t mp_builtin___import__(size_t n_args, const mp_obj_t *args) {
462462
vstr_add_str(&path, "__init__.py");
463463
if (mp_import_stat_any(vstr_null_terminated_str(&path)) != MP_IMPORT_STAT_FILE) {
464464
vstr_cut_tail_bytes(&path, sizeof("/__init__.py") - 1); // cut off /__init__.py
465-
mp_warning("%s is imported as namespace package", vstr_str(&path));
465+
//mp_warning("%s is imported as namespace package", vstr_str(&path));
466466
} else {
467467
do_load(module_obj, &path);
468468
vstr_cut_tail_bytes(&path, sizeof("/__init__.py") - 1); // cut off /__init__.py

0 commit comments

Comments
 (0)