Author serhiy.storchaka
Recipients serhiy.storchaka
Date 2019-08-27.07:49:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
__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.
Date User Action Args
2019-08-27 07:49:40serhiy.storchakasetrecipients: + serhiy.storchaka
2019-08-27 07:49:40serhiy.storchakasetmessageid: <>
2019-08-27 07:49:40serhiy.storchakalinkissue37960 messages
2019-08-27 07:49:40serhiy.storchakacreate