mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
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.
This commit is contained in:
parent
01b0475b08
commit
f4375ef4d4
4 changed files with 1722 additions and 1734 deletions
3430
Python/importlib.h
3430
Python/importlib.h
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue