diff --git a/Lib/doctest.py b/Lib/doctest.py index 0db75b4343d..d1b96d4d08f 100644 --- a/Lib/doctest.py +++ b/Lib/doctest.py @@ -318,6 +318,8 @@ def __init__(self, out): self.__out = out self.__debugger_used = False pdb.Pdb.__init__(self, stdout=out) + # still use input() to get user input + self.use_rawinput = 1 def set_trace(self, frame=None): self.__debugger_used = True diff --git a/Misc/NEWS b/Misc/NEWS index 901d21f8320..50fa0cf0d79 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -475,6 +475,9 @@ C-API Library ------- +- Issue #5727: Restore the ability to use readline when calling into pdb + in doctests. + - Issue #6719: In pdb, do not stop somewhere in the encodings machinery if the source file to be debugged is in a non-builtin encoding.