You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2019-08-29.08:14:01.458>created_at=<Date2019-08-27.07:49:40.349>labels= ['3.8', 'type-bug', 'library', '3.9', 'expert-IO']
title='repr() of buffered and text streams silences too many exceptions'updated_at=<Date2019-08-29.08:14:01.457>user='https://github.com/serhiy-storchaka'
__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.
New changeset b235a1b by Serhiy Storchaka in branch 'master': bpo-37960: Silence only necessary errors in repr() of buffered and text streams. (GH-15543) b235a1b
New changeset 102130a by Miss Islington (bot) in branch '3.8': bpo-37960: Silence only necessary errors in repr() of buffered and text streams. (GH-15543) 102130a
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: