Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1359 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 10 10
Lines 2315 2318 +3
Branches 358 359 +1
=========================================
+ Hits 2315 2318 +3 ☔ View full report in Codecov by Harness. |
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.
Pull Request Checklist
masterbranch.Description of Changes
The
xformatter converts a floating-point seconds timestamp to microseconds. For dates far from the Unix epoch, the float cannot preserve all six fractional digits:At
datetime.max, rounding also changes253402300799999999to253402300800000000, crossing beyond the end of the supported datetime range.Compute the difference from the UTC epoch and divide it by a one-microsecond timedelta using integer division. Naive datetimes still use the local timezone, matching the previous
datetime.timestamp()behavior. TheXseconds formatter and timestamp parsing are unchanged.The regressions cover positive and negative timestamps, the datetime range endpoints, UTC/non-UTC offsets (including subsecond offsets), and naive local datetimes. Four cases fail before the change.
Validation:
python -m pytest -q --tb=short: 1910 passed, 1 skipped; 99.93% total coverage with branch measurement enabled, satisfying the configured 99% gate.pre-commit run --all-files: all 23 repository hooks pass.OpenAI Codex assisted with the investigation, patch, tests, and this description. All listed checks were executed locally.
CI status
The initial CI run passed 24 of 25 jobs, including linting and the other interpreter/platform combinations. The Windows/PyPy 3.11 job failed during dependency installation: downloading PyYAML build dependencies raised a connection-broken
IncompleteReaderror, before the test suite started. Re-running that job requires repository maintainer permissions.