From: Oleg Iarygin Date: Wed, 20 Jul 2022 15:55:12 +0000 (+0300) Subject: gh-94844: Add pathlib support to shutil archive management (GH-94846) X-Git-Tag: v3.12.0a1~906 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ed4441567ec480d1e4d8f982bd1f7347e4d03c42;p=thirdparty%2FPython%2Fcpython.git gh-94844: Add pathlib support to shutil archive management (GH-94846) Co-authored-by: Barney Gale --- diff --git a/Lib/shutil.py b/Lib/shutil.py index f4128647861b..b49437cd1f3e 100644 --- a/Lib/shutil.py +++ b/Lib/shutil.py @@ -1118,6 +1118,8 @@ def make_archive(base_name, format, root_dir=None, base_dir=None, verbose=0, save_cwd = None if root_dir is not None: if support_root_dir: + # Support path-like base_name here for backwards-compatibility. + base_name = os.fspath(base_name) kwargs['root_dir'] = root_dir else: save_cwd = os.getcwd()