[issue22836] Broken "Exception ignored in:" message on exceptions in __repr__

2019-01-15 Thread Ori Avtalion
Ori Avtalion added the comment: I encountered a similar bug and reported it as issue 35743. -- nosy: +salty-horse ___ Python tracker ___

[issue22836] Broken "Exception ignored in:" message on exceptions in __repr__

2016-02-27 Thread Martin Panter
Martin Panter added the comment: FTR Python 2’s exception report in __del__() is a bit different, here is what it now looks like: >>> o = VeryBroken() >>> del o Exception __main__.BrokenStrException: in ignored -- resolution: -> fixed stage: commit review -> resolved status: open

[issue22836] Broken "Exception ignored in:" message on exceptions in __repr__

2016-02-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset cf70b1204e44 by Martin Panter in branch '3.5': Issue #22836: Keep exception reports sensible despite errors https://hg.python.org/cpython/rev/cf70b1204e44 New changeset 2b597e03f7f4 by Martin Panter in branch 'default': Issue #22836: Merge

[issue22836] Broken "Exception ignored in:" message on exceptions in __repr__

2016-02-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset fca9f02e10e5 by Martin Panter in branch '2.7': Issue #22836: Keep exception reports sensible despite errors https://hg.python.org/cpython/rev/fca9f02e10e5 -- nosy: +python-dev ___ Python tracker

[issue22836] Broken "Exception ignored in:" message on exceptions in __repr__

2016-02-25 Thread Martin Panter
Martin Panter added the comment: Here is a new patch with Victor’s suggestions. The reports now look like >>> raise BrokenStrException() Traceback (most recent call last): File "", line 1, in __main__.BrokenStrException: >>> o = VeryBroken() >>> del o Exception ignored in: Traceback (most

[issue22836] Broken "Exception ignored in:" message on exceptions in __repr__

2016-02-24 Thread STINNER Victor
STINNER Victor added the comment: I like the idea of enhance code writing exception reports, I'm strongly opposed to modify repr() to ignore exceptions. I would to be noticed when repr() fails badly. I like how the logging module catchs any formating error and logs an error when the

[issue22836] Broken "Exception ignored in:" message on exceptions in __repr__

2016-02-24 Thread STINNER Victor
STINNER Victor added the comment: I reviewed unraisable-continue.v4.patch, comments on Rietveld. Would it be possible to include at least the name of the exception type in the error message? It's less likely than writing Py_TYPE(obj)->tp_name failed, than error in exc.__str() no? --

[issue22836] Broken "Exception ignored in:" message on exceptions in __repr__

2016-02-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Surely changing the behavior of repr() can be made only in the default branch. this issue needs the patch for all versions. I don't know whether this is the best solution, but the patch looks good enough to me at this moment. If you have no doubts feel free

[issue22836] Broken "Exception ignored in:" message on exceptions in __repr__

2016-02-17 Thread Martin Panter
Martin Panter added the comment: Thanks for the review; here is an updated patch. If we just fall back the the default, it hides the fact that that there is a problem in the custom __repr__() method. Another option may be to both indicate there was an error, _and_ a fall back. --

[issue22836] Broken "Exception ignored in:" message on exceptions in __repr__

2016-02-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This may be a part of more general issue. Should repr() fail at all? Wouldn't be better to fall back to the default __repr__ instead? repr() is typically used for debugging. Failing repr() can be a part of larger __repr__, thus raising an exception in

[issue22836] Broken "Exception ignored in:" message on exceptions in __repr__

2016-02-17 Thread Martin Panter
Martin Panter added the comment: Yes a review would help. Also, I suspect this will require a separate patch for Python 2. When I get a chance I will have another look at this and see if I am comfortable committing it. -- ___ Python tracker

[issue22836] Broken "Exception ignored in:" message on exceptions in __repr__

2016-02-17 Thread Florian Bruhin
Florian Bruhin added the comment: I just got bitten by this again - is anything holding this back from being merged (other than lack of review-manpower)? -- ___ Python tracker

[issue22836] Broken Exception ignored in: message on exceptions in __repr__

2015-06-09 Thread Martin Panter
Martin Panter added the comment: Updated the patch to address an oversight in the new test cases. I think Issue 6294 is probably the same underlying issue. The patch there could be used as the basis for a Python 2 patch. My patches here are for Python 3, and I suspect the code is

[issue22836] Broken Exception ignored in: message on exceptions in __repr__

2014-12-21 Thread R. David Murray
R. David Murray added the comment: See also issue 6294 for a related problem. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22836 ___ ___

[issue22836] Broken Exception ignored in: message on exceptions in __repr__

2014-12-21 Thread Martin Panter
Martin Panter added the comment: Patch v2 revises the unit tests so they are cleaner. Also now tests that the repr() failed placeholders are in the exception reports. -- Added file: http://bugs.python.org/file37524/unraisable-continue.v2.patch ___

[issue22836] Broken Exception ignored in: message on exceptions in __repr__

2014-12-19 Thread Martin Panter
Martin Panter added the comment: Here is a patch that substitutes an explanation if the repr() fails. Output now looks like this, terminated with a newline: === BrokenObj === Exception ignored in: repr() failed Traceback (most recent call last): File stdin, line 3, in __del__ Exception: in

[issue22836] Broken Exception ignored in: message on exceptions in __repr__

2014-11-13 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22836 ___

[issue22836] Broken Exception ignored in: message on exceptions in __repr__

2014-11-10 Thread Florian Bruhin
New submission from Florian Bruhin: When there's an unraisable exception (e.g. in __del__), and there's an exception in __repr__ as well, PyErr_WriteUnraisable returns after writing Exception ignored in: immediately. I'd expect it to fall back to the default __repr__ instead. See the

[issue22836] Broken Exception ignored in: message on exceptions in __repr__

2014-11-10 Thread Martin Panter
Martin Panter added the comment: This is one that has often bugged me. When your repr() implementation is broken, it is quite confusing figuring out what is going wrong. Falling back to object.__repr__() is one option, however I would probably be happy with a simple “exception in repr()”

[issue22836] Broken Exception ignored in: message on exceptions in __repr__

2014-11-10 Thread Florian Bruhin
Changes by Florian Bruhin python@the-compiler.org: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22836 ___ ___

[issue22836] Broken Exception ignored in: message on exceptions in __repr__

2014-11-10 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22836 ___ ___