Skip to content

Commit 64f54b7

Browse files
akulakovambv
andauthored
bpo-30511: Add note on thread safety to shutil.make_archive() (#26933)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
1 parent 3b56b3b commit 64f54b7

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
@@ -595,6 +595,10 @@ provided. They rely on the :mod:`zipfile` and :mod:`tarfile` modules.
595595

596596
.. audit-event:: shutil.make_archive base_name,format,root_dir,base_dir shutil.make_archive
597597

598+
.. note::
599+
600+
This function is not thread-safe.
601+
598602
.. versionchanged:: 3.8
599603
The modern pax (POSIX.1-2001) format is now used instead of
600604
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)