Conversation
Documentation build overview
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix seven inaccurate or outdated docstrings in the
loggingpackage. Items 1 and 3 are also wrong inDoc/library/logging.handlers.rst, which is updated as well.1.
SMTPHandlerdefault timeout is 5 secondsCorrect the documented default timeout from one second to five seconds.
2.
SysLogHandler.emit()sends exception informationRemove the statement that exception information is not sent to the server.
emit()sends the output ofself.format(record), which includes the formatted traceback whenexc_infois set.3.
QueueHandler.prepare()modifies a copy of the recordClarify that
prepare()returns a modified copy and leaves the original record'smsg,args,exc_infoandstack_infointact. The record has been copied before modification since bpo-35726, but the docstring andlogging.handlers.rststill say it is modified in-place. Also mention thatstack_infois set toNone.4.
basicConfig()rejects stream together with filenameCorrect the description of stream: passing it together with filename raises
ValueErrorinstead of ignoring stream. This matcheslogging.rstand theversionchanged:: 3.3note in the same docstring.5.
basicConfig()accepts filemode together with streamCorrect the
versionchanged:: 3.3note to list the combinations that actually raiseValueError, aslogging.rstdoes. filemode together with stream does not raise; filemode is ignored.6.
StreamHandler.emit()does not use the stream'sencodingRemove the statement that the stream's
encodingattribute is used to determine how the output is written.emit()writes the formatted string to the stream without consultingencoding.7.
Logger.callHandlers()falls back tolastResortDescribe the handler of last resort. When no handler is found, the record is passed to
logging.lastResortif it is set; the one-off "No handlers could be found" message is only written whenlastResortisNone.