Skip to content

Commit 52ccf26

Browse files
[3.13] gh-128330: Terminal control characters should be restored on repl exit (GH-128331) (#129233)
gh-128330: Terminal control characters should be restored on repl exit (GH-128331) (cherry picked from commit 0b15d9c) Co-authored-by: Andy Fiddaman <andy@omnios.org>
1 parent e3b3e01 commit 52ccf26

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)