From 7a452794545609a61e729b969cf5a352c88b8a03 Mon Sep 17 00:00:00 2001 From: Erin of Yukis Date: Thu, 16 Jul 2026 02:24:40 +0000 Subject: [PATCH] =?UTF-8?q?docs:=20Mention=20difference=20in=20executable?= =?UTF-8?q?=20bits=20of=20created=20files=20with=20`open(=E2=80=A6,=20open?= =?UTF-8?q?er=3D=E2=80=A6)`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Default `opener` value differs, leading to subtle bugs if users read the current text as “I can just use `os.open` as drop-in”. --- Doc/library/functions.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index a4d37beb436899a..a3f8f4f2fa16b25 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -1494,7 +1494,8 @@ are always available. They are listed here in alphabetical order. file descriptor for the file object is then obtained by calling *opener* with (*file*, *flags*). *opener* must return an open file descriptor (passing :mod:`os.open` as *opener* results in functionality similar to passing - ``None``). + ``None`` but will also request, subject to the process ``umask``, the file be + created with executable permissions on Unix). The newly created file is :ref:`non-inheritable `.