Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

bpo-21161: pdb: default: handle list comprehensions#15194

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed

Conversation

@blueyed
Copy link
Contributor

@blueyedblueyed commentedAug 9, 2019
edited
Loading

Fixeshttps://bugs.python.org/issue21161.

TODO:

  • test
  • news
  • attribute patch author (Xavier de Gaye (xdegaye),@xdegaye)

https://bugs.python.org/issue21161

@blueyed
Copy link
ContributorAuthor

blueyed commentedAug 9, 2019
edited
Loading

test_gdb crashed on Azure (https://dev.azure.com/Python/cpython/_build/results?buildId=48361&view=logs&j=c83831cd-3752-5cc7-2f01-8276919eb334):

0:12:45 load avg: 0.01 [418/419] test_io passed (4 min 23 sec) -- running: test_gdb (10 min 1 sec)running: test_gdb (10 min 31 sec)running: test_gdb (11 min 1 sec)running: test_gdb (11 min 31 sec)running: test_gdb (15 min 31 sec)running: test_gdb (16 min 1 sec)running: test_gdb (16 min 31 sec)running: test_gdb (17 min 1 sec)running: test_gdb (17 min 31 sec)running: test_gdb (18 min 1 sec)running: test_gdb (18 min 31 sec)running: test_gdb (19 min 1 sec)running: test_gdb (19 min 31 sec)Timeout (0:20:00)!0:22:44 load avg: 0.00 [419/419/1] test_gdb crashed (Exit code 1)Thread 0x00000fa4 (most recent call first):File "D:\a\1\s\lib\subprocess.py", line 1353 in _readerthreadFile "D:\a\1\s\lib\threading.py", line 876 in runFile "D:\a\1\s\lib\threading.py", line 938 in _bootstrap_innerFile "D:\a\1\s\lib\threading.py", line 896 in _bootstrapThread 0x000003f4 (most recent call first):File "D:\a\1\s\lib\subprocess.py", line 1353 in _readerthreadFile "D:\a\1\s\lib\threading.py", line 876 in runFile "D:\a\1\s\lib\threading.py", line 938 in _bootstrap_innerFile "D:\a\1\s\lib\threading.py", line 896 in _bootstrapThread 0x00000a7c (most recent call first):File "D:\a\1\s\lib\threading.py", line 1033 in _wait_for_tstate_lockFile "D:\a\1\s\lib\threading.py", line 1017 in joinFile "D:\a\1\s\lib\subprocess.py", line 1382 in _communicateFile "D:\a\1\s\lib\subprocess.py", line 1015 in communicateFile "D:\a\1\s\lib\test\test_gdb.py", line 105 in run_gdbFile "D:\a\1\s\lib\test\test_gdb.py", line 122 in gdb_has_frame_selectFile "D:\a\1\s\lib\test\test_gdb.py", line 129 in <module>File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removedFile "<frozen importlib._bootstrap_external>", line 782 in exec_module== Tests result: FAILURE ==

(retrying)

@blueyedblueyedforce-pushed thepdb-list-comprehensions branch from00fac9a toff84fb3CompareAugust 12, 2019 01:16
@viniciusd
Copy link

Congrats for the work here :)
It looks to me it covers other kinds of comprehensions as well, right? Like set and dictionary comprehension. What do you think of also testing those?

@blueyed
Copy link
ContributorAuthor

What do you think of also testing those?

I do not think it is necessary really - the test proves that the namespace is handled properly/differently already.

epicfaace reacted with thumbs up emoji

deftest_list_comprehensions(self):
script="""
def f():
mylocal = "init_mylocal" # noqa: F841
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

What does the comment mean?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Local variable name is assigned to but never used (F841)

commands="""
continue
p "mylocal:" + mylocal
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Do you need this line in the test?

ifline[:1]=='!':line=line[1:]
locals=self.curframe_locals
globals=self.curframe.f_globals
ns=self.curframe.f_globals.copy()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

What it the code that is being debugged changesglobals()? This would mean any changes to self.curframe.f_globals by the calling code is dropped, is it not?

@erlend-aasland
Copy link
Contributor

The linked issue was fixed by#111094; closing this since the linked issue is now resolved.

Thanks for your interest in improving CPython!

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

3 more reviewers

@gogobdgogobdgogobd left review comments

@epicfaaceepicfaaceepicfaace left review comments

@impact27impact27impact27 left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

9 participants

@blueyed@viniciusd@erlend-aasland@gogobd@epicfaace@impact27@the-knights-who-say-ni@ezio-melotti@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp