[issue20918] LogRecord.__init__ should handle exception if % operation fails

2014-03-14 Thread Vinay Sajip
Vinay Sajip added the comment: Shouldn't any fix also be applied to 3.3? According to PEP 398, there will be a 3.3.6 release after 3.4 is released (around May 2014). -- versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org

[issue20918] LogRecord.__init__ should handle exception if % operation fails

2014-03-14 Thread Vinay Sajip
Vinay Sajip added the comment: I've looked into it further, and IMO this is not a bug. The rationale is this: when an exception is raised during logging, it is passed to a handleError method, see http://hg.python.org/cpython/file/67ada6ab7fe2/Lib/logging/__init__.py#l786 This swallows the

[issue20918] LogRecord.__init__ should handle exception if % operation fails

2014-03-13 Thread the mulhern
New submission from the mulhern: Here's my illustrating trace: Python 3.3.2 (default, Aug 23 2013, 19:00:04) [GCC 4.8.1 20130603 (Red Hat 4.8.1-1)] on linux Type help, copyright, credits or license for more information. class Junk(): ... def __repr__(self): ... raise

[issue20918] LogRecord.__init__ should handle exception if % operation fails

2014-03-13 Thread Yury Selivanov
Changes by Yury Selivanov yselivanov...@gmail.com: -- nosy: +vinay.sajip, yselivanov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20918 ___ ___

[issue20918] LogRecord.__init__ should handle exception if % operation fails

2014-03-13 Thread R. David Murray
R. David Murray added the comment: Logging tries to catch errors during logging and log them. This is an edge case it doesn't handle, because when it tries to log it...it tries to print the arguments, and of course the repr of the argument fails (again). So I think this is a bug. --

[issue20918] LogRecord.__init__ should handle exception if % operation fails

2014-03-13 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- keywords: +easy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20918 ___ ___ Python-bugs-list