GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||
GeezerVison is showing github.com — gh-84649: Make TimedRotatingFileHandler use CTIME instead of MTIME by martonivan · Pull Request #24660 · python/cpython Conversation
|
|
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA). CLA MissingOur records indicate the following people have not signed the CLA: For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. If you have recently signed the CLA, please wait at least one business day You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
5335c93 to
197582f
Compare
|
I've rebased the branch, squashed the recent fix (about the NEWS typo) into the last commit, as it was partially recommended in the bug report about the flawed testing infrastructure: https://bugs.python.org/issue43382 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
See my suggestion on the issue if you want to progress things further. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Thanks Vinay, I'll implement the suggested and acceptable solution as soon as I get there and will update this merge request. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I was just about to create the same issue.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@martonivan, the mechanism for the CLA signing was changed, please sign the CLA again, it is necessary for merging. Thank you for your contribution. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
8c87f3f to
207a12b
Compare
|
Unfortunately I cannot access to the email address that stands in the commit anymore. Tried to reword those commits and rebase the whole tree, but I may caused more issue than I solved. Could you please help me what would be the proper way to implement this change in the commits? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Either open a new PR, or reapply your changes to main and force-push to this PR branch to get rid of the problematic changes. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Well, it is complicated.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I've implemented many of the suggested changes, but realized a huge issue: on Linux, since ctime also changes when the data block changes (practically when mtime changes), the test that checks if only the birthdate is old enough for rotation will always fail. It would be nice the have statx implemented and birth date/creation date known there too, but this issue is already staling for a while: #19125 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
It is okay if this part of the feature is not supported on all platforms. We should do the best of what is currently possible on every platform. The availability of these attributes also depends on the file system. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The TimedRotatingFileHandler previously only used st_mtime attribute of the log file to detect whether it has to be rotate yet or not. In cases when the file is changed within the rotatation period the st_mtime is also updated to the current time and the rotation never happens. It's more appropriate to check the file creation time (st_ctime) instead. Whenever available, the more appropriate st_birthtime will be in use. (This feature is available on FreeBSD, MacOS and Windows at the moment.) If the st_mtime would be newer than st_ctime (e.g.: because the inode related to the file has been changed without any file content modification), then the earliest attribute will be used.
|
All the tests are green on the supported operating systems. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@martonivan: when sync'ing with |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Noted for further contribution, I'm not sure if any further commits will be necessary for this one. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This change added |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.