You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
kaijmuellermannequin opened this issue
Jun 21, 2021
· 4 comments
Labels
3.7 (EOL)end of life3.8only security fixes3.9only security fixes3.10only security fixes3.11only security fixesdocsDocumentation in the Doc dirtype-featureA feature request or enhancement
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?
I have another question about the docstring in the source beneath logging.handlers.QueueHandler.prepare. It says:
The object returned by this method is enqueued.
But, the prepare method doesn't do the enqueuing operation, it just prepares the record and returns it back, so it seems like this statement is not accurate?
But, the prepare method doesn't do the enqueuing operation, it just prepares the record and returns it back, so it seems like this statement is not accurate?
It merely states what happens to the return value. It doesn't say it has already been enqueued. If you look at the entire documentation for the class (rather than just individual sentences) I don't think the way the class works is unclear.
3.7 (EOL)end of life3.8only security fixes3.9only security fixes3.10only security fixes3.11only security fixesdocsDocumentation in the Doc dirtype-featureA feature request or enhancement
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: