classification
Title: Give pdb.set_trace() an optional `header` keyword argument
Type: Stage: resolved
Components: Library (Lib) Versions: Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: barry Nosy List: barry
Priority: normal Keywords: patch

Created on 2017-09-07 22:30 by barry, last changed 2017-09-22 16:30 by barry. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 3438 merged barry, 2017-09-07 22:46
Messages (3)
msg301643 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2017-09-07 22:30
IPython has a neat little feature where the function that enters the debugger takes an optional `header` argument.  If given, it is a string that's printed to the console just before the debugger is entered.

https://github.com/ipython/ipython/blob/master/IPython/terminal/embed.py#L177
https://mail.python.org/pipermail/python-dev/2017-September/149256.html

I kind of realized this would be nice to have in pdb, and the code is easy so here's the tracking issue.
msg301646 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2017-09-07 22:44
And specifically `header` is chosen to match IPython.  Why be different?
msg302754 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2017-09-22 16:29
New changeset 35425d638c0eeb8377620e016f47df3ae08d7061 by Barry Warsaw in branch 'master':
bpo-31389 Add an optional `header` argument to pdb.set_trace() (#3438)
https://github.com/python/cpython/commit/35425d638c0eeb8377620e016f47df3ae08d7061
History
Date User Action Args
2017-09-22 16:30:06barrysetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2017-09-22 16:29:44barrysetmessages: + msg302754
2017-09-07 22:46:34barrysetkeywords: + patch
stage: patch review
pull_requests: + pull_request3435
2017-09-07 22:44:10barrysetmessages: + msg301646
2017-09-07 22:30:47barrycreate