summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2016-01-23 00:39:02 (GMT)
committerBrett Cannon <brett@python.org>2016-01-23 00:39:02 (GMT)
commit9fa812668faf0d2d7839845e1a0da19b87bdbc29 (patch)
tree80c2c811909e691d6ab1fc2fea7ad9ca1619bdd7 /Misc
parent4b18dd339a9919e6f5fa3485c8b871ed19d9e391 (diff)
downloadcpython-9fa812668faf0d2d7839845e1a0da19b87bdbc29.zip
cpython-9fa812668faf0d2d7839845e1a0da19b87bdbc29.tar.gz
cpython-9fa812668faf0d2d7839845e1a0da19b87bdbc29.tar.bz2
Issue #18018: Raise an ImportError if a relative import is attempted
with no known parent package. Previously SystemError was raised if the parent package didn't exist (e.g., __package__ was set to ''). Thanks to Florent Xicluna and Yongzhi Pan for reporting the issue.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS3
1 files changed, 3 insertions, 0 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index 165b428..676f2ca 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -10,6 +10,9 @@ Release date: tba
Core and Builtins
-----------------
+- Issue #18018: Import raises ImportError instead of SystemError if a relative
+ import is attempted without a known parent package.
+
- Issue #25843: When compiling code, don't merge constants if they are equal
but have a different types. For example, ``f1, f2 = lambda: 1, lambda: 1.0``
is now correctly compiled to two different functions: ``f1()`` returns ``1``