← 返回首页
Fix %debug and ipdb with Python 3.15 by frenzymadness · Pull Request #15220 · ipython/ipython · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

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

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

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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

1 participant

Footer

© 2026 GitHub, Inc.