Message165520
| 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. |
|