]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.11] gh-99203: shutil.make_archive(): restore select CPython <= 3.10.5 behavior...
authorSerhiy Storchaka <storchaka@gmail.com>
Wed, 16 Aug 2023 07:44:21 +0000 (10:44 +0300)
committerGitHub <noreply@github.com>
Wed, 16 Aug 2023 07:44:21 +0000 (07:44 +0000)
commit4cfbcffd3d0bbaab1610896ad9ff9c588467681d
treec445a8fb4dae4df6f57c02aa9270ba4f9710292c
parent3f7dfb6d392f6278e6aee9233003dcaa45e2e736
[3.11] gh-99203: shutil.make_archive(): restore select CPython <= 3.10.5 behavior (GH-99802) (GH-107999)

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>
Lib/shutil.py
Lib/test/test_shutil.py
Misc/NEWS.d/next/Library/2022-11-26-22-05-22.gh-issue-99203.j0DUae.rst [new file with mode: 0644]