From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Wed, 21 Jul 2021 08:55:22 +0000 (-0700) Subject: bpo-30511: Add note on thread safety to shutil.make_archive() (GH-26933) (GH-27274) X-Git-Tag: v3.10.0rc1~88 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d17449f31d4af7a735e81b587bb329481764412f;p=thirdparty%2FPython%2Fcpython.git bpo-30511: Add note on thread safety to shutil.make_archive() (GH-26933) (GH-27274) Co-authored-by: Ɓukasz Langa (cherry picked from commit 64f54b7ccd49764b0304e076bfd79b5482988f53) Co-authored-by: andrei kulakov --- diff --git a/Doc/library/shutil.rst b/Doc/library/shutil.rst index d5080da15bba..11c670749216 100644 --- a/Doc/library/shutil.rst +++ b/Doc/library/shutil.rst @@ -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 index 000000000000..a358fb9cc286 --- /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.