diff options
author | andrei kulakov <andrei.avk@gmail.com> | 2021-07-21 04:33:11 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-21 10:33:11 +0200 |
commit | 64f54b7ccd49764b0304e076bfd79b5482988f53 (patch) | |
tree | 7c5440140342208f34dbced92b3b89075ef4d525 | |
parent | 3b56b3b97d91e2b412ce1b2bcaddcd43ef3d223b (diff) | |
download | cpython-git-64f54b7ccd49764b0304e076bfd79b5482988f53.tar.gz |
bpo-30511: Add note on thread safety to shutil.make_archive() (#26933)
Co-authored-by: Ćukasz Langa <lukasz@langa.pl>
-rw-r--r-- | Doc/library/shutil.rst | 4 | ||||
-rw-r--r-- | Misc/NEWS.d/next/Documentation/2021-07-20-21-03-18.bpo-30511.eMFkRi.rst | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/Doc/library/shutil.rst b/Doc/library/shutil.rst index d5080da15b..11c6707492 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 0000000000..a358fb9cc2 --- /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. |