This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: TimedRotatingFileHandler backupCount not working
Type: Stage: resolved
Components: Library (Lib) Versions: Python 3.10
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: ivogrondman, miss-islington, vinay.sajip
Priority: normal Keywords: patch

Created on 2021-10-27 15:23 by ivogrondman, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
logrotate.py ivogrondman, 2021-10-27 15:23 Example script
Pull Requests
URL Status Linked Edit
PR 29310 merged vinay.sajip, 2021-10-29 12:26
PR 29313 merged miss-islington, 2021-10-29 14:03
PR 29314 merged miss-islington, 2021-10-29 14:03
Messages (6)
msg405104 - (view) Author: Ivo Grondman (ivogrondman) Date: 2021-10-27 15:23
Using the TimedRotatingFileHandler with a non-zero backupCount, I get different behaviour between versions 3.9 and 3.10.

Attached is a small example. Running it with 3.9 gives me two backups at most even if I run the script for a long time. Running it with 3.10 does not delete old backup files at all and just keeps writing new ones.
msg405304 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2021-10-29 13:40
New changeset 8a77f59de51f1fd6062f0fefe73ee3059d714144 by Vinay Sajip in branch 'main':
bpo-45628: Check all parts of the suffix for an extension match. (GH-29310)
https://github.com/python/cpython/commit/8a77f59de51f1fd6062f0fefe73ee3059d714144
msg405310 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2021-10-29 15:24
New changeset 317e0c99e3804310f4bee23e497d9d84b717d7f7 by Miss Islington (bot) in branch '3.9':
[3.9] bpo-45628: Check all parts of the suffix for an extension match. (GH-29310) (GH-29313)
https://github.com/python/cpython/commit/317e0c99e3804310f4bee23e497d9d84b717d7f7
msg405311 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2021-10-29 15:25
New changeset 191a93905a84f272b2232701dc5dcc69987330f5 by Miss Islington (bot) in branch '3.10':
[3.10] bpo-45628: Check all parts of the suffix for an extension match. (GH-29310) (GH-29314)
https://github.com/python/cpython/commit/191a93905a84f272b2232701dc5dcc69987330f5
msg405312 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2021-10-29 15:27
N.B. I was able to reproduce this on recent 3.9 versions as well.
msg405316 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2021-10-29 16:31
It's possible this crept in during the fix for bpo-44753.
History
Date User Action Args
2022-04-11 14:59:51adminsetgithub: 89791
2022-01-28 23:18:45brandtbuchersetnosy: - brandtbucher
2022-01-28 23:18:22brandtbuchersetpull_requests: - pull_request29179
2022-01-28 22:10:13brandtbuchersetnosy: + brandtbucher

pull_requests: + pull_request29179
2021-10-29 16:31:36vinay.sajipsetmessages: + msg405316
2021-10-29 15:27:27vinay.sajipsetstatus: open -> closed
resolution: fixed
messages: + msg405312

stage: patch review -> resolved
2021-10-29 15:25:35vinay.sajipsetmessages: + msg405311
2021-10-29 15:24:49vinay.sajipsetmessages: + msg405310
2021-10-29 14:03:32miss-islingtonsetpull_requests: + pull_request27582
2021-10-29 14:03:27miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request27581
2021-10-29 13:40:48vinay.sajipsetmessages: + msg405304
2021-10-29 12:26:45vinay.sajipsetkeywords: + patch
stage: patch review
pull_requests: + pull_request27578
2021-10-27 15:40:45ned.deilysetnosy: + vinay.sajip, - ronaldoussoren, ned.deily
components: - macOS
2021-10-27 15:23:13ivogrondmancreate