From d58bcc17a57876276c9fec81e21e8801ec7c8048 Mon Sep 17 00:00:00 2001 From: picnic-sven <88426829+picnic-sven@users.noreply.github.com> Date: Sat, 22 Jul 2023 15:49:55 +0200 Subject: [PATCH 1/2] Update tempfile.rst --- Doc/library/tempfile.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Doc/library/tempfile.rst b/Doc/library/tempfile.rst index 8c387853d0417f4..5761ef50adca42d 100644 --- a/Doc/library/tempfile.rst +++ b/Doc/library/tempfile.rst @@ -256,8 +256,9 @@ The module defines the following user-callable items: The file descriptor is :ref:`not inherited by child processes `. - Unlike :func:`TemporaryFile`, the user of :func:`mkstemp` is responsible - for deleting the temporary file when done with it. + Unlike :func:`TemporaryFile`, the user of :func:`mkstemp` is responsible for closing + and deleting the temporary file (by e.g. using :func:`os.close` and + :func:`os.remove`) when done with it. If *suffix* is not ``None``, the file name will end with that suffix, otherwise there will be no suffix. :func:`mkstemp` does not put a dot From e61a0876c9b040b6f043c846461e93de2e41d2f2 Mon Sep 17 00:00:00 2001 From: Stephen Rosen Date: Sun, 26 Jul 2026 14:59:00 -0500 Subject: [PATCH 2/2] Adjust tempfile doc to match feedback --- Doc/library/tempfile.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/library/tempfile.rst b/Doc/library/tempfile.rst index 5761ef50adca42d..9b89cb92594ea61 100644 --- a/Doc/library/tempfile.rst +++ b/Doc/library/tempfile.rst @@ -256,9 +256,9 @@ The module defines the following user-callable items: The file descriptor is :ref:`not inherited by child processes `. - Unlike :func:`TemporaryFile`, the user of :func:`mkstemp` is responsible for closing - and deleting the temporary file (by e.g. using :func:`os.close` and - :func:`os.remove`) when done with it. + Unlike :func:`TemporaryFile`, the user of :func:`mkstemp` is responsible + for closing the file descriptor (for example, using :func:`os.close`) and + deleting the temporary file (for example, using :func:`os.remove`). If *suffix* is not ``None``, the file name will end with that suffix, otherwise there will be no suffix. :func:`mkstemp` does not put a dot