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

gh-132912: Use readline to synchronize between procs in remote pdb test#132949

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

Merged

Conversation

gaogaotiantian
Copy link
Member

@gaogaotiantiangaogaotiantian commentedApr 25, 2025
edited
Loading

I think we can use stdout to do the synchronization. It's much simpler and we don't need to rely ontime.sleep() which will surprise you all the time.

This PR also get rid of the socket that is used to do synchronization. There's a downside to that - socket has a timeout which means if ourc did not work properly, it will hang forever. However, we are already risking the hanging because we have_read_until_prompt - that has areadline() in it and if something goes way out of control it will hang. I don't think the extra protection gave us much - because it's not a test forcontinue. If we need to consider the possibility that everything could go wrong, a lot of the existing tests need to be rewritten.

I also changed the sleep value because that makes the test take 1s+ on a perfect computer and that's a bit too much. 0.2s is more in the range of the time it already needs to spawn the process and everything.

Copy link
Member

@pablogsalpablogsal left a comment

Choose a reason for hiding this comment

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

LGTM but please check with this for a while to ensure we don't have surprises:

$ ./python -m test test_remote_pdb -v --forever -j10 --timeout=60

@gaogaotiantian
Copy link
MemberAuthor

I see no issues with a few hundred iterations.

pablogsal reacted with thumbs up emoji

@pablogsalpablogsal merged commita1f4a6b intopython:mainApr 25, 2025
48 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@pablogsalpablogsalpablogsal approved these changes

@vstinnervstinnerAwaiting requested review from vstinner

Assignees
No one assigned
Labels
skip newstestsTests in the Lib/test dir
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@gaogaotiantian@pablogsal

[8]ページ先頭

©2009-2025 Movatter.jp