]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-99203: shutil.make_archive(): restore select CPython <= 3.10.5 behavior (GH-99802)
author6t8k <58048945+6t8k@users.noreply.github.com>
Wed, 16 Aug 2023 07:00:03 +0000 (07:00 +0000)
committerGitHub <noreply@github.com>
Wed, 16 Aug 2023 07:00:03 +0000 (10:00 +0300)
commita86df298df5b02e2d69ea6879e9ed10a7adb85d0
tree14862d05c2a9841037813bebcb06cc8710462e27
parenta794ebeb028f7ef287c780d3890f816db9c21c51
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.
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]