gh-83714: Use statx on more recent Linux to expose st_flags and st_btime on all platforms#19125
gh-83714: Use statx on more recent Linux to expose st_flags and st_btime on all platforms#19125ntninja wants to merge 7 commits into
statx on more recent Linux to expose st_flags and st_btime on all platforms#19125Conversation
1c474bf to
bd158bb
Compare
March 27, 2020 17:48
bd158bb to
8a8bab2
Compare
September 12, 2022 23:17
Sorry, something went wrong.
667ece4 to
4d1edcc
Compare
September 13, 2022 00:44
On BSD/macOS this uses the value of `st_birthtime` (which remains for compatibity reasons), on Windows it duplicates the value of `st_ctime`. A Linux implementation is added in subsequent commits.
It cannot be enabled by default because this implementation does not have any fallback to plain stat for older kernels and Linux 4.11 is still fairly recent. The configure checks also ensure that the C library expose the proper stub functions (glibc 2.28+ only).
…D UF_* equivalent as defined by FreeBSD
4d1edcc to
9aae324
Compare
September 15, 2022 14:56
|
Could this be performance checked against the existing |
Sorry, something went wrong.
|
Another take on this: How about not modifying The |
Sorry, something went wrong.
statx on more recent Linux to expose st_flags and st_btime on all platforms
os.statx() has been added. This PR is now outdated, I close it. There is a discussion on using os.statx() in pathlib. |
Sorry, something went wrong.
|
Thanks @ntninja for your contribution even if it was taken as it is. Exposing new syscalls is non trivial, it takes time to decide how to expose it in Python. |
Sorry, something went wrong.
Still missing tests, but I'd appreciate feedback on the changes themselves in the meantime. Also ideas for properly testing
btimewould be appreciated.#83714