Skip to content

Commit 1bd9fff

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 1bd9fff

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Doc/library/os.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2123,6 +2123,9 @@ features:
21232123

21242124
.. availability:: Unix.
21252125

2126+
If changing the mode of symbolic links is supported (for example on
2127+
NetBSD since 1.3 or FreeBSD since 3.0, but not on Linux or OpenBSD)
2128+
21262129
.. versionchanged:: 3.6
21272130
Accepts a :term:`path-like object`.
21282131

0 commit comments

Comments
 (0)