10000 gh-74696: Do not change the current working directory in shutil.make_archive() if possible by serhiy-storchaka · Pull Request #93160 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-74696: Do not change the current working directory in shutil.make_archive() if possible #93160

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 22, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next 8000 Next commit
Minor doc tweaks
  • Loading branch information
ambv committed Jun 21, 2022
commit 2d497e3c13283acd3a1e23233568f1cbc796abc7
8 changes: 7 additions & 1 deletion Doc/library/shutil.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
:func:`shutil.make_archive` no longer temporary change the current working
directory when create a standard zip or tar archive.
:func:`shutil.make_archive` no longer temporarily changes the current
working directory during creation of standard ``.zip`` or tar archives.
0