[Python-checkins] bpo-30511: Add note on thread safety to shutil.make_archive() (GH-26933) (#27276)

ambv webhook-mailer at python.org
Wed Jul 21 05:04:56 EDT 2021


https://github.com/python/cpython/commit/54d387105a5f0c3825a0f4fa607b58d55d05e572
commit: 54d387105a5f0c3825a0f4fa607b58d55d05e572
branch: 3.8
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: ambv <lukasz at langa.pl>
date: 2021-07-21T11:04:52+02:00
summary:

bpo-30511: Add note on thread safety to shutil.make_archive() (GH-26933) (#27276)

Co-authored-by: Łukasz Langa <lukasz at langa.pl>
(cherry picked from commit 64f54b7ccd49764b0304e076bfd79b5482988f53)

Co-authored-by: andrei kulakov <andrei.avk at gmail.com>

files:
A Misc/NEWS.d/next/Documentation/2021-07-20-21-03-18.bpo-30511.eMFkRi.rst
M Doc/library/shutil.rst

diff --git a/Doc/library/shutil.rst b/Doc/library/shutil.rst
index cd925a92a53f96..cd32a0a6e0c15a 100644
--- a/Doc/library/shutil.rst
+++ b/Doc/library/shutil.rst
@@ -592,6 +592,10 @@ 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"``.
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.



More information about the Python-checkins mailing list