Skip to content

Fix %debug and ipdb with Python 3.15#15220

Open
frenzymadness wants to merge 1 commit into
ipython:mainfrom
frenzymadness:315b1_pyrepl_ipdb
Open

Fix %debug and ipdb with Python 3.15#15220
frenzymadness wants to merge 1 commit into
ipython:mainfrom
frenzymadness:315b1_pyrepl_ipdb

Conversation

@frenzymadness

Copy link
Copy Markdown
Contributor

Python 3.15 introduced PyREPL as the default pdb input backend (via _maybe_use_pyrepl_as_stdin()), which temporarily sets use_rawinput=False before calling cmdloop(). IPython's TerminalPdb raises ValueError when it sees use_rawinput=False.

Override _cmdloop() in IPython.core.debugger.Pdb to bypass the PyREPL wrapping — IPython already has its own input handling via prompt_toolkit and doesn't need PyREPL.

Fixes: #15217

@Carreau

Carreau commented May 26, 2026

Copy link
Copy Markdown
Member

@copilot resolve the merge conflicts in this pull request

Python 3.15 introduced PyREPL as the default pdb input backend
(via _maybe_use_pyrepl_as_stdin()), which temporarily sets
use_rawinput=False before calling cmdloop(). IPython's TerminalPdb
raises ValueError when it sees use_rawinput=False.

Override _cmdloop() in IPython.core.debugger.Pdb to bypass the
PyREPL wrapping — IPython already has its own input handling via
prompt_toolkit and doesn't need PyREPL.

Fixes: ipython#15217
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ipdb does not work with Python 3.15 beta 1

2 participants