From fb80dc3971f6a2ce855a69d8648181bbd38cc2c0 Mon Sep 17 00:00:00 2001 From: Nathan Henrie Date: Thu, 23 Mar 2017 19:16:53 -0600 Subject: [PATCH] Add ModuleNotFoundError for Python >= 3.6 (#1083) https://github.com/python/cpython/blob/6f0eb93183519024cb360162bdd81b9faec97ba6/Objects/exceptions.c#L707 https://docs.python.org/3/library/exceptions.html#ModuleNotFoundError --- stdlib/3/builtins.pyi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stdlib/3/builtins.pyi b/stdlib/3/builtins.pyi index 1c4d02702..2b0f40249 100644 --- a/stdlib/3/builtins.pyi +++ b/stdlib/3/builtins.pyi @@ -904,6 +904,8 @@ class EOFError(Exception): ... class FloatingPointError(ArithmeticError): ... class IOError(EnvironmentError): ... class ImportError(Exception): ... +if sys.version_info >= (3, 6): + class ModuleNotFoundError(ImportError): ... class IndexError(LookupError): ... class KeyError(LookupError): ... class MemoryError(Exception): ...