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 belopolsky
Recipients belopolsky, ncoghlan
Date 2008-12-03.23:58:22
SpamBayes Score 9.54418e-06
Marked as misclassified No
Message-id <>
In-reply-to <>
No, I only used to make it easy to reproduce the problem.
Pdb will not be able to access code in any module with a custom
__loader__.  For example, if you move f() to inside
and import it from __main__, you will see the same issue.  My patch
gives linecache.getlines() called by Pdb access to module's globs and
thus to its __loader__ .  It has nothing to do with runpy.

> The problem is actually with runpy not being able to set __file__
> correctly, rather than being pdb specific.

You must be thinking issue4197 where two distinct problems are
adressed:  first, the crash due to __file__ set to None by runpy and
second, missing globs parameter to linecache.getlines() in doctest

My patch, doctest-1.patch works around the first issue and fixes the second.
Date User Action Args
2008-12-03 23:58:24belopolskysetrecipients: + belopolsky, ncoghlan
2008-12-03 23:58:23belopolskylinkissue4201 messages
2008-12-03 23:58:22belopolskycreate