diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2023-08-16 12:21:57 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-16 12:21:57 (GMT) |
commit | 5d9f20a06c6ad3f1d7812e098717b1c6f7c673fa (patch) | |
tree | b4af5268551cc4e634fff3c01efa8151b9d6ecdc /Misc | |
parent | 4421c65f08228b203a1bed3b30ab3f5189b62427 (diff) | |
download | cpython-5d9f20a06c6ad3f1d7812e098717b1c6f7c673fa.zip cpython-5d9f20a06c6ad3f1d7812e098717b1c6f7c673fa.tar.gz cpython-5d9f20a06c6ad3f1d7812e098717b1c6f7c673fa.tar.bz2 |
[3.12] gh-99203: shutil.make_archive(): restore select CPython <= 3.10.5 behavior (GH-99802) (#107998)
gh-99203: shutil.make_archive(): restore select CPython <= 3.10.5 behavior (GH-99802)
Restore following CPython <= 3.10.5 behavior of shutil.make_archive()
that went away as part of gh-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 a86df298df5b02e2d69ea6879e9ed10a7adb85d0)
Co-authored-by: 6t8k <58048945+6t8k@users.noreply.github.com>
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Library/2022-11-26-22-05-22.gh-issue-99203.j0DUae.rst | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2022-11-26-22-05-22.gh-issue-99203.j0DUae.rst b/Misc/NEWS.d/next/Library/2022-11-26-22-05-22.gh-issue-99203.j0DUae.rst new file mode 100644 index 0000000..fcfb044 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2022-11-26-22-05-22.gh-issue-99203.j0DUae.rst @@ -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. |