From b66585bd40df19e37dd1244a4b5776eeeb7219f9 Mon Sep 17 00:00:00 2001 From: andrei kulakov Date: Mon, 28 Jun 2021 09:11:20 -0400 Subject: [PATCH 1/3] Add note on thread safety to make_archive() --- Doc/library/shutil.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Doc/library/shutil.rst b/Doc/library/shutil.rst index d5080da15bba41..e740936e779c82 100644 --- a/Doc/library/shutil.rst +++ b/Doc/library/shutil.rst @@ -595,6 +595,9 @@ provided. They rely on the :mod:`zipfile` and :mod:`tarfile` modules. .. audit-event:: shutil.make_archive base_name,format,root_dir,base_dir shutil.make_archive + .. note:: + This function is not thread-safe. + .. versionchanged:: 3.8 The modern pax (POSIX.1-2001) format is now used instead of the legacy GNU format for archives created with ``format="tar"``. From 8abff85ed54e7a66f1e60796a035da54635f5474 Mon Sep 17 00:00:00 2001 From: andrei kulakov Date: Mon, 28 Jun 2021 09:13:17 -0400 Subject: [PATCH 2/3] add blank line --- Doc/library/shutil.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/Doc/library/shutil.rst b/Doc/library/shutil.rst index e740936e779c82..11c67074921672 100644 --- a/Doc/library/shutil.rst +++ b/Doc/library/shutil.rst @@ -596,6 +596,7 @@ provided. They rely on the :mod:`zipfile` and :mod:`tarfile` modules. .. audit-event:: shutil.make_archive base_name,format,root_dir,base_dir shutil.make_archive .. note:: + This function is not thread-safe. .. versionchanged:: 3.8 From 217bcf4994bb8e92e08f9e5a67adb7c89fbc7f8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Langa?= Date: Tue, 20 Jul 2021 21:04:28 +0200 Subject: [PATCH 3/3] Add Blurb --- .../next/Documentation/2021-07-20-21-03-18.bpo-30511.eMFkRi.rst | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 Misc/NEWS.d/next/Documentation/2021-07-20-21-03-18.bpo-30511.eMFkRi.rst diff --git a/Misc/NEWS.d/next/Documentation/2021-07-20-21-03-18.bpo-30511.eMFkRi.rst b/Misc/NEWS.d/next/Documentation/2021-07-20-21-03-18.bpo-30511.eMFkRi.rst new file mode 100644 index 00000000000000..a358fb9cc2860b --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2021-07-20-21-03-18.bpo-30511.eMFkRi.rst @@ -0,0 +1,2 @@ +Clarify that :func:`shutil.make_archive` is not thread-safe due to +reliance on changing the current working directory.