| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
I'm not convinced that it's a good idea to have os.statx_result which can be used instead of os.stat_result. It's not exactly the same, os.statx_result members can be None. It's also strange that some statx members have a st_ prefix, whereas others have a stx_ prefix. I read the statx manual page and expect to have only stx_ prefix: same members names. I don't think that stx_ prefix would prevent using statx() in pathlib in the future. |
Sorry, something went wrong.
There was a problem hiding this comment.
I'm 👍 on this as its evolved. There's too many weird edged cases and just separating entirely makes simpler to reason around.
I think if go forward with this all the stx_ attributes should be explicitly documented rather than refer to stat_result ones of different name. I'm often in a codebase wondering "what is this" and search in page to find; the text note "all the stat members but with a stx_ prefix" would break that
Sorry, something went wrong.
There was a problem hiding this comment.
I think this should list all the attributes now; doc having people translate in their head rather than see "here's the name I used" seems like it will break "search in page" finding the attributes.
Sorry, something went wrong.
There was a problem hiding this comment.
Ok, I completed my PR to document all statx_members. It also clarifies which stat_result members are not part of statx_result:
Sorry, something went wrong.
Rename stx_birthtime to stx_btime, and rename stx_birthtime_ns to stx_btime_ns.
Remove now redundant MEMBER parameter.
|
I updated my PR to document all statx_result members, and I renamed stx_birthtime to stx_btime. |
Sorry, something went wrong.
|
I changed my mind and just removed the comparison to stat_result:
I don't think that it's useful to compare these two structures, they are different and listing differences is not worth it. |
Sorry, something went wrong.
|
I think this needlessly complicates code that uses os.statx on Python >= 3.15 and falls back to os.stat on earlier versions, but I guess there won't be any user code doing that if we get the pathlib interface in 3.15 as well, so +0 from me. @vstinner You've made substantial changes to both the interface and implementation of os.statx. I think you ought to add your name in the blurb for the issue. |
Sorry, something went wrong.
Ok, I added myself to the credits. |
Sorry, something went wrong.
…thon#140432) Rename stx_birthtime to stx_btime, and rename stx_birthtime_ns to stx_btime_ns.
| Back | FazBrowse Home | New Git URL |
📚 Documentation preview 📚: https://cpython-previews--140432.org.readthedocs.build/