]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-99203: shutil.make_archive(): restore select CPython <= 3.10.5 behavior...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 16 Aug 2023 12:21:57 +0000 (05:21 -0700)
committerGitHub <noreply@github.com>
Wed, 16 Aug 2023 12:21:57 +0000 (14:21 +0200)
commit5d9f20a06c6ad3f1d7812e098717b1c6f7c673fa
treeb4af5268551cc4e634fff3c01efa8151b9d6ecdc
parent4421c65f08228b203a1bed3b30ab3f5189b62427
[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>
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]