gh-143082: Make readline work when sys.stdin is explicitly passed to pdb (#143083)

This commit is contained in:
Denizhan Dakılır 2026-01-05 07:39:11 +03:00 committed by GitHub
parent c99f766743
commit 68fcb958eb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -364,7 +364,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
bdb.Bdb.__init__(self, skip=skip, backend=backend if backend else get_default_backend())
cmd.Cmd.__init__(self, completekey, stdin, stdout)
sys.audit("pdb.Pdb")
if stdin:
if stdin is not None and stdin is not sys.stdin:
self.use_rawinput = False
self.prompt = '(Pdb) '
self.aliases = {}

View File

@ -0,0 +1 @@
Fix :mod:`pdb` arrow key history not working when ``stdin`` is ``sys.stdin``.