Skip to content

Conversation

@gaogaotiantian
Copy link
Member

@gaogaotiantian gaogaotiantian commented Jul 13, 2024

In the header test for pdb.set_trace, we redirected stdout to a string buffer, but that would only work when we create the Pdb instance after the patch. Due to the changes in #121451 , that's not always guaranteed. So for this test, we clear the Pdb._last_pdb_instance before pdb.set_trace(), which enforces pdb.set_trace() to create a new Pdb instance which has the redirected stdout.

@bedevere-app bedevere-app bot added tests Tests in the Lib/test dir awaiting core review labels Jul 13, 2024
@gaogaotiantian gaogaotiantian added skip news and removed tests Tests in the Lib/test dir awaiting core review labels Jul 13, 2024
@gaogaotiantian
Copy link
Member Author

@Eclips4 feel free to take a look at this fix and confirm this works. I tried it locally and ./python -m test test_pdb --forever worked fine.

Copy link
Member

@Eclips4 Eclips4 left a comment

Choose a reason for hiding this comment

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

@Eclips4 feel free to take a look at this fix and confirm this works. I tried it locally and ./python -m test test_pdb --forever worked fine.

Yes, I can confirm that this fixes the problem. Thanks!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants