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

* 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]