Skip to content
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

Allow delays smaller than 50ms by setting delaybeforesend to None #12

Merged
merged 1 commit into from
Dec 22, 2023

Conversation

punchagan
Copy link
Contributor

Pexpect added[1] a default delay of 50ms before send, by default, to work around an issue with passwords being echod. This makes it impossible to have delays smaller than this 50ms, currently. This commit allows setting delaybeforesend to None, which is recommended by Pexpect to remove this additional delay hardcoded in Pexpect's code.

[1] - https://github.com/pexpect/pexpect/blob/master/pexpect/pty_spawn.py#L136-L150

@PierreMarchand20
Copy link
Owner

Thank you again for your contribution! I will fix the CI...

@punchagan
Copy link
Contributor Author

Thank you again for your contribution! I will fix the CI...

Thank you. Apologies for not being able to look into the CI issues myself. Thank you for looking into them!

@PierreMarchand20
Copy link
Owner

I was afraid CI failed because my tests were not robust enough, but it is actually the PR who broke it :-) 50 means 50 seconds :D 50 seconds to send each character made the action timed out.

Pexpect added[1] a default delay of 50ms before send, by default, to work
around an issue with passwords being echod.  This makes it impossible to have
delays smaller than this 50ms, currently.  This commit allows setting
delaybeforesend to None, which is recommended by Pexpect to remove this
additional delay hardcoded in Pexpect's code.

[1] - https://github.com/pexpect/pexpect/blob/master/pexpect/pty_spawn.py#L136-L150
@PierreMarchand20 PierreMarchand20 merged commit a1a8332 into PierreMarchand20:main Dec 22, 2023
1 check passed
PierreMarchand20

This comment was marked as duplicate.

@punchagan
Copy link
Contributor Author

I was afraid CI failed because my tests were not robust enough, but it is actually the PR who broke it :-) 50 means 50 seconds :D 50 seconds to send each character made the action timed out.

Ah! I would've caught it if I used the default with my scripts, but I had already switched to None.

Thanks for figuring this out and fixing it!

@punchagan punchagan deleted the delaybeforesend branch December 23, 2023 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants