[issue26705] logging.Handler.handleError should be called from logging.Handler.handle

2016-04-10 Thread Aviv Palivoda
Aviv Palivoda added the comment: I see the backwards compatibility issue. I have two suggestion's how to improve the code without breaking backwards compatibility: 1. Add a new Handler class named SafeHandler that will implement handle in the way suggested in the previous patch. All the stdlib

[issue26705] logging.Handler.handleError should be called from logging.Handler.handle

2016-04-10 Thread Aviv Palivoda
Changes by Aviv Palivoda : Added file: http://bugs.python.org/file42426/logging-handleException.patch ___ Python tracker ___ ___ Python-bugs-l

[issue26705] logging.Handler.handleError should be called from logging.Handler.handle

2016-04-06 Thread Vinay Sajip
Vinay Sajip added the comment: Thanks for the suggestion, but I'm not sure this can be accepted without violating backward compatibility. It forces each handler implementation to either accept the base implementation of handleError(), or to override it. And if there are existing handler implem

[issue26705] logging.Handler.handleError should be called from logging.Handler.handle

2016-04-06 Thread Aviv Palivoda
New submission from Aviv Palivoda: Currently all the stdlib logging handlers (except BufferingHandler) emit method have the following structure: def emit(self, record): try: // do the emit except Exception: self.handleError(record) I suggest changing