Skip to content

gh-101100: Fix os.statvfs and os.uname references#151301

Open
cmaloney wants to merge 7 commits into
python:mainfrom
cmaloney:fix_remaining_os_warnings
Open

gh-101100: Fix os.statvfs and os.uname references#151301
cmaloney wants to merge 7 commits into
python:mainfrom
cmaloney:fix_remaining_os_warnings

Conversation

@cmaloney

@cmaloney cmaloney commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

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 gh-56535 commit a83cdaa.

This gets os.rst out of nitignore.


The statvfs_result members had no definition before and I opted not to add ones here. 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.

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.
@read-the-docs-community

read-the-docs-community Bot commented Jun 11, 2026

Copy link
Copy Markdown

Comment thread Doc/library/os.rst Outdated
Comment on lines +803 to +804
The return value is a :class:`uname_result` object whose attributes
correspond to the members described in :manpage:`uname(2)`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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 ...").

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Misinterpreted this my first read, moved the manpage reference to the uname_result section

Comment thread Doc/library/os.rst Outdated
cmaloney and others added 3 commits June 12, 2026 12:41
Comment thread Doc/library/os.rst Outdated
For backwards compatibility, this object is also iterable, behaving
like a five-tuple containing :attr:`sysname`, :attr:`nodename`,
:attr:`release`, :attr:`version`, and :attr:`machine`
like a five-tuple containing :attr:`~uname_result.sysname`,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a repeating of what is documented for the result type, for which we already have reference. I think this can be removed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved these pieces into uname_result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review docs Documentation in the Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

3 participants