Skip to content

Commit 7a45279

Browse files
authored
docs: Mention difference in executable bits of created files with open(…, opener=…)
Default `opener` value differs, leading to subtle bugs if users read the current text as “I can just use `os.open` as drop-in”.
1 parent b4662e8 commit 7a45279

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Doc/library/functions.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1494,7 +1494,8 @@ are always available. They are listed here in alphabetical order.
14941494
file descriptor for the file object is then obtained by calling *opener* with
14951495
(*file*, *flags*). *opener* must return an open file descriptor (passing
14961496
:mod:`os.open` as *opener* results in functionality similar to passing
1497-
``None``).
1497+
``None`` but will also request, subject to the process ``umask``, the file be
1498+
created with executable permissions on Unix).
14981499

14991500
The newly created file is :ref:`non-inheritable <fd_inheritance>`.
15001501

0 commit comments

Comments
 (0)