FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-94026: Workaround for BlockingIOError in runtest_mp on Emscripten by tiran · Pull Request #94164 · python/cpython · GitHub

/ cpython Public

gh-94026: Workaround for BlockingIOError in runtest_mp on Emscripten - #94164

Closed
tiran wants to merge 1 commit into
python:mainfrom
tiran:gh-94026
Closed

gh-94026: Workaround for BlockingIOError in runtest_mp on Emscripten#94164
tiran wants to merge 1 commit into
python:mainfrom
tiran:gh-94026

Conversation

tiran commented Jun 23, 2022
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

runtest_mp test worker now handles :exc:BlockingIOError to work around
non-blocking pipes on Emscripten.

tiran added tests Tests in the Lib/test dir needs backport to 3.11 only security fixes labels Jun 23, 2022

tiran commented Jun 23, 2022

Copy link
Copy Markdown
Member Author

@vstinner @serhiy-storchaka please take a look. I know that you enjoy I/O shenanigans :)

…ipten

`runtest_mp` test worker now handles :exc:`BlockingIOError` to work around
non-blocking pipes on Emscripten.
"""
data = data.encode(stream.encoding)
# flush buffers, just in case
stream.flush()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

It can fail here.

vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

A pipe can block. If you want to avoid errors when writing into a pipe: use a temporary named file instead.

tiran commented Jun 23, 2022

Copy link
Copy Markdown
Member Author

A blocking pipe would not be an issue. The problem is that Emscripten on NodeJS uses a non-blocking pipe for standard streams.

tiran commented Jun 26, 2022

Copy link
Copy Markdown
Member Author

Closing in favor of approach #94253

tiran closed this Jun 26, 2022
tiran added DO-NOT-MERGE and removed needs backport to 3.11 only security fixes labels Jun 26, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL