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.

classification
Title: pdb exits unexpectedly when calling args
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.10, Python 3.9, Python 3.8
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: iritkatriel, xgenadam
Priority: normal Keywords:

Created on 2020-10-28 18:07 by xgenadam, last changed 2022-04-11 14:59 by admin.

Files
File name Uploaded Description Edit
bug_example.py xgenadam, 2020-10-28 18:07 simple reproduction
Messages (2)
msg379838 - (view) Author: Adam Merchant (xgenadam) Date: 2020-10-28 18:07
When an objects __repr__ or __str__ methods return None a TypeError is raised. However if this object is passed to a function and `args` is called from within pdb, pdb will immediately exit.

Attached to this is bug_example.py which contains a simple example of how to reproduce this.

Depending on circumstances this can make debugging difficult.

exact python version that this happened with:
Python 3.6.11
msg380011 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2020-10-30 23:07
This is true in 3.10 as well. The same happens if __repr__ raises an exception. do_args command doesn't handle exceptions from repr.

See also issue37022.
History
Date User Action Args
2022-04-11 14:59:37adminsetgithub: 86350
2020-10-30 23:07:36iritkatrielsetversions: + Python 3.8, Python 3.9, Python 3.10, - Python 3.6
nosy: + iritkatriel

messages: + msg380011

components: + Library (Lib)
2020-10-28 18:07:15xgenadamcreate