[issue29258] __init__.py required for pkgutil.walk_packages in python3
Inada Naoki
report at bugs.python.org
Mon Jan 20 03:23:34 EST 2020
Inada Naoki <songofacandy at gmail.com> added the comment:
> PEP420 makes __init__.py files optional
This is almost wrong. PEP 420 added a new way for "namespace pacakge."
PEP 420 doesn't make empty __init__.py file in regular package.
(See https://dev.to/methane/don-t-omit-init-py-3hga)
Then, should pkgutil.walk_packages walk into all directories (e.g. node_modules) ? I don't think so.
----------
nosy: +inada.naoki
resolution: -> rejected
stage: -> resolved
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29258>
_______________________________________
More information about the Python-bugs-list
mailing list