]> granicus.if.org Git - python/commit
bpo-30436: Raise ModuleNotFoundError for importlib.util.find_spec() when parent isn...
authorMilan Oberkirch <zvyn@oberkirch.org>
Wed, 14 Jun 2017 21:34:50 +0000 (07:34 +1000)
committerBrett Cannon <brettcannon@users.noreply.github.com>
Wed, 14 Jun 2017 21:34:50 +0000 (14:34 -0700)
commit8c3f05e9f0f0b30a3d4a2433e92471794d8258af
tree57f6ae60b1701bf4ca4be1f9db1afce1e2bea795
parent32fd874afe55e396e3c9a5af35e7bb3d8e0b8f02
bpo-30436: Raise ModuleNotFoundError for importlib.util.find_spec() when parent isn't a package (GH-1899)

Previously AttributeError was raised, but that's not very reflective of the fact that the requested module can't be found since the specified parent isn't actually a package.
Doc/library/importlib.rst
Lib/importlib/util.py
Lib/test/test_cmd_line_script.py
Lib/test/test_importlib/test_util.py
Misc/NEWS