[3.14] gh-101100: Resolve some os sphinx reference warnings (GH-139636)#151765
[3.14] gh-101100: Resolve some os sphinx reference warnings (GH-139636)#151765miss-islington wants to merge 2 commits into
os sphinx reference warnings (GH-139636)#151765Conversation
Documentation build overview
406 files changed ·
|
| :func:`unsetenv` will be called automatically when an item is deleted from | ||
| :data:`os.environ`, and when one of the :meth:`pop` or :meth:`clear` methods is | ||
| called. | ||
| :data:`os.environ`, and when one of the :meth:`~dict.pop` or |
There was a problem hiding this comment.
I do not think this was correct. This is not a dict, it has different pop and clear methods. Please revert in main.
There was a problem hiding this comment.
I disagree. The special behavior (ex. unsetenv call) is documented as well as the general documentation for mapping types which lives inside the stdtypes documention of dict (https://docs.python.org/3/library/stdtypes.html#mapping-types-dict).
I agree we could document the _Environ special type specifically and/or refer to generic collections.abc.MutableMapping + the specialized __getitem__ and __setitem__ which _Environ uses to specialize behavior. I am happy to review those changes as new PRs and further improvements.
There was a problem hiding this comment.
_Environ is not a dict subclass. It should refer to MutableMapping.
There was a problem hiding this comment.
That unfortunately doesn't define what pop or clear should generally do: https://docs.python.org/3/library/collections.abc.html#collections.abc.MutableMapping
There was a problem hiding this comment.
This is a separate issue, bur references to dict are incorrect.
This is why we have to keep warnings. As a signal that something need to be fixed.
There was a problem hiding this comment.
I'm happy for others to work on these changes. I was attempting to make improvements.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
(cherry picked from commit fa60354)
Co-authored-by: Cody Maloney cmaloney@users.noreply.github.com