]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-30511: Add note on thread safety to shutil.make_archive() (#26933)
authorandrei kulakov <andrei.avk@gmail.com>
Wed, 21 Jul 2021 08:33:11 +0000 (04:33 -0400)
committerGitHub <noreply@github.com>
Wed, 21 Jul 2021 08:33:11 +0000 (10:33 +0200)
Co-authored-by: Ɓukasz Langa <lukasz@langa.pl>
Doc/library/shutil.rst
Misc/NEWS.d/next/Documentation/2021-07-20-21-03-18.bpo-30511.eMFkRi.rst [new file with mode: 0644]

index d5080da15bba41b3c6d2eb996b9871bd38fcd55a..11c6707492167299e666628d49765187b1a4fb3e 100644 (file)
@@ -595,6 +595,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 (file)
index 0000000..a358fb9
--- /dev/null
@@ -0,0 +1,2 @@
+Clarify that :func:`shutil.make_archive` is not thread-safe due to
+reliance on changing the current working directory.