forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[3.11] pythongh-99203: shutil.make_archive(): restore select CPython …
…<= 3.10.5 behavior (pythonGH-99802) Restore following CPython <= 3.10.5 behavior of shutil.make_archive() that went away as part of pythongh-93160: Do not create an empty archive if root_dir is not a directory, and, in that case, raise FileNotFoundError or NotADirectoryError regardless of format choice. Beyond the brought-back behavior, the function may now also raise these exceptions in dry_run mode.. (cherry picked from commit a86df29) Co-authored-by: 6t8k <58048945+6t8k@users.noreply.github.com>
- Loading branch information
1 parent
3f7dfb6
commit a716563
Showing
3 changed files
with
54 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
Misc/NEWS.d/next/Library/2022-11-26-22-05-22.gh-issue-99203.j0DUae.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Restore following CPython <= 3.10.5 behavior of :func:`shutil.make_archive`: | ||
do not create an empty archive if ``root_dir`` is not a directory, and, in that | ||
case, raise :class:`FileNotFoundError` or :class:`NotADirectoryError` | ||
regardless of ``format`` choice. Beyond the brought-back behavior, the function | ||
may now also raise these exceptions in ``dry_run`` mode. |