Nick Coghlan <ncogh...@gmail.com> added the comment: Fixing this has uncovered another issue: the old import emulation in PEP 302 ignored encoding cookies, thus merrily decoding everything as utf-8 in "get_source()". importlib is smarter about this, which means the pydoc tests started failing as they tried to load the files with invalid encoding cookies.
I plan to tackle this in two parts: - move get_source() and get_code() in importlib towards consistently raising ImportError, regardless of the reason the result couldn't be provided (chaining the exceptions to ensure details aren't lost) - update pydoc to tolerate ImportError from get_source. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15343> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com