summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorEric Snow <ericsnowcurrently@gmail.com>2016-09-07 23:56:15 (GMT)
committerEric Snow <ericsnowcurrently@gmail.com>2016-09-07 23:56:15 (GMT)
commit46f97b85a8ce9ae67b6e4bc32e94f7827df7bab7 (patch)
treee814eb2b2365001ddbc119372da70eed52f2aeb5 /Doc/whatsnew
parentc943265ba56e7ce7e2fe79fdecfc6670e10e5467 (diff)
downloadcpython-46f97b85a8ce9ae67b6e4bc32e94f7827df7bab7.zip
cpython-46f97b85a8ce9ae67b6e4bc32e94f7827df7bab7.tar.gz
cpython-46f97b85a8ce9ae67b6e4bc32e94f7827df7bab7.tar.bz2
Issue #15767: Use ModuleNotFoundError.
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/3.6.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.6.rst b/Doc/whatsnew/3.6.rst
index ebb142c..e48ed01 100644
--- a/Doc/whatsnew/3.6.rst
+++ b/Doc/whatsnew/3.6.rst
@@ -350,6 +350,10 @@ Some smaller changes made to the core Python language are:
:ref:`py36-traceback` for an example).
(Contributed by Emanuel Barry in :issue:`26823`.)
+* Import now raises the new exception :exc:`ModuleNotFoundError`
+ (subclass of :exc:`ImportError`) when it cannot find a module. Code
+ that current checks for ImportError (in try-except) will still work.
+
New Modules
===========
@@ -959,6 +963,9 @@ Changes in the Python API
* When :meth:`importlib.abc.Loader.exec_module` is defined,
:meth:`importlib.abc.Loader.create_module` must also be defined.
+* :c:func:`PyErr_SetImportError` now sets :exc:`TypeError` when its **msg**
+ argument is not set. Previously only ``NULL`` was returned.
+
* The format of the ``co_lnotab`` attribute of code objects changed to support
negative line number delta. By default, Python does not emit bytecode with
negative line number delta. Functions using ``frame.f_lineno``,