New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Global variables not seen by cprofile.run() #131
Comments
The problem is that cProfile (and also regular old profile) imports I know the reason that FakeModule exists has something to do with the namespace created for %run executions, but I'm not really sure if there's a way to override its...blankness, when running in interactive mode, without having all hell break loose. I should note also that putting that in a file and %running it works fine, but that's not really a surprise. I was looking for some low-hanging fruit like the other pull requests I've sent but I think this one is out of my league... hopefully my detective work will let someone pick this up more quickly. |
Thanks, David! I've bumped the priority for this one and made FakeModule label so we track all bugs related to this. It's true that this is not low-hanging fruit, but there are ways to help already: writing a set of tests that encapsulate all the known problems in test form would be a huge help. Pickling failures, this profile thing, etc. It would make the job of hunting the actual problem far far easier, right now part of the reason nobody has even tried is precisely that lacking any tests to know what 'fixing' means, we don't even start. |
Good point, I will have a look at adding tests for this and the pickle bug (marked as KnownFail, I guess?). I should probably get back to studying for part of today, so probably tomorrow. |
On Sat, Apr 9, 2011 at 1:42 PM, dwf
Yes, there's a knownfailure decorator recently added by Paul Ivanov. But please do focus on your exams for now, this can always wait. |
Fixed in master:
Closing. |
The core problem, as reported by Benjamin Root, is that this code doesn't work in IPython trunk:
This throws an exception
NameError: name 'math' is not defined
In plain Python it runs OK.
For further details:
http://mail.scipy.org/pipermail/ipython-dev/2010-July/006193.html
The text was updated successfully, but these errors were encountered: