This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Kerrick Staley
Recipients Kerrick Staley
Date 2020-04-27.03:07:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1587956856.04.0.83965486478.issue40403@roundup.psfhosted.org>
In-reply-to
Content
Summary:
When you call ast.literal_eval on a string that does not contain valid Python code, it raises a SyntaxError. This causes pdb to exit instead of stopping execution at the point that the SyntaxError was raised.

To reproduce:
1. Create a Python file foo.py with these contents:

    import ast
    ast.literal_eval('')

2. Run python -m pdb foo.py
3. Type 'c' and hit enter.

Expected behavior:
pdb drops into a shell in ast.py at the point where the SyntaxError occurred.

Actual behavior:
The program exits, and a SyntaxError traceback is displayed.

System configuration:
Python 3.8.2 on Arch Linux.
History
Date User Action Args
2020-04-27 03:07:36Kerrick Staleysetrecipients: + Kerrick Staley
2020-04-27 03:07:36Kerrick Staleysetmessageid: <1587956856.04.0.83965486478.issue40403@roundup.psfhosted.org>
2020-04-27 03:07:35Kerrick Staleylinkissue40403 messages
2020-04-27 03:07:35Kerrick Staleycreate