Skip to content

Commit dc0025a

Browse files
committed
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. Signed-off-by: Christoph Anton Mitterer <[email protected]>
1 parent 580f357 commit dc0025a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Doc/library/os.rst

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

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

2124-
.. availability:: Unix.
2124+
.. availability:: Unix, if changing the mode of symbolic links is \
2125+
supported (for example on NetBSD since 1.3 or FreeBSD \
2126+
since 3.0, but not on Linux or OpenBSD).
21252127

21262128
.. versionchanged:: 3.6
21272129
Accepts a :term:`path-like object`.

0 commit comments

Comments
 (0)