[proxy] web.archive.org← back | site home | direct (HTTPS) ↗ | proxy home | ◑ dark◐ light
/ cpython Public
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.7] bpo-35931: Gracefully handle SyntaxError in pdb debug command (GH-11782) #11886

Merged
merged 1 commit into from Feb 15, 2019

Conversation

Copy link
Contributor

miss-islington commented Feb 15, 2019

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

https://bugs.python.org/issue35931

…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>
Copy link
Contributor Author

miss-islington commented Feb 15, 2019

@blueyed: Status check is done, and it's a success .

1 similar comment
Copy link
Contributor Author

miss-islington commented Feb 15, 2019

@blueyed: Status check is done, and it's a success .

zware approved these changes Feb 15, 2019
miss-islington merged commit 6f35219 into python:3.7 Feb 15, 2019
miss-islington deleted the backport-4327705-3.7 branch Feb 15, 2019
Copy link
Contributor

blueyed commented Mar 9, 2019

This breaks the API (you cannot pass in a compile() object anymore), and there is a better patch waiting, which then also should get backported, or this one being reverted.
See https://bugs.python.org/issue35931#msg337575.

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.

None yet

5 participants