Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1)

#22836: Broken "Exception ignored in:" message on exceptions in __repr__

Can't Edit
Can't Publish+Mail
Start Review
Created:
5 years, 1 month ago by python.org
Modified:
3 years, 11 months ago
Reviewers:
vadmium+py, storchaka, victor.stinner
CC:
ori_avtalion.name, haypo, Arfrever, r.david.murray, devnull_psf.upfronthosting.co.za, Martin Panter, storchaka, python.org_the-compiler.org
Visibility:
Public.

Patch Set 1 #

Total comments: 1

Patch Set 2 #

Patch Set 3 #

Total comments: 8

Patch Set 4 #

Total comments: 8

Patch Set 5 #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Doc/c-api/exceptions.rst View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
Lib/test/test_exceptions.py View 1 2 3 4 4 chunks +66 lines, -2 lines 0 comments Download
Misc/NEWS View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
Python/errors.c View 1 2 3 4 2 chunks +12 lines, -4 lines 0 comments Download
Python/pythonrun.c View 1 2 3 4 2 chunks +7 lines, -1 line 0 comments Download

Messages

Total messages: 5
Martin Panter
https://bugs.python.org/review/22836/diff/13468/Lib/test/test_exceptions.py File Lib/test/test_exceptions.py (right): https://bugs.python.org/review/22836/diff/13468/Lib/test/test_exceptions.py#newcode1003 Lib/test/test_exceptions.py:1003: [rc, report, _] = assert_python_failure("-c", script) Just realized this ...
5 years, 1 month ago #1
storchaka_gmail.com
http://bugs.python.org/review/22836/diff/15058/Lib/test/test_exceptions.py File Lib/test/test_exceptions.py (right): http://bugs.python.org/review/22836/diff/15058/Lib/test/test_exceptions.py#newcode957 Lib/test/test_exceptions.py:957: exc = self.exc_type("del is broken") This looks too complicated. ...
3 years, 11 months ago #2
Martin Panter
https://bugs.python.org/review/22836/diff/15058/Lib/test/test_exceptions.py File Lib/test/test_exceptions.py (right): https://bugs.python.org/review/22836/diff/15058/Lib/test/test_exceptions.py#newcode957 Lib/test/test_exceptions.py:957: exc = self.exc_type("del is broken") On 2016/02/17 13:30:38, storchaka ...
3 years, 11 months ago #3
victor.stinner_gmail.com
http://bugs.python.org/review/22836/diff/16601/Misc/NEWS File Misc/NEWS (right): http://bugs.python.org/review/22836/diff/16601/Misc/NEWS#newcode14 Misc/NEWS:14: them secondary produces secondary errors. Please mention PyErr_WriteUnraisable() function, ...
3 years, 11 months ago #4
Martin Panter
3 years, 11 months ago #5
https://bugs.python.org/review/22836/diff/16601/Misc/NEWS
File Misc/NEWS (right):

https://bugs.python.org/review/22836/diff/16601/Misc/NEWS#newcode14
Misc/NEWS:14: them secondary produces secondary errors.
On 2016/02/24 10:53:15, haypo wrote:
> Please mention PyErr_WriteUnraisable() function, otherwise it's hard to
> understand what are "exception reports". Or maybe mention that such reports
> usually occur in destructors?

Added both; see new patch.

https://bugs.python.org/review/22836/diff/16601/Python/errors.c
File Python/errors.c (right):

https://bugs.python.org/review/22836/diff/16601/Python/errors.c#newcode915
Python/errors.c:915: if (PyFile_WriteString("<repr() failed>", f) < 0) {
On 2016/02/24 10:53:15, haypo wrote:
> I suggest <object str() failed>

Changed, except with repr() not str() :)

https://bugs.python.org/review/22836/diff/16601/Python/errors.c#newcode965
Python/errors.c:965: if (PyFile_WriteString("<str() failed>", f) < 0) {
On 2016/02/24 10:53:15, haypo wrote:
> I suggest <exception str() failed>

Done.

https://bugs.python.org/review/22836/diff/16601/Python/pythonrun.c
File Python/pythonrun.c (right):

https://bugs.python.org/review/22836/diff/16601/Python/pythonrun.c#newcode770
Python/pythonrun.c:770: PyFile_WriteString(": <str() failed>", f);
On 2016/02/24 10:53:15, haypo wrote:
> I suggest <exception str() failed>

Done.
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+