mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
Issue #14285: Do not catch exceptions initializing any ancestor package
The previous fix only handled the case of the parent package of __main__ failing to initialize. Also make the "Error while finding spec" formatting slightly more appealing, and document and test that the module name must be absolute.
This commit is contained in:
parent
a29eb08fb9
commit
7dda421bff
5 changed files with 31 additions and 6 deletions
|
@ -77,7 +77,7 @@ source.
|
|||
the :mod:`__main__` module.
|
||||
|
||||
Since the argument is a *module* name, you must not give a file extension
|
||||
(``.py``). The ``module-name`` should be a valid Python module name, but
|
||||
(``.py``). The module name should be a valid absolute Python module name, but
|
||||
the implementation may not always enforce this (e.g. it may allow you to
|
||||
use a name that includes a hyphen).
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue