Skip to content

Commit 0b15d9c

Browse files
authored
pythongh-128330: Terminal control characters should be restored on repl exit (python#128331)
1 parent ec91e1c commit 0b15d9c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Lib/_pyrepl/fancy_termios.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ def as_list(self):
4040
self.lflag,
4141
self.ispeed,
4242
self.ospeed,
43-
self.cc,
43+
# Always return a copy of the control characters list to ensure
44+
# there are not any additional references to self.cc
45+
self.cc[:],
4446
]
4547

4648
def copy(self):
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Restore terminal control characters on REPL exit.

0 commit comments

Comments
 (0)