Serhiy Storchaka added the comment: I think it should be closed as "not a bug".
If io.TextIOWrapper() is successful, it is responsible for property closing a binary file. The bug is in user code, not in the interpreter code. _Py_DisplaySourceLine() correctly calls binary.close() if io.TextIOWrapper() failed. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31444> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com