Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: address comments
Signed-off-by: yihong0618 <[email protected]>
  • Loading branch information
yihong0618 committed Aug 26, 2025
commit f33f4ad171e86ba48e02ef38f02556cebd361f8d
6 changes: 3 additions & 3 deletions Lib/_pyrepl/unix_console.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,9 @@ def prepare(self):
tcsetattr(self.input_fd, termios.TCSADRAIN, raw)
except termios.error as e:
if e.args[0] != errno.EIO:
# gh-135329: when running under external programs (like strace),
# tcsetattr may fail with EIO. We can safely ignore this
# and continue with default terminal settings.
raise

# In macOS terminal we need to deactivate line wrap via ANSI escape code
Expand Down Expand Up @@ -376,9 +379,6 @@ def restore(self):
tcsetattr(self.input_fd, termios.TCSADRAIN, self.__svtermstate)
except termios.error as e:
if e.args[0] != errno.EIO:
# gh-135329: when running under external programs (like strace),
# tcsetattr may fail with EIO. We can safely ignore this
# and continue with default terminal settings.
raise

Comment thread
yihong0618 marked this conversation as resolved.
if platform.system() == "Darwin" and os.getenv("TERM_PROGRAM") == "Apple_Terminal":
Expand Down
Loading