]> granicus.if.org Git - python/commit
importlib.abc.SourceLoader.get_source() was re-raising SyntaxError and
authorBrett Cannon <brett@python.org>
Sun, 16 Jun 2013 22:05:54 +0000 (18:05 -0400)
committerBrett Cannon <brett@python.org>
Sun, 16 Jun 2013 22:05:54 +0000 (18:05 -0400)
commitf4375ef4d458bf24610ffef591f8197a3dbf0b35
tree5ee2029fa137cf28d55afc5324caa9e57b209ac0
parent01b0475b08ab694e2eb0610d03b629afe22bb2a1
importlib.abc.SourceLoader.get_source() was re-raising SyntaxError and
UnicodeDecodeError as ImportError. That was over-reaching the point of
raising ImportError in get_source() (which is to signal the source
code was not found when it should have). Conflating the two exceptions
with ImportError could lead to masking errors with the source which
should be known outside of whether there was an error simply getting
the source to begin with.
Doc/whatsnew/3.4.rst
Lib/importlib/_bootstrap.py
Misc/NEWS
Python/importlib.h