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 2020-10-30 23:07 by iritkatriel.

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 triager) 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
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