Repository navigation
gh-160433: Correct timed log backup names across DST changes - #160564
Merged
vsajip merged 1 commit intoOct 24, 2026
Merged
Conversation
vsajip
approved these changes
Oct 24, 2026
|
Thanks @LarryHu0217 for the PR, and @vsajip for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14. |
|
Thanks @LarryHu0217 for the PR, and @vsajip for merging it 🌮🎉.. I'm working now to backport this PR to: 3.15. |
|
GH-160577 is a backport of this pull request to the 3.14 branch. |
|
GH-160578 is a backport of this pull request to the 3.15 branch. |
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.
Fixes #160433.
Keep fixed-duration interval start timestamps unshifted when naming timed log backups. For midnight and weekly intervals, base DST compensation on the scheduled rollover boundary rather than the time a possibly delayed record arrives.
This prevents the reported misnamed backups and skipped rotations caused by colliding names. Rollover scheduling, retention and UTC behavior are unchanged.
Adds deterministic filesystem regressions for hourly and daily intervals across spring/fall transitions, delayed midnight and weekly rotations, and sparse logging with
atTime. Every case has a UTC control, and a Library NEWS entry is included.Validation on macOS arm64 using an existing
--with-pydebugconfiguration rebuilt atdc28c3a358221b1e0ae5f926b72e112cbd1d03f7(CPython 3.16.0a1+dev):make -j2: pass../python.exe -B -m test -v -u network,cpu,walltime --timeout 600 test_logging test_time test_datetime test_queue: all four suites succeed; reported run=1,752, skipped=45 (platform, implementation, permissions and large-memory conditions)../python.exe -B -m test -R 3:3 -m 'test_rollover_*_dst' test_logging: success, with no positive leaks in the three measured repetitions.Tools/patchcheck/patchcheck.py, scopedruff check --no-fix --no-cache Lib/logging/handlers.py Lib/test/test_logging.pyandgit diff --cached --check: pass.Ruff was the existing 0.15.22 binary, with its Python-3.15-support warning retained; the hook pins 0.15.17 and the full hook runner was not installed or run. The entire CPython test suite was not run locally.
TimedRotatingFileHandlermisnames backups around DST changes #160433