Skip to content

gh-153460: Introduce max_entries argument to ZipFile#153465

Open
hzhreal wants to merge 3 commits into
python:mainfrom
hzhreal:fix-issue-153460
Open

gh-153460: Introduce max_entries argument to ZipFile#153465
hzhreal wants to merge 3 commits into
python:mainfrom
hzhreal:fix-issue-153460

Conversation

@hzhreal

@hzhreal hzhreal commented Jul 9, 2026

Copy link
Copy Markdown

Attempts to fix #153460 by introducing a backwards-compatible optional argument max_entries that can be set to a nonnegative integer. If set, and the amount of elements the internal cache filelist and NameToInfo contains exceeds max_entries, a BadZipFile exception will be raised.

@python-cla-bot

python-cla-bot Bot commented Jul 9, 2026

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@read-the-docs-community

read-the-docs-community Bot commented Jul 9, 2026

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #33522034 | 📁 Comparing 7e1386b against main (a159c68)

  🔍 Preview build  

2 files changed
± library/zipfile.html
± whatsnew/changelog.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

zipfiles.ZipFile's internal ZipInfo entry cache has no internal bounds

1 participant