This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients Arfrever, brett.cannon, chris.jerdonek, christopherthemagnificent, eric.araujo, georg.brandl, ncoghlan, python-dev
Date 2012-07-15.11:53:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1342353230.14.0.266892291536.issue15343@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2012-07-15 11:53:50ncoghlansetrecipients: + ncoghlan, brett.cannon, georg.brandl, eric.araujo, Arfrever, christopherthemagnificent, chris.jerdonek, python-dev
2012-07-15 11:53:50ncoghlansetmessageid: <1342353230.14.0.266892291536.issue15343@psf.upfronthosting.co.za>
2012-07-15 11:53:49ncoghlanlinkissue15343 messages
2012-07-15 11:53:49ncoghlancreate