Martin Panter added the comment:

Victor suggested making these errors be reported by the finalize method 
(garbage collection). I started investigating this, but faced various test 
suite failures (test_io, test_curses), as well as many new unhandled exceptions 
printed out during the tests which do not actually trigger failures. Maybe this 
could become a worthwhile change, but it needs more investigation and wasn’t my 
original intention. Finalize-exception.patch is my patch so far.

There are many comments over the place that make me uneasy about this change, 
so I think it should be investigated separately. E.g. Modules/_io/iobase.c:

/* Silencing I/O errors is bad, but printing spurious tracebacks is
   equally as bad, and potentially more frequent (because of
   shutdown issues). */

Lib/_pyio.py:

# The try/except block is in case this is called at program
# exit time, when it's possible that globals have already been
# deleted, and then the close() call might fail.  Since
# there's nothing we can do about such failures and they annoy
# the end users, we suppress the traceback.

----------
Added file: http://bugs.python.org/file42360/finalize-exception.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26685>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to