]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-88352: Fix logging.TimedRotatingFileHandler (GH-116191) (GH-116208)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 1 Mar 2024 16:41:30 +0000 (17:41 +0100)
committerGitHub <noreply@github.com>
Fri, 1 Mar 2024 16:41:30 +0000 (18:41 +0200)
commit8dae3faab64c2c7c46141f844e2d8e41d5ce56b0
tree8d8adea5dae368ffca5142c31eb080721281170e
parent694874b7dcc4241d323f369d2db37eba15927fd9
[3.12] gh-88352: Fix logging.TimedRotatingFileHandler (GH-116191) (GH-116208)

* Do not overwrite already rolled over files. It happened at midnight or
  during the DST change and caused the loss of data.
* computeRollover() now always return the timestamp larger than the
  specified time.
* Fix computation of the rollover time during the DST change.
(cherry picked from commit fee86fd9a422612b39e5aabf2571b8fe4abac770)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/logging/handlers.py
Lib/test/test_logging.py
Misc/NEWS.d/next/Library/2024-03-01-11-57-32.gh-issue-88352.bZ68rw.rst [new file with mode: 0644]