gh-101100: Fix os.statvfs and os.uname references#151301
Conversation
Restructure descriptive paragraphs to class definitions copying across descriptions. Add constants from statvfs to os as data directives. Expand the `os.uname` section slightly with a see also which matches the one at the beginning of os.rst added in pythongh-56535 (commit a83cdaa). --- The statvfs_result members had no definition before and I opted not to add ones ere. The C code in `posixmodule.c` just forwards them directly so I don't think a description would be more precise than what is in the man page.
Documentation build overview
48 files changed ·
|
| The return value is a :class:`uname_result` object whose attributes | ||
| correspond to the members described in :manpage:`uname(2)`. |
There was a problem hiding this comment.
| The return value is a :class:`uname_result` object whose attributes | |
| correspond to the members described in :manpage:`uname(2)`. | |
| The return value is a :class:`uname_result` object. |
I think the note should be with the attributes ("These attributes correspond to the ...").
There was a problem hiding this comment.
Misinterpreted this my first read, moved the manpage reference to the uname_result section
Co-authored-by: Stan Ulbrych <stan@python.org>
serhiy-storchaka
left a comment
There was a problem hiding this comment.
In general good, but I have other suggestions which you can implement here or leave to other PRs.
9 data classes are defined in the os module: DirEntry, sched_param, stat_result, statvfs_result, statx_result, terminal_size, times_result, uname_result, and waitid_result. 4 of them are not explicitly documented: stat_result, times_result, uname_result, and waitid_result.
Could you please document times_result and waitid_result too? Or you prefer to leave this to other PR?
Please check that all 9 classes use similar style (except that DirEntry and statx_result are not tuples).
And you can turn other mentions of uname_result (in NEWS entries) to references.
|
|
||
| .. attribute:: f_flag | ||
|
|
||
| Bit-mask of mount flags. The following flags are defined: |
There was a problem hiding this comment.
Maybe just refer to them as ``ST_*`` flags?
There was a problem hiding this comment.
Worry that would be confusing with the stat module ST_* constants (https://docs.python.org/3/library/stat.html#stat.ST_MODE)
|
Want to keep this focused on getting the reference issues fixed (the issue this PR links to). I added short descriptions to the Created gh-151684 for the followups. |
|
Thanks @cmaloney for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
|
Thanks @cmaloney for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14. |
|
Thanks @cmaloney for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.15. |
|
GH-151690 is a backport of this pull request to the 3.14 branch. |
|
GH-151691 is a backport of this pull request to the 3.13 branch. |
|
GH-151692 is a backport of this pull request to the 3.15 branch. |
|
The 3.13 and 3.14 backports are stuck, Docs/Docs CI failed with warnings: |
|
Yes, I am going to restore the ignore files. |
Restructure descriptive paragraphs to class definitions copying across descriptions. Add constants from
statvfstoosas data directives.Expand the
os.unamesection slightly with a see also which matches the one at the beginning of os.rst added in gh-56535 commit a83cdaa.This gets
os.rstout of nitignore.The statvfs_result members had no definition before and I opted not to add ones here. The C code in
posixmodule.cjust forwards them directly so I don't think a description would be more precise than what is in the man page.