bpo-35931: Gracefully handle SyntaxError in pdb debug command by blueyed · Pull Request #11782 · python/cpython
On the pdb prompt `debug print(` currently crashes, but `print(` displays that there's a SyntaxError. This patch fixes this by pre-compiling the code for `Pdb.run`.
zware
changed the title
bpo-35931: pdb: do_debug: handle SyntaxError
bpo-35931: Gracefully handle SyntaxError in pdb debug command
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request
Feb 15, 2019…GH-11782) Previously, `debug print(` would cause the interpreter to exit on a SyntaxError whereas `print(` would properly display the error and return to the pdb prompt. This patch fixes this by pre-compiling the code before passing it to `Pdb.run`. https://bugs.python.org/issue35931 (cherry picked from commit 4327705) Co-authored-by: Daniel Hahler <github@thequod.de>
blueyed
deleted the
do_debug-handle-SyntaxError
branch
miss-islington added a commit that referenced this pull request
Feb 15, 2019Previously, `debug print(` would cause the interpreter to exit on a SyntaxError whereas `print(` would properly display the error and return to the pdb prompt. This patch fixes this by pre-compiling the code before passing it to `Pdb.run`. https://bugs.python.org/issue35931 (cherry picked from commit 4327705) Co-authored-by: Daniel Hahler <github@thequod.de>
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