]> granicus.if.org Git - python/commit
[3.6] bpo-30876: Relative import from unloaded package now reimports the package...
authorSerhiy Storchaka <storchaka@gmail.com>
Sun, 16 Jul 2017 04:44:25 +0000 (07:44 +0300)
committerGitHub <noreply@github.com>
Sun, 16 Jul 2017 04:44:25 +0000 (07:44 +0300)
commit28343e3392ca7b1ec7151f68d4d92c90efb91e50
treebb3e51c35c23b66403fbf7460c9e595b3fa5368e
parent65de1f3672fd0a1e3ec34b654ef5213e15a03e26
[3.6] bpo-30876: Relative import from unloaded package now reimports the package (GH-2639) (#2676)

instead of failing with SystemError.

Relative import from non-package now fails with ImportError rather than
SystemError.
(cherry picked from commit 8a9cd20edca7d01b68292036029ae3735ce65edd)
Lib/importlib/_bootstrap.py
Lib/test/test_import/__init__.py
Lib/test/test_import/data/package2/submodule1.py [new file with mode: 0644]
Lib/test/test_import/data/package2/submodule2.py [new file with mode: 0644]
Lib/test/test_importlib/import_/test___package__.py
Misc/NEWS.d/next/Core and Builtins/2017-07-11-06-31-32.bpo-30876.x35jZX.rst [new file with mode: 0644]
Python/import.c
Python/importlib.h