Skip to content

Commit 54d3871

Browse files
bpo-30511: Add note on thread safety to shutil.make_archive() (GH-26933) (#27276)
Co-authored-by: Łukasz Langa <[email protected]> (cherry picked from commit 64f54b7) Co-authored-by: andrei kulakov <[email protected]>
1 parent 0389426 commit 54d3871

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Doc/library/shutil.rst

+4
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,10 @@ provided. They rely on the :mod:`zipfile` and :mod:`tarfile` modules.
592592

593593
.. audit-event:: shutil.make_archive base_name,format,root_dir,base_dir shutil.make_archive
594594

595+
.. note::
596+
597+
This function is not thread-safe.
598+
595599
.. versionchanged:: 3.8
596600
The modern pax (POSIX.1-2001) format is now used instead of
597601
the legacy GNU format for archives created with ``format="tar"``.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Clarify that :func:`shutil.make_archive` is not thread-safe due to
2+
reliance on changing the current working directory.

0 commit comments

Comments
 (0)