Bug report: shutil.make_archive() makes empty archive file even when root_dir does not exists · Issue #99203 · python/cpython · GitHub

github.com

Tin mới

GitHub CopilotWrite better code with AI

GitHub Copilot appDirect agents from issue to merge

ActionsAutomate any workflow

CodespacesInstant dev environments

IssuesPlan and track work

Code ReviewManage code changes

Code QualityEnforce quality at merge

GitHub Advanced SecurityFind and fix vulnerabilities

Code securitySecure your code as you build

Secret protectionStop leaks before they start

View all use cases

Financial services

View all industries

Software Development

GitHub SponsorsFund open source developers

Copilot for BusinessEnterprise-grade AI features

Premium SupportEnterprise-grade 24/7 support

Pull requests 2.6k

Security and quality 0

3.11only security fixes

3.12only security fixes

stdlibStandard Library Python modules in the Lib/ directory

type-bugAn unexpected behavior, bug, or error

https://github.com/python/cpython/pull/93160/files#diff-db8ac59326160713929e0e1973aef54f0280fe9f154ef24d14244909a0e0689bL1084

In python 3.10+, shutil.make_archive() makes empty archive file and does not raise any error even when root_dir does not exists. In python -3.9, FileNotFoundError is raised with message [Errno 2] No such file or director

gh-99203: shutil.make_archive(): restore select CPython <= 3.10.5 behavior #99802

[3.12] gh-99203: shutil.make_archive(): restore select CPython <= 3.10.5 behavior (GH-99802) #107998

[3.11] gh-99203: shutil.make_archive(): restore select CPython <= 3.10.5 behavior (GH-99802) #107999