| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
@vstinner, could you please look at this? Do I use statx() like it is supposed to be used?
Sorry, something went wrong.
| @unittest.skipUnless(hasattr(os.stat_result, 'st_birthtime') or | ||
| support.has_st_birthtime or hasattr(os, 'statx'), | ||
| "st_birthtime and statx() not available or supported by Python on this OS") | ||
| # @support.requires_resource('walltime') |
There was a problem hiding this comment.
This is temporary, to run tests once on CI.
Sorry, something went wrong.
This allows to support rotation based on the file birth time on Linux.
There was a problem hiding this comment.
LGTM. The code using os.statx() is correct. Don't forget to uncomment # @support.requires_resource('walltime').
Sorry, something went wrong.
| # Use stx_btime whenever it is available or use stx_ctime | ||
| # instead otherwise | ||
| creation_time = statx_result.stx_btime | ||
| if creation_time is None: |
There was a problem hiding this comment.
Right, stx_btime can be None. For example, on a tmpfs filesystem, on Linux 5.17 and older: #83714 (comment).
Sorry, something went wrong.
Documentation build overview3 files changed ± library/logging.handlers.html ± whatsnew/3.16.html ± whatsnew/changelog.html |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This allows to support rotation based on the file birth time on Linux.