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

split long lines of js input for node.js to avoid tty issues #140

Merged
merged 16 commits into from
Jul 15, 2024

Conversation

joemarshall
Copy link
Collaborator

This fixes issue #139 . It would be nice to get it merged so I can test node.js in urllib3

@joemarshall joemarshall marked this pull request as draft July 11, 2024 15:56
@joemarshall
Copy link
Collaborator Author

Hmm, it seems to break a couple of tests. I'll look at it later.

@joemarshall joemarshall marked this pull request as ready for review July 12, 2024 13:18
@joemarshall
Copy link
Collaborator Author

Hi @ryanking13 if there's any chance you could look over this - I'd like to merge it soon because it is needed for urllib3/urllib3#3427 to pass testing.

Basically rather than relying on the tty that node is running in to accept super long lines, it instead splits the lines sent to node.js into shorter lines and reassembles them at the node end.

This is needed because in nox tests in urllib3, it is running inside a subprocess, so the change to the tty doesn't affect the subprocess stdin/out, and instead affects the outer tty.

Copy link
Member

@ryanking13 ryanking13 left a comment

Choose a reason for hiding this comment

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

Thanks @joemarshall. I left some minor comments about the readability for future readers of this code. The feature-wise looks good to me. So feel free to merge and release after resolving my comments.

pytest_pyodide/node_test_driver.js Outdated Show resolved Hide resolved
pytest_pyodide/node_test_driver.js Outdated Show resolved Hide resolved
pytest_pyodide/runner.py Show resolved Hide resolved
pytest_pyodide/node_test_driver.js Outdated Show resolved Hide resolved
pytest_pyodide/runner.py Show resolved Hide resolved
joemarshall and others added 3 commits July 15, 2024 13:23
@joemarshall joemarshall merged commit 67e933d into pyodide:main Jul 15, 2024
16 checks passed
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