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: Readline Bindings Don't Report Any Error On Completer Function Exception
Type: behavior Stage:
Components: Documentation Versions: Python 3.6, Python 3.4, Python 3.5, Python 2.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Perry Randall, docs@python, martin.panter, steven.daprano
Priority: normal Keywords: patch

Created on 2015-06-13 02:57 by Perry Randall, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
readline_exception.patch Perry Randall, 2015-06-13 02:57 Simple change to readline review
Messages (4)
msg245285 - (view) Author: Perry Randall (Perry Randall) Date: 2015-06-13 02:57
Noticed this while writing a non-trivial completion function for readline.set_completer. When an exception is thrown in the completion function readline doesnt do anything, squashes the error, this should not be the case.
msg245286 - (view) Author: Steven D'Aprano (steven.daprano) * (Python committer) Date: 2015-06-13 03:32
I disagree that it "should not be the case", I think Python's current behaviour is correct. Although it makes debugging completer functions harder, it would not be good for a bug in the completer to raise an exception and break line editing. This is one case where errors should be silenced.

Instead, my completion functions log errors to a file, and I watch the log file in another terminal window.
msg245287 - (view) Author: Perry Randall (Perry Randall) Date: 2015-06-13 03:41
Ah yeah you're correct, on second thought I think an addition to the readline documentation is warranted, not a code change.
msg245411 - (view) Author: Perry Randall (Perry Randall) Date: 2015-06-15 22:59
Decided to update the documentation instead
History
Date User Action Args
2022-04-11 14:58:18adminsetgithub: 68630
2015-06-15 22:59:04Perry Randallsetstatus: open -> closed
resolution: not a bug
messages: + msg245411
2015-06-13 04:56:30martin.pantersetnosy: + martin.panter
2015-06-13 04:10:12r.david.murraysetassignee: docs@python

nosy: + docs@python
components: + Documentation, - Interpreter Core
versions: - Python 3.2, Python 3.3
2015-06-13 03:41:37Perry Randallsetmessages: + msg245287
2015-06-13 03:32:09steven.dapranosetnosy: + steven.daprano
messages: + msg245286
2015-06-13 02:57:56Perry Randallcreate