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.

Author martin.panter
Recipients Arfrever, The Compiler, martin.panter, r.david.murray, vstinner
Date 2015-06-10.02:02:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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 significantly different in each version, because the error messages are different.

Comparison (for bikeshedding etc) with the message produced by the “traceback” module when str() fails:

>>> try:
...     raise BrokenStrException("message")
... except BrokenStrException:
...     print_exc()
...     raise
Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
BrokenStrException: <unprintable BrokenStrException object>
Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
__main__.BrokenStrException: <str() failed>
Date User Action Args
2015-06-10 02:02:06martin.pantersetrecipients: + martin.panter, vstinner, Arfrever, r.david.murray, The Compiler
2015-06-10 02:02:06martin.pantersetmessageid: <>
2015-06-10 02:02:06martin.panterlinkissue22836 messages
2015-06-10 02:02:06martin.pantercreate