-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
gh-102402: Fix floating point math issue by using time.time_ns()
in logging.LogRecord
#102412
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
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
2f046c2
Add test for 102402 100msecs
dougthor42 2460f88
Update logging.LogRecord to use time_ns.
dougthor42 059f856
Simplify msecs calculation
dougthor42 997bd41
Add blurb
dougthor42 2e7cde3
Fix comments, remove superfluous comment
dougthor42 5505cea
Merge branch 'main' into fix-gh-102402-logging-msecs
dougthor42 411a421
Switch to math algorithm rather than string manipulation.
dougthor42 d3a1f78
Correct and update comment
dougthor42 5fa370b
Use unittest.mock.patch instead of manual monkeypatching
dougthor42 39cab9d
formatting in test_logging.py
dougthor42 920bf74
Update docs
dougthor42 8bdc406
Keep ref to gh-89047
dougthor42 bf68b26
Use modulo arithmetic, update comment
dougthor42 e404ca0
Add comment
dougthor42 9661499
Correct comment
dougthor42 ec74b0e
Rename test
dougthor42 710f3ac
Add test for relativeCreated
dougthor42 ff8140c
remove issue num from test names; move to comment
dougthor42 fd45694
Use importhelper instead of importlib.reload
dougthor42 84b931b
Also assert record.created
dougthor42 5a604f9
Update test to check multiple offset values
dougthor42 dc90919
Optimize loop vs import CM
dougthor42 502ff65
Move item to variable
dougthor42 65ea1b5
Merge branch 'main' into fix-gh-102402-logging-msecs
vsajip 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
2 changes: 2 additions & 0 deletions
2
Misc/NEWS.d/next/Library/2023-03-03-21-13-08.gh-issue-102402.fpkRO1.rst
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Adjust ``logging.LogRecord`` to use ``time.time_ns()`` and fix minor bug | ||
related to floating point math. |
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.
Uh oh!
There was an error while loading. Please reload this page.