◐ Shell
reader mode source ↗
Skip to content

gh-84649: Use statx() in TimedRotatingFileHandler if available#150968

Merged
serhiy-storchaka merged 3 commits into
python:mainfrom
serhiy-storchaka:TimedRotatingFileHandler-statx
Jun 6, 2026
Merged

gh-84649: Use statx() in TimedRotatingFileHandler if available#150968
serhiy-storchaka merged 3 commits into
python:mainfrom
serhiy-storchaka:TimedRotatingFileHandler-statx

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Jun 5, 2026

Copy link
Copy Markdown
Member

This allows to support rotation based on the file birth time on Linux.

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hide comment

@vstinner, could you please look at this? Do I use statx() like it is supposed to be used?

This allows to support rotation based on the file birth time on Linux.
@serhiy-storchaka serhiy-storchaka force-pushed the TimedRotatingFileHandler-statx branch from e584956 to e1c910e Compare June 5, 2026 13:11

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hide comment

LGTM. The code using os.statx() is correct. Don't forget to uncomment # @support.requires_resource('walltime').

@read-the-docs-community

read-the-docs-community Bot commented Jun 5, 2026

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #33010529 | 📁 Comparing 643c819 against main (9f225e2)

  🔍 Preview build  

3 files changed
± library/logging.handlers.html
± whatsnew/3.16.html
± whatsnew/changelog.html

Hide details View details @serhiy-storchaka serhiy-storchaka merged commit b18b6a4 into python:main Jun 6, 2026
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants