Skip to content

Commit 47a799c

Browse files
calestyoAA-Turner
andcommitted
gh-107959: clarify Unix-availability of os.lchmod()
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 implementations which do support the above). The current wording of the availability of `os.lchmod()` is rather vague and improved 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. Co-authored-by: Adam Turner <[email protected]> Signed-off-by: Christoph Anton Mitterer <[email protected]>
1 parent e90036c commit 47a799c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Doc/library/os.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2121,7 +2121,11 @@ features:
21212121

21222122
.. audit-event:: os.chmod path,mode,dir_fd os.lchmod
21232123

2124-
.. availability:: Unix.
2124+
.. availability:: Unix, not Linux, FreeBSD >= 1.3, NetBSD >= 1.3, not OpenBSD
2125+
2126+
.. note::
2127+
``lchmod()`` is not part of POSIX, but Unix implementations may have it
2128+
if changing the mode of symbolic links is supported.
21252129

21262130
.. versionchanged:: 3.6
21272131
Accepts a :term:`path-like object`.

0 commit comments

Comments
 (0)