Skip to content

gh-155039: Support copy.replace() for zipfile.ZipInfo - #155045

Draft
serhiy-storchaka wants to merge 2 commits into
python:mainfrom
serhiy-storchaka:zipinfo-replace
Draft

gh-155039: Support copy.replace() for zipfile.ZipInfo#155045
serhiy-storchaka wants to merge 2 commits into
python:mainfrom
serhiy-storchaka:zipinfo-replace

Conversation

@serhiy-storchaka

Copy link
Copy Markdown
Member

Add ZipInfo.__replace__(), so that copy.replace() returns a copy of the object with the specified attributes replaced. As in the constructor, the file name is sanitized and the date is validated.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@read-the-docs-community

read-the-docs-community Bot commented Aug 1, 2026

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #33869420 | 📁 Comparing 725e1c7 against main (7ce7f0b)

  🔍 Preview build  

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

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant