mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
gh-74696: Do not change the current working directory in shutil.make_archive() if possible (GH-93160) (GH-94105)
It is no longer changed when create a zip or tar archive.
It is still changed for custom archivers registered with shutil.register_archive_format()
if root_dir is not None.
Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit fda4b2f063
)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
parent
3a119d277a
commit
c1bfff4f6b
4 changed files with 106 additions and 52 deletions
|
@ -574,12 +574,18 @@ provided. They rely on the :mod:`zipfile` and :mod:`tarfile` modules.
|
|||
|
||||
.. note::
|
||||
|
||||
This function is not thread-safe.
|
||||
This function is not thread-safe when custom archivers registered
|
||||
with :func:`register_archive_format` are used. In this case it
|
||||
temporarily changes the current working directory of the process
|
||||
to perform archiving.
|
||||
|
||||
.. 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"``.
|
||||
|
||||
.. versionchanged:: 3.10.6
|
||||
This function is now made thread-safe during creation of standard
|
||||
``.zip`` and tar archives.
|
||||
|
||||
.. function:: get_archive_formats()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue