[issue25771] importlib: '.submodule' is not a relative name (no leading dot)

Martin Panter report at bugs.python.org
Fri Dec 4 19:19:14 EST 2015


Martin Panter added the comment:

Thanks, the fix is fine and there is no big need to backport it. For the record, I only came across this playing with runpy. Old message:

$ python3 -m .submodule
/sbin/python3: Error while finding spec for '.submodule' (<class 'ValueError'>: '.submodule' is not a relative name (no leading dot))

New message:

$ ./python -m .submodule
/media/disk/home/proj/python/cpython/python: Error while finding spec for '.submodule' (<class 'ValueError'>: no package specified for '.submodule' (required for relative module names))

----------
versions:  -Python 3.4, Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25771>
_______________________________________


More information about the Python-bugs-list mailing list