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

Skip to content

Commit d72e043

Browse files
committed
#5727: Restore the ability to use readline when calling into pdb in doctests.
1 parent 06535ee commit d72e043

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

Lib/doctest.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,8 @@ def __init__(self, out):
318318
self.__out = out
319319
self.__debugger_used = False
320320
pdb.Pdb.__init__(self, stdout=out)
321+
# still use input() to get user input
322+
self.use_rawinput = 1
321323

322324
def set_trace(self, frame=None):
323325
self.__debugger_used = True

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,9 @@ C-API
475475
Library
476476
-------
477477

478+
- Issue #5727: Restore the ability to use readline when calling into pdb
479+
in doctests.
480+
478481
- Issue #6719: In pdb, do not stop somewhere in the encodings machinery
479482
if the source file to be debugged is in a non-builtin encoding.
480483

0 commit comments

Comments
 (0)