bpo-21161: pdb: default: handle list comprehensions#15194
bpo-21161: pdb: default: handle list comprehensions#15194blueyed wants to merge 1 commit intopython:mainfrom
Conversation
|
test_gdb crashed on Azure (https://dev.azure.com/Python/cpython/_build/results?buildId=48361&view=logs&j=c83831cd-3752-5cc7-2f01-8276919eb334): (retrying) |
00fac9a to
ff84fb3
Compare
|
Congrats for the work here :) |
I do not think it is necessary really - the test proves that the namespace is handled properly/differently already. |
| def test_list_comprehensions(self): | ||
| script = """ | ||
| def f(): | ||
| mylocal = "init_mylocal" # noqa: F841 |
There was a problem hiding this comment.
What does the comment mean?
There was a problem hiding this comment.
Local variable name is assigned to but never used (F841)
| commands = """ | ||
| continue | ||
|
|
||
| p "mylocal:" + mylocal |
There was a problem hiding this comment.
Do you need this line in the test?
| if line[:1] == '!': line = line[1:] | ||
| locals = self.curframe_locals | ||
| globals = self.curframe.f_globals | ||
| ns = self.curframe.f_globals.copy() |
There was a problem hiding this comment.
What it the code that is being debugged changes globals()? This would mean any changes to self.curframe.f_globals by the calling code is dropped, is it not?
|
The linked issue was fixed by #111094; closing this since the linked issue is now resolved. Thanks for your interest in improving CPython! |
Fixes https://bugs.python.org/issue21161.
TODO:
https://bugs.python.org/issue21161