[issue30767] logging must check exc_info correctly

Vinay Sajip report at bugs.python.org
Thu Oct 12 03:18:46 EDT 2017


Vinay Sajip <vinay_sajip at yahoo.co.uk> added the comment:

This is not an issue that needs fixing; the current behaviour is by design. The documentation states about exc_info:

"There are two keyword arguments in kwargs which are inspected: exc_info which, if it does not evaluate as false, causes exception information to be added to the logging message. If an exception tuple (in the format returned by sys.exc_info()) is provided, it is used; otherwise, sys.exc_info() is called to get the exception information."

So, an individual exception instance returning false will not affect the truthiness of an exc_info tuple (if provided). I propose to close this issue as "not a bug" and reject the PR because (a) there's no issue to fix and (b) what Serhiy said.

If you still think there's an issue here, please post an example script which uses logging as documented and demonstrates a problem.

----------
resolution:  -> not a bug
status: open -> pending

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30767>
_______________________________________


More information about the Python-bugs-list mailing list