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 xdegaye
Recipients BreamoreBoy, eric.snow, georg.brandl, josh.r, xdegaye
Date 2015-02-27.09:39:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1425029991.76.0.0564393640954.issue20703@psf.upfronthosting.co.za>
In-reply-to
Content
> In that case the behavior you are seeing is correct, even if not obvious or even desirable.  It will happen any time you are looping over sys.modules and call a function/method which has a function-scoped import statement for a module that hasn't been imported yet (or calls another function that does so, etc.).

I do not agree. Suppose there is some piece of code that loops over sys.modules without doing any lazy import (and thus without raising the RuntimeError "dictionary changed size during iteration"). Now, if you insert a pdb.set_trace() in that code, you will get the RuntimeError and this is not correct.
History
Date User Action Args
2015-02-27 09:39:51xdegayesetrecipients: + xdegaye, georg.brandl, BreamoreBoy, eric.snow, josh.r
2015-02-27 09:39:51xdegayesetmessageid: <1425029991.76.0.0564393640954.issue20703@psf.upfronthosting.co.za>
2015-02-27 09:39:51xdegayelinkissue20703 messages
2015-02-27 09:39:51xdegayecreate