This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author martin.panter
Recipients martin.panter, vstinner
Date 2016-04-04.01:44:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1459734289.77.0.132237258723.issue26685@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2016-04-04 01:44:49martin.pantersetrecipients: + martin.panter, vstinner
2016-04-04 01:44:49martin.pantersetmessageid: <1459734289.77.0.132237258723.issue26685@psf.upfronthosting.co.za>
2016-04-04 01:44:49martin.panterlinkissue26685 messages
2016-04-04 01:44:48martin.pantercreate