cpython/Objects
Brett Cannon b1611e2772 Issue #15767: Introduce ModuleNotFoundError, a subclass of
ImportError.

The exception is raised by import when a module could not be found.
Technically this is defined as no viable loader could be found for the
specified module. This includes ``from ... import`` statements so that
the module usage is consistent for all situations where import
couldn't find what was requested.

This should allow for the common idiom of::

  try:
    import something
  except ImportError:
    pass

to be updated to using ModuleNotFoundError and not accidentally mask
ImportError messages that should propagate (e.g. issues with a
loader).

This work was driven by the fact that the ``from ... import``
statement needed to be able to tell the difference between an
ImportError that simply couldn't find a module (and thus silence the
exception so that ceval can raise it) and an ImportError that
represented an actual problem.
2013-06-12 16:59:46 -04:00
..
stringlib rewrite the parsing of field names to be more consistent wrt recursive expansion 2013-05-17 18:22:31 -05:00
abstract.c Issue #9369: The types of `char*` arguments of PyObject_CallFunction() and 2013-05-29 18:50:54 +03:00
accu.c Issue #14387: Do not include accu.h from Python.h. 2012-03-22 14:38:16 +01:00
boolobject.c
bytearrayobject.c Fix compilation on Windows 2012-11-03 23:08:27 +01:00
bytes_methods.c
bytesobject.c Issue #12983: Bytes literals with invalid \x escape now raise a SyntaxError 2013-02-10 17:43:25 +02:00
capsule.c
cellobject.c
classobject.c Py_TYPE() has already dereferenced self before the NULL check. Moved Py_TYPE() after the check for self == NULL 2012-09-10 02:45:56 +02:00
codeobject.c Issue #15456: Fix code __sizeof__ after #12399 change. 2012-07-26 22:23:23 +02:00
complexobject.c Close #17694: Add minimum length to _PyUnicodeWriter 2013-04-17 23:02:17 +02:00
descrobject.c Use Py_intptr_t to store the difference between two pointers, instead of int 2013-05-08 00:44:15 +02:00
dictnotes.txt Issue #15055: update dictnotes.txt. Patch by Mark Shannon. 2012-06-24 21:03:45 +02:00
dictobject.c merge 2013-05-17 03:24:54 -07:00
enumobject.c Issue #14288: Serialization support for builtin iterators. 2012-04-03 10:49:41 +00:00
exceptions.c Issue #15767: Introduce ModuleNotFoundError, a subclass of 2013-06-12 16:59:46 -04:00
fileobject.c Issue #15989: Fix several occurrences of integer overflow 2013-01-19 12:41:45 +02:00
floatobject.c Reuse Py_MIN and Py_MAX macros: remove duplicate MIN/MAX macros 2013-06-04 23:14:37 +02:00
frameobject.c Reuse Py_MIN and Py_MAX macros: remove duplicate MIN/MAX macros 2013-06-04 23:14:37 +02:00
funcobject.c use new generic __dict__ descriptor implementations 2012-02-19 20:02:57 -05:00
genobject.c Backout c89febab4648 following private feedback by Guido. 2013-05-14 20:37:52 +02:00
iterobject.c Close #17932: Fix an integer overflow issue on Windows 64-bit in iterators: 2013-06-04 23:02:46 +02:00
listobject.c Issue #16148: implemented PEP 424 2012-10-06 14:03:24 +02:00
listsort.txt
lnotab_notes.txt
longobject.c Reuse Py_MIN and Py_MAX macros: remove duplicate MIN/MAX macros 2013-06-04 23:14:37 +02:00
memoryobject.c Fix error messages. 2013-02-19 13:44:49 +01:00
methodobject.c Fix supernumerary 's' in sys._debugmallocstats() output. 2013-04-11 21:02:20 +02:00
moduleobject.c #17115,17116: Have modules initialize the __package__ and __loader__ 2013-05-04 13:56:58 -04:00
namespaceobject.c Issue #9566: Fix a compiler warning on Windows 64-bit in namespace_init() 2013-06-05 00:13:51 +02:00
object.c Optimize ascii(str): don't encode/decode repr if repr is already ASCII 2013-04-14 18:44:10 +02:00
obmalloc.c Issue #17469: Fix _Py_GetAllocatedBlocks() and sys.getallocatedblocks() when running on valgrind. 2013-04-06 01:15:30 +02:00
rangeobject.c Issue #16451: Refactor to remove duplication between range and slice in slice index computations. 2012-11-17 19:18:10 +00:00
setobject.c Fix the internals of our hash functions to used unsigned values during hash 2012-12-10 18:32:53 -08:00
sliceobject.c Issue #16451: Refactor to remove duplication between range and slice in slice index computations. 2012-11-17 19:18:10 +00:00
structseq.c Check for NULL return value in PyStructSequence_NewType(). Found by Coverity. 2012-08-19 11:20:41 +02:00
tupleobject.c Issuse #17932: Fix an integer overflow issue on Windows 64-bit in tuple 2013-06-05 00:11:34 +02:00
typeobject.c when arguments are cells clear the locals slot (backport of #17927) 2013-05-14 22:31:26 -05:00
typeslots.inc
typeslots.py
unicodectype.c fix old titlecase function for extended case chars 2012-01-15 21:33:32 -05:00
unicodeobject.c merge 3.3 (#18183) 2013-06-10 09:24:01 -07:00
unicodetype_db.h upgrade to UCD 6.2 2012-09-29 13:47:39 -04:00
weakrefobject.c Issue #17643: Add __callback__ attribute to weakref.ref. 2013-04-13 15:45:44 +01:00