Skip to content

Commit

Permalink
bpo-30511: Add note on thread safety to shutil.make_archive() (GH-26933
Browse files Browse the repository at this point in the history
…) (GH-27275)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 64f54b7)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
  • Loading branch information
miss-islington and akulakov committed Jul 21, 2021
1 parent 1c5c9c8 commit c8e35ab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Doc/library/shutil.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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"``.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Clarify that :func:`shutil.make_archive` is not thread-safe due to
reliance on changing the current working directory.

0 comments on commit c8e35ab

Please sign in to comment.