Skip to content

Commit dce9034

Browse files
committed
Define audit-event open parameters consistently
as in Doc/library/io.rst: .. audit-event:: open path,mode,flags io.open Doc/library/os.rst: .. audit-event:: open path,mode,flags os.open to avoid triggering a race-condition in Sphinx that causes non-deterministic output. See https://reproducible-builds.org/ for why this matters. Fixes: #121874 This patch was done while working on reproducible builds for openSUSE, sponsored by the NLnet NGI0 fund.
1 parent f036a46 commit dce9034

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Doc/library/functions.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1317,13 +1317,13 @@ are always available. They are listed here in alphabetical order.
13171317
.. index::
13181318
single: file object; open() built-in function
13191319

1320-
.. function:: open(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None)
1320+
.. function:: open(path, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None)
13211321

1322-
Open *file* and return a corresponding :term:`file object`. If the file
1323-
cannot be opened, an :exc:`OSError` is raised. See
1322+
Open file *path* and return a corresponding :term:`file object`. If the
1323+
file cannot be opened, an :exc:`OSError` is raised. See
13241324
:ref:`tut-files` for more examples of how to use this function.
13251325

1326-
*file* is a :term:`path-like object` giving the pathname (absolute or
1326+
*path* is a :term:`path-like object` giving the pathname (absolute or
13271327
relative to the current working directory) of the file to be opened or an
13281328
integer file descriptor of the file to be wrapped. (If a file descriptor is
13291329
given, it is closed when the returned I/O object is closed unless *closefd*
@@ -1509,7 +1509,7 @@ are always available. They are listed here in alphabetical order.
15091509
(where :func:`open` is declared), :mod:`os`, :mod:`os.path`, :mod:`tempfile`,
15101510
and :mod:`shutil`.
15111511

1512-
.. audit-event:: open file,mode,flags open
1512+
.. audit-event:: open path,mode,flags open
15131513

15141514
The ``mode`` and ``flags`` arguments may have been modified or inferred from
15151515
the original call.

0 commit comments

Comments
 (0)