-
-
Notifications
You must be signed in to change notification settings - Fork 34.8k
[3.7] bpo-33400: Clarified documentation to indicate no strict adherence to ISO 8601. (GH-6702) #6704
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
[3.7] bpo-33400: Clarified documentation to indicate no strict adherence to ISO 8601. (GH-6702) #6704
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -515,8 +515,9 @@ The useful mapping keys in a :class:`LogRecord` are given in the section on | |
| Returns a new instance of the :class:`Formatter` class. The instance is | ||
| initialized with a format string for the message as a whole, as well as a | ||
| format string for the date/time portion of a message. If no *fmt* is | ||
| specified, ``'%(message)s'`` is used. If no *datefmt* is specified, the | ||
| ISO8601 date format is used. | ||
| specified, ``'%(message)s'`` is used. If no *datefmt* is specified, an | ||
| ISO8601-like (or RFC3339-like) date format is used. See the | ||
| :meth:`formatTime` documentation for more details. | ||
|
|
||
| The *style* parameter can be one of '%', '{' or '$' and determines how | ||
| the format string will be merged with its data: using one of %-formatting, | ||
|
|
@@ -556,8 +557,8 @@ The useful mapping keys in a :class:`LogRecord` are given in the section on | |
| formatters to provide for any specific requirement, but the basic behavior | ||
| is as follows: if *datefmt* (a string) is specified, it is used with | ||
| :func:`time.strftime` to format the creation time of the | ||
| record. Otherwise, the ISO8601 format is used. The resulting string is | ||
| returned. | ||
| record. Otherwise, an ISO8601-like (or RDC 3339-like) format is used. The | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. RFC ?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well spotted, thanks! Will correct. |
||
| resulting string is returned. | ||
|
|
||
| This function uses a user-configurable function to convert the creation | ||
| time to a tuple. By default, :func:`time.localtime` is used; to change | ||
|
|
@@ -568,7 +569,7 @@ The useful mapping keys in a :class:`LogRecord` are given in the section on | |
| attribute in the ``Formatter`` class. | ||
|
|
||
| .. versionchanged:: 3.3 | ||
| Previously, the default ISO 8601 format was hard-coded as in this | ||
| Previously, the default ISO8601-like format was hard-coded as in this | ||
| example: ``2010-09-06 22:38:15,292`` where the part before the comma is | ||
| handled by a strptime format string (``'%Y-%m-%d %H:%M:%S'``), and the | ||
| part after the comma is a millisecond value. Because strptime does not | ||
|
|
||
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is unnecessary. It is not "like" ISO8601, it is ISO 8601.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now, I will sync the changes to be in line with the other branches, but won't close the issue. I think it's best just to state what the format is, make a reference to RFC 3339, and leave it at that. I will address this in a further update.