Author serhiy.storchaka
Recipients serhiy.storchaka
Date 2019-08-27.07:49:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1566892180.39.0.647932070898.issue37960@roundup.psfhosted.org>
In-reply-to
Content
__repr__() implementations of buffered and text streams try to include the value of "name" and "mode" attributes in the result. But they silence too wide range of exceptions (all subclasses of Exception) when try to get these values. This includes such exceptions as MemoryError or RecursionError which can be occurred in virtually any code.

The proposed PR narrows the range of silenced exceptions to the necessary minimum: expected AttributeError and ValueError. The latter is raised if the underlying stream was detached.
History
Date User Action Args
2019-08-27 07:49:40serhiy.storchakasetrecipients: + serhiy.storchaka
2019-08-27 07:49:40serhiy.storchakasetmessageid: <1566892180.39.0.647932070898.issue37960@roundup.psfhosted.org>
2019-08-27 07:49:40serhiy.storchakalinkissue37960 messages
2019-08-27 07:49:40serhiy.storchakacreate