New submission from Serhiy Storchaka <storchaka+cpyt...@gmail.com>:
__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. ---------- components: IO, Library (Lib) messages: 350614 nosy: serhiy.storchaka priority: normal severity: normal status: open title: repr() of buffered and text streams silences too many exceptions type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue37960> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com