[New-bugs-announce] [issue44473] logging.handlers.QueueHandler acts unexpected

Kai Müller report at bugs.python.org
Mon Jun 21 09:04:38 EDT 2021


New submission from Kai Müller <kai.jmueller at gmail.com>:

According to the docstring of logging.handlers.QueueHandler
"The base implementation formats the record to merge the message and arguments, and removes unpickleable items from the record in-place."
But, if a just a log message is used w/o any arguments, the arguments are still set to None, which IMHO unexpected. Especially, according to the typeshed project, the "args" is ALWAYS either a dict or a tuple. But in this case, they are set to None which surprised my a lot.

Would it be possible to improve the docstring to state, that args, exc_info, exc_text are set to None and that msg is overwritten. If you miss this tiny but very important detail, additional handlers can act very wrong.
In addition, it seems to be that the type information needs to be improved in typeshed or are there any other plans on your side?

----------
assignee: docs at python
components: Documentation
messages: 396243
nosy: docs at python, kai.jmueller
priority: normal
severity: normal
status: open
title: logging.handlers.QueueHandler acts unexpected
type: enhancement
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9

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


More information about the New-bugs-announce mailing list