diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-07-23 06:44:05 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-23 06:44:05 (GMT) |
commit | c824cc8426a16dd9f3949a3ed135523d37787bae (patch) | |
tree | 2653e36c69b6e77eafc4d0b8346f0800d9a80a06 /Misc/NEWS.d/next | |
parent | e78dc0aaf03cd98373910150c2d35418cf938254 (diff) | |
download | cpython-c824cc8426a16dd9f3949a3ed135523d37787bae.zip cpython-c824cc8426a16dd9f3949a3ed135523d37787bae.tar.gz cpython-c824cc8426a16dd9f3949a3ed135523d37787bae.tar.bz2 |
[3.5] Backport bpo-30876 (GH-2639), bpo-18018 and bpo-26367. (#2677)
* bpo-30876: Relative import from unloaded package now reimports the package
instead of failing with SystemError.
Relative import from non-package now fails with ImportError rather than
SystemError.
(cherry picked from commit 8a9cd20edca7d01b68292036029ae3735ce65edd)
* bpo-18018: Import raises ImportError instead of SystemError if a relative
import is attempted without a known parent package.
* bpo-26367: importlib.__init__() raises ImportError like
builtins.__import__() when ``level`` is specified but without an accompanying
package specified.
Diffstat (limited to 'Misc/NEWS.d/next')
-rw-r--r-- | Misc/NEWS.d/next/Core and Builtins/2017-07-11-06-31-32.bpo-30876.x35jZX.rst | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Core and Builtins/2017-07-11-06-31-32.bpo-30876.x35jZX.rst b/Misc/NEWS.d/next/Core and Builtins/2017-07-11-06-31-32.bpo-30876.x35jZX.rst new file mode 100644 index 0000000..4f3f4d2 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2017-07-11-06-31-32.bpo-30876.x35jZX.rst @@ -0,0 +1,3 @@ +Relative import from unloaded package now reimports the package instead of +failing with SystemError. Relative import from non-package now fails with +ImportError rather than SystemError. |