[3.12] gh-107959: clarify Unix-availability of os.lchmod()
(GH-107960)
#113066
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
POSIX specifies that implementations are not required to support changing the
file mode of symbolic links, but may do so.
Consequently,
lchmod()
is not part of POSIX (but mentioned for implementationswhich do support the above).
The current wording of the availability of
os.lchmod()
is rather vague andimproved to clearly tell which POSIX/Unix/BSD-like support the function in
general (those that support changing the file mode of symbolic links).
Further, some examples of major implementations are added.
Data for the BSDs taken from their online manpages.
(cherry picked from commit f14e3d5)
Co-authored-by: Christoph Anton Mitterer [email protected]
Signed-off-by: Christoph Anton Mitterer [email protected]
Co-authored-by: Adam Turner [email protected]
os.lchmod()
is missing #107959📚 Documentation preview 📚: https://cpython-previews--113066.org.readthedocs.build/