René's URL Explorer Experiment


Title: gh-51067: Add `remove()` and `repack()` to `ZipFile` by danny0838 · Pull Request #134627 · python/cpython · GitHub

Open Graph Title: gh-51067: Add `remove()` and `repack()` to `ZipFile` by danny0838 · Pull Request #134627 · python/cpython

X Title: gh-51067: Add `remove()` and `repack()` to `ZipFile` by danny0838 · Pull Request #134627 · python/cpython

Description: This is a revised version of PR #103033, implementing two new methods in zipfile.ZipFile: remove() and repack(), as suggested in this comment. Features ZipFile.remove(zinfo_or_arcname) Removes a file entry (by providing a str path or ZipInfo) from the central directory. If there are multiple file entries with the same path, only one is removed when a str path is provided. Returns the removed ZipInfo instance. Supported in modes: 'a', 'w', 'x'. ZipFile.repack(removed=None) Physically removes stale local file entry data that is no longer referenced by the central directory. Shrinks the archive file size. If removed is passed (as a sequence of removed ZipInfos), only their corresponding local file entry data are removed. Only supported in mode 'a'. Rationales Heuristics Used in repack() Since repack() does not immediately clean up removed entries at the time a remove() is called, the header information of removed file entries may be missing, and thus it can be technically difficult to determine whether certain stale bytes are really previously removed files and safe to remove. While local file entries begin with the magic signature PK\x03\x04, this alone is not a reliable indicator. For instance, a self-extracting ZIP file may contain executable code before the actual archive, which could coincidentally include such a signature, especially if it embeds ZIP-based content. To safely reclaim space, repack() assumes that in a normal ZIP file, local file entries are stored consecutively: File entries must not overlap. If any entry’s data overlaps with the next, a BadZipFile error is raised and no changes are made. There should be no extra bytes between entries (or between the last entry and the central directory): Data before the first referenced entry is removed only when it appears to be a sequence of consecutive entries with no extra following bytes; extra preceeding bytes are preserved. Data between referenced entries is removed only when it appears to be a sequence of consecutive entries with no extra preceding bytes; extra following bytes are preserved. Check the doc in the source code of _ZipRepacker.repack() (which is internally called by ZipFile.repack()) for more details. Supported Modes There has been opinions that a repacking should support mode 'w' and 'x' (e. g. #51067 (comment)). This is NOT introduced since such modes do not truncate the file at the end of writing, and won't really shrink the file size after a removal has been made. Although we do can change the behavior for the existing API, some further care has to be made because mode 'w' and 'x' may be used on an unseekable file and will be broken by such change. OTOH, mode 'a' is not expected to work with an unseekable file since an initial seek is made immediately when it is opened. Issue: gh-51067 📚 Documentation preview 📚: https://cpython-previews--134627.org.readthedocs.build/

Open Graph Description: This is a revised version of PR #103033, implementing two new methods in zipfile.ZipFile: remove() and repack(), as suggested in this comment. Features ZipFile.remove(zinfo_or_arcname) Removes a f...

X Description: This is a revised version of PR #103033, implementing two new methods in zipfile.ZipFile: remove() and repack(), as suggested in this comment. Features ZipFile.remove(zinfo_or_arcname) Removes a f...

Opengraph URL: https://github.com/python/cpython/pull/134627

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:72e2ad60-4dbd-307b-e5a3-d89e0bd456be
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA93A:2F0FE8:13D8FB7:1A5057D:6A534786
html-safe-nonceb31e0769c6d90b6d20f43f3d99c9a022844c99fa9fd62150db8bb2681d837193
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOTNBOjJGMEZFODoxM0Q4RkI3OjFBNTA1N0Q6NkE1MzQ3ODYiLCJ2aXNpdG9yX2lkIjoiNDcwMDQ0MTEwMjc3MTI0Mjg4NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacf5c225bbb09c0d7a54d81573c721dc2c270023c67dd37fcb190acf1bda108442
hovercard-subject-tagpull_request:2541669210
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/134627/files
twitter:imagehttps://avatars.githubusercontent.com/u/531417?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/531417?s=400&v=4
og:image:altThis is a revised version of PR #103033, implementing two new methods in zipfile.ZipFile: remove() and repack(), as suggested in this comment. Features ZipFile.remove(zinfo_or_arcname) Removes a f...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneb9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release07a982c1d40157c619b364352b704c3ce66bb332
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/134627/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F134627%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F134627%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/134627/files
Reloadhttps://github.com/python/cpython/pull/134627/files
Reloadhttps://github.com/python/cpython/pull/134627/files
Please reload this pagehttps://github.com/python/cpython/pull/134627/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/134627/files
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 35k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 73.8k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.3k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security and quality 0 https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security and quality https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
gpsheadhttps://github.com/gpshead
python:mainhttps://github.com/python/cpython/tree/main
danny0838:gh-51067-2https://github.com/danny0838/cpython/tree/gh-51067-2
Conversation 83 https://github.com/python/cpython/pull/134627
Commits 88 https://github.com/python/cpython/pull/134627/commits
Checks 52 https://github.com/python/cpython/pull/134627/checks
Files changed https://github.com/python/cpython/pull/134627/files
Please reload this pagehttps://github.com/python/cpython/pull/134627/files
gh-51067: Add remove() and repack() to ZipFile https://github.com/python/cpython/pull/134627/files#top
Show all changes 88 commits https://github.com/python/cpython/pull/134627/files
6aed859 Add `remove()` and `repack()` to `ZipFile` danny0838 May 24, 2025 https://github.com/python/cpython/pull/134627/commits/6aed859adec5134ab756520c0dc5f7feeae6cab8
5453dbc 📜🤖 Added by blurb_it. blurb-it[bot] May 24, 2025 https://github.com/python/cpython/pull/134627/commits/5453dbc0a6ecdf892f36889a928037f4f57d636a
80ab2e2 Fix and optimize test code danny0838 May 24, 2025 https://github.com/python/cpython/pull/134627/commits/80ab2e27e4bb63cea3e7aa3c022236a76e05af68
72c2a66 Handle common setups with `setUpClass` danny0838 May 24, 2025 https://github.com/python/cpython/pull/134627/commits/72c2a6678f48454761edc4fd59f57862dd5d1b6c
a4b410b Add tests for mode `w` and `x` for `remove()` danny0838 May 24, 2025 https://github.com/python/cpython/pull/134627/commits/a4b410b9f6b6160092f073eb4f3aa922f18c8517
a9e85c6 Introduce `_calc_initial_entry_offset` and refactor danny0838 May 24, 2025 https://github.com/python/cpython/pull/134627/commits/a9e85c654c8ba7d3b4be5cbe368c7a1934b0f16c
236cd06 Optimize `_calc_initial_entry_offset` by introducing cache danny0838 May 24, 2025 https://github.com/python/cpython/pull/134627/commits/236cd06084176266bd885b4e9361cb3acb00a298
bdc58c7 Introduce `_validate_local_file_entry` and refactor danny0838 May 24, 2025 https://github.com/python/cpython/pull/134627/commits/bdc58c7111f5346cc1e20800fb4b7dd69f31eeed
c3c8345 Introduce `_debug` and refactor danny0838 May 24, 2025 https://github.com/python/cpython/pull/134627/commits/c3c834505ff0017a2ffd56c264ed81444cd65780
1b7d75a Introduce `_move_entry_data` and rework chunk_size passing danny0838 May 25, 2025 https://github.com/python/cpython/pull/134627/commits/1b7d75a4ea4e3f8db516bfa74fb56ac2ccd61cf2
51c9254 Refactor `_validate_local_file_entry` danny0838 May 25, 2025 https://github.com/python/cpython/pull/134627/commits/51c9254cfb738eddec9e14d82e301aa0456e02c5
0d971d8 Add `strict_descriptor` option danny0838 May 25, 2025 https://github.com/python/cpython/pull/134627/commits/0d971d81b5c65583d3995d8d986655284d24c412
8f0a504 Fix and improve validation tests danny0838 May 25, 2025 https://github.com/python/cpython/pull/134627/commits/8f0a504b205bc4e84f9a7b12497d03edd91064f5
0cb8682 Remove obsolete NameToInfo updating danny0838 May 25, 2025 https://github.com/python/cpython/pull/134627/commits/0cb8682dfa1fdc14c0b3167ea938db44dc4f154d
a788a00 Use `zinfo` rather than `info` danny0838 May 25, 2025 https://github.com/python/cpython/pull/134627/commits/a788a001a4ba5b1453ad02268060629c72ccbc0b
ae01b8c Raise on overlapping file blocks danny0838 May 25, 2025 https://github.com/python/cpython/pull/134627/commits/ae01b8cd69f53a509b5782ad080c9254ae13edb1
edee203 Rework writing protection danny0838 May 25, 2025 https://github.com/python/cpython/pull/134627/commits/edee2033c414f07dac405168a98c9f87104fded8
555ac78 Update doc danny0838 May 25, 2025 https://github.com/python/cpython/pull/134627/commits/555ac78aec9487131785d0645cba935c1cd411d2
95fde31 Fix typo danny0838 May 26, 2025 https://github.com/python/cpython/pull/134627/commits/95fde316ab56be7099c3454b741dade89509a96c
8a448e4 Add test for bytes between file entries danny0838 May 26, 2025 https://github.com/python/cpython/pull/134627/commits/8a448e452b761bfa29c779766bc46efade541bb5
4c35eb2 Check `testzip()` after zip file closed danny0838 May 26, 2025 https://github.com/python/cpython/pull/134627/commits/4c35eb262d8727846e03bfa121ba13e62c54faa3
926338c Support `repack(removed)` danny0838 May 26, 2025 https://github.com/python/cpython/pull/134627/commits/926338cbc1c7ebb6bcaf8107fd35ce9b6931b807
e76f9a1 Fix bytes between entries be removed when `removed` is passed danny0838 May 26, 2025 https://github.com/python/cpython/pull/134627/commits/e76f9a1bc10ac09faffcc09ca254403cd0623856
93f4c25 Fix bad test code danny0838 May 26, 2025 https://github.com/python/cpython/pull/134627/commits/93f4c25d393423c00ba400f7b010d912b836e7d3
9e94209 Revise docstring danny0838 May 27, 2025 https://github.com/python/cpython/pull/134627/commits/9e94209e94e65d7ddd73c6c691d8af9a94f039c8
3ef72c6 Add `tearDown` for tests danny0838 May 28, 2025 https://github.com/python/cpython/pull/134627/commits/3ef72c68be70ad0f63f3cc864121a03049dd7fda
fbf7588 Rename methods and parameters danny0838 May 28, 2025 https://github.com/python/cpython/pull/134627/commits/fbf75888fcec8589029f13a0af16022c5c318bc0
81a419a Adjust parameter order danny0838 May 28, 2025 https://github.com/python/cpython/pull/134627/commits/81a419aaf79b411da88aaa0df577b038d96ffe0f
c62a455 Optimize code and revise comment danny0838 May 28, 2025 https://github.com/python/cpython/pull/134627/commits/c62a4556ff9d86c3a969fa932886520327d2a62c
a05353c Improve debug for `_ZipRepacker.repack()` danny0838 May 29, 2025 https://github.com/python/cpython/pull/134627/commits/a05353c47674af813388ffcb415e67dbc3146e11
3d0240c Rework `_validate_local_file_entry_sequence` to return size or None danny0838 May 29, 2025 https://github.com/python/cpython/pull/134627/commits/3d0240c1a3eab2890509b1d0d96e980a2b744d40
31c4c93 Rework `_validate_local_file_entry_sequence` to allow passing no `che… danny0838 May 29, 2025 https://github.com/python/cpython/pull/134627/commits/31c4c936c6e5451f939e52818c1c35a742b31130
f8fade1 Introduce `_scan_data_descriptor_no_sig_by_decompression` danny0838 May 30, 2025 https://github.com/python/cpython/pull/134627/commits/f8fade17a0335e3d4139788f84855907cf595424
c80d21b Strip only entries immediately following a referenced entry danny0838 May 29, 2025 https://github.com/python/cpython/pull/134627/commits/c80d21bf991dff0369178f504212642f4000f769
e1caea9 Adjust method names danny0838 May 30, 2025 https://github.com/python/cpython/pull/134627/commits/e1caea9b30a917e375e3dd481ba53c211afcb2b0
2b23d46 Add memory usage test danny0838 May 30, 2025 https://github.com/python/cpython/pull/134627/commits/2b23d46d9503cc6afb5d6927737603d3f3ab16d8
de4f15b Fix rst danny0838 May 30, 2025 https://github.com/python/cpython/pull/134627/commits/de4f15bb4aebe5a346d5b143d10e3881c7f5a454
ea3259f Optimize code danny0838 Jun 1, 2025 https://github.com/python/cpython/pull/134627/commits/ea3259fba7208ca588e34bc343842bc459cce1c1
fef92c4 Fix and optimize `_iter_scan_signature` danny0838 Jun 1, 2025 https://github.com/python/cpython/pull/134627/commits/fef92c45a308fe730ddce433286c2ebbfacaac0f
8067b0c Fix `_scan_data_descriptor` danny0838 Jun 1, 2025 https://github.com/python/cpython/pull/134627/commits/8067b0c4894fcdf72f8723340e11be17721df606
92d3a9c Fix and optimize `_scan_data_descriptor_no_sig` danny0838 Jun 1, 2025 https://github.com/python/cpython/pull/134627/commits/92d3a9c418b812be21b51d8de6de72c4fb4b14f0
b5d7ae3 Rename `_trace_compressed_block_end` danny0838 Jun 1, 2025 https://github.com/python/cpython/pull/134627/commits/b5d7ae3a6a90a554417c60ff833dba4cdb10cb8a
1d5ec61 Fix `_scan_data_descriptor_no_sig_by_decompression` danny0838 Jun 1, 2025 https://github.com/python/cpython/pull/134627/commits/1d5ec6133715cb21bdd8202551c452ce3eef3bd9
db9d0d6 Add tests for `_ZipRepacker` danny0838 Jun 1, 2025 https://github.com/python/cpython/pull/134627/commits/db9d0d61990ea21095657e5cb430c5685bad56f5
aaa566c Remove unneeded import danny0838 Jun 1, 2025 https://github.com/python/cpython/pull/134627/commits/aaa566c94ccce05c8a0e3e58654c6c2ebcad255f
578c7c8 Add requirements danny0838 Jun 1, 2025 https://github.com/python/cpython/pull/134627/commits/578c7c8b6a14f8ba022e49f41b531222a7067cc7
c470c33 Fix `_scan_data_descriptor_no_sig_by_decompression` when library not … danny0838 Jun 1, 2025 https://github.com/python/cpython/pull/134627/commits/c470c33389d71a9c2a5ebbb0410f5dd1d2158f7d
b1dcb07 Test with pre-calculated CRC danny0838 Jun 1, 2025 https://github.com/python/cpython/pull/134627/commits/b1dcb07f33a85ff88f0d3c5d2a117af53a33b4d4
04cddef Remove unneeded import danny0838 Jun 1, 2025 https://github.com/python/cpython/pull/134627/commits/04cddef2f71fd8c51a72673b337b7e5113e51e6f
797a62c Fix and optimize `repack` danny0838 Jun 1, 2025 https://github.com/python/cpython/pull/134627/commits/797a62cd8f831aac39199a4a207b2d1cf620eaf6
3b2f232 Remove unneeded catch type danny0838 Jun 14, 2025 https://github.com/python/cpython/pull/134627/commits/3b2f2328b6b8b38e9258347c67afd6f32139afd5
cb549c9 Patch more explicitly danny0838 Jun 14, 2025 https://github.com/python/cpython/pull/134627/commits/cb549c95f1d924e66af8525f614265ffa4666fcc
0f50a6f Remove unneeded variables danny0838 Jun 14, 2025 https://github.com/python/cpython/pull/134627/commits/0f50a6f561c8983c7505ca81a42d8840cf6faec4
c759b63 Improve dependency check for decompression tests danny0838 Jun 14, 2025 https://github.com/python/cpython/pull/134627/commits/c759b639ee8c0d2162965409820ce97b28dbc540
1ece5b1 Refactor and optimize `RepackHelperMixin` danny0838 Jun 14, 2025 https://github.com/python/cpython/pull/134627/commits/1ece5b17d57b4abebbc16f976b66bf31eb3e62a7
ce88616 Update NEWS danny0838 Jun 20, 2025 https://github.com/python/cpython/pull/134627/commits/ce886161f12a2f799517cfa25b85bb8e14767a75
5f093e5 Sync with danny0838/zipremove@1691ca25bf971cf1e45d5ed7d22c512636f20cb8 danny0838 Jun 20, 2025 https://github.com/python/cpython/pull/134627/commits/5f093e5175db32e66a8b2b32313960189230d84e
11c0937 Revise NEWS danny0838 Jun 20, 2025 https://github.com/python/cpython/pull/134627/commits/11c09378b296b9c4623a5301d9f5bd9b7e37a130
4b2176e Sync with danny0838/zipremove@1843d87b70e6cb129fb55446eaf4486a87d2af4d danny0838 Jun 21, 2025 https://github.com/python/cpython/pull/134627/commits/4b2176e89076ca2b25d1deef02d49cbd0e31be6b
d9824ce Fix timezone related timestamp issue danny0838 Jun 21, 2025 https://github.com/python/cpython/pull/134627/commits/d9824ceaa6e3398c7e297653d5dfa3a403395dca
85811ab Simplify tests with data descriptors danny0838 Jun 22, 2025 https://github.com/python/cpython/pull/134627/commits/85811abea894968cb072a25f3d1dfe0ceb7f8c2a
748ac63 Sync with danny0838/zipremove@e79042768f3c2541e0226f6bed3a9ff2ee04fac0 danny0838 Jun 23, 2025 https://github.com/python/cpython/pull/134627/commits/748ac631adb86acd05177cc30ff46d4e4e67a372
001a8d0 Sync with danny0838/zipremove@87bcdb50411a355d24c35f31dcbe4273c0568cf8 danny0838 Jun 24, 2025 https://github.com/python/cpython/pull/134627/commits/001a8d096386ffb9a16e595b4d655e839e5f465a
3a364ce Sync with danny0838/zipremove@6a78bd15de87afde510f8a1b6364365c6e17f252 danny0838 Jun 25, 2025 https://github.com/python/cpython/pull/134627/commits/3a364ce6992501f44f0a098ec3122858db66929d
0832528 Sync with danny0838/zipremove@092f98b4d7b3a0cd335fe4ba64e7090ebb3dc6da danny0838 Jun 27, 2025 https://github.com/python/cpython/pull/134627/commits/0832528fa540b71dda8209f40cba40f6f567f725
f20ec5d Revise doc for `repack` danny0838 Jun 28, 2025 https://github.com/python/cpython/pull/134627/commits/f20ec5dfdaf1acd354c466770351aad9e4a5efcc
8e69c09 Revise doc for `remove` danny0838 Jun 28, 2025 https://github.com/python/cpython/pull/134627/commits/8e69c099d5a14dd1496b2a8fe00d5cebcd78510f
725b1a3 Update `data_offset` danny0838 Jun 29, 2025 https://github.com/python/cpython/pull/134627/commits/725b1a3e8580aa3e77375306dac8c2149c7026ef
9e82bb7 Revise doc for `repack` danny0838 Jul 1, 2025 https://github.com/python/cpython/pull/134627/commits/9e82bb78266ff37ac671e50010db6157cb051472
93db94a Revise doc for `repack` danny0838 Jul 2, 2025 https://github.com/python/cpython/pull/134627/commits/93db94a263345018acebe88b64452f136de8cd95
72673e0 Sync with danny0838/zipremove@8bedf7c9b891acadc3393d2f1267b78bd9b5a49a danny0838 Jul 3, 2025 https://github.com/python/cpython/pull/134627/commits/72673e0709d566bdce4416425974fce719537021
e926a95 Sync with danny0838/zipremove@86a240bf019fe9212b1e72c963306186163fb8b8 danny0838 Jul 22, 2025 https://github.com/python/cpython/pull/134627/commits/e926a954edbd4aa518aeec88723c173686494137
ee3b753 Sync with danny0838/zipremove@8ad341bdd28a78033d7111a0532cb4714349aee3 danny0838 Jun 20, 2026 https://github.com/python/cpython/pull/134627/commits/ee3b753fbe22cfa254b78bc25d6f3a41326dbfff
5cbe51b Merge remote-tracking branch 'origin/main' into gh-51067-2 gpshead Jun 20, 2026 https://github.com/python/cpython/pull/134627/commits/5cbe51b96567b55f2540743bfbae4cb6b0e690c8
3dde04e docs: clarify unspecified multiple entry removal, suggest ZipInfo gpshead Jun 20, 2026 https://github.com/python/cpython/pull/134627/commits/3dde04e8488f94c6ff66c294754afaf48e0a7f9d
59d7b0d whatsnew entry gpshead Jun 20, 2026 https://github.com/python/cpython/pull/134627/commits/59d7b0dc00e56ceb9bc681677ae74fb8644b10bd
9376c2d gh-51067: Default ZipFile.repack() to strict_descriptor=True gpshead Jun 20, 2026 https://github.com/python/cpython/pull/134627/commits/9376c2dc590489255311d7c225bf4a98795f6b8b
cbae620 gh-51067: Document reliable space reclamation in ZipFile.repack() gpshead Jun 20, 2026 https://github.com/python/cpython/pull/134627/commits/cbae62058cff6d9230a18561598e083560c2dfb2
e0fcc69 gh-51067: Bound _validate_local_file_entry to the scanned gap gpshead Jun 20, 2026 https://github.com/python/cpython/pull/134627/commits/e0fcc69be33ed69d026bceed4aa71895a1a8438d
adcd088 gh-51067: Guard _copy_bytes against short reads gpshead Jun 20, 2026 https://github.com/python/cpython/pull/134627/commits/adcd0883d4f65288c7ad252b09551ff5642c8906
b6dfda7 gh-51067: Spell out ZipFile.repack() keyword arguments gpshead Jun 20, 2026 https://github.com/python/cpython/pull/134627/commits/b6dfda7fdcdcc8df6d78161a25e0f82da2a65faf
645910a gh-51067: Move NEWS entry to Library section gpshead Jun 20, 2026 https://github.com/python/cpython/pull/134627/commits/645910a739f42e7d75f12696490cc3b76ad87181
01b493e gh-51067: Fix docstring typos in _ZipRepacker gpshead Jun 20, 2026 https://github.com/python/cpython/pull/134627/commits/01b493e15d2227f2c441de16cd118de8ef0b33da
d339b6c gh-51067: Drop unreachable struct.error handler in no-sig DD scan gpshead Jun 20, 2026 https://github.com/python/cpython/pull/134627/commits/d339b6c1e8d791c9eeea7fcbd54b8f49e97bfd60
b6937c5 gh-51067: Use io.DEFAULT_BUFFER_SIZE in no-sig DD scan gpshead Jun 20, 2026 https://github.com/python/cpython/pull/134627/commits/b6937c5cf047ce98fe1233fefca2fb23f85bdd51
e7125e7 gh-51067: Replace ComparableZipInfo class with a function gpshead Jun 20, 2026 https://github.com/python/cpython/pull/134627/commits/e7125e7ab7120975e30aeb7f8bf45db70849b2fb
eb29a30 gh-51067: Add _REPACK_CHUNK_SIZE constant gpshead Jun 20, 2026 https://github.com/python/cpython/pull/134627/commits/eb29a30bdeb566e0207e9daf3b97e6e175a11cbb
b70a80b gh-51067: Add tests for entry-size overshoot and _copy_bytes EOF gpshead Jun 20, 2026 https://github.com/python/cpython/pull/134627/commits/b70a80be67eae6ce89ee0154fe83e8550aab5d0a
Clear filters https://github.com/python/cpython/pull/134627/files
Please reload this pagehttps://github.com/python/cpython/pull/134627/files
Please reload this pagehttps://github.com/python/cpython/pull/134627/files
zipfile.rst https://github.com/python/cpython/pull/134627/files#diff-8a20c37fb313d7b188ae15bb57b351cc2ab73cbdcb6b2aee44cf2f8451768086
3.16.rst https://github.com/python/cpython/pull/134627/files#diff-e69e0be717f3409832d520e20348f62af39c9436ba1a9d82e842bc10e5eb51d7
test_core.py https://github.com/python/cpython/pull/134627/files#diff-3f7f7f9e251efe3ca7872e540c7840c85d508fc11150926df502ced996b98e9f
test_zipfile64.py https://github.com/python/cpython/pull/134627/files#diff-eb2c99caccc7fc64c4006ec2e5718576b6cd7f76eefa04252b07852a4455d73e
__init__.py https://github.com/python/cpython/pull/134627/files#diff-7629293618f2b3cf8ae7daf98526226fa12f047d71645a05497e6687aae10c76
2025-05-24-11-17-34.gh-issue-51067.yHOgfy.rst https://github.com/python/cpython/pull/134627/files#diff-83960f30f39e3dd6156ff46372dc99e6f92993d7ed427b344b98a6917cc1e475
Doc/library/zipfile.rsthttps://github.com/python/cpython/pull/134627/files#diff-8a20c37fb313d7b188ae15bb57b351cc2ab73cbdcb6b2aee44cf2f8451768086
View file https://github.com/danny0838/cpython/blob/b70a80be67eae6ce89ee0154fe83e8550aab5d0a/Doc/library/zipfile.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/134627/{{ revealButtonHref }}
https://github.com/python/cpython/pull/134627/files#diff-8a20c37fb313d7b188ae15bb57b351cc2ab73cbdcb6b2aee44cf2f8451768086
https://github.com/python/cpython/pull/134627/files#diff-8a20c37fb313d7b188ae15bb57b351cc2ab73cbdcb6b2aee44cf2f8451768086
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L116
Doc/whatsnew/3.16.rsthttps://github.com/python/cpython/pull/134627/files#diff-e69e0be717f3409832d520e20348f62af39c9436ba1a9d82e842bc10e5eb51d7
View file https://github.com/danny0838/cpython/blob/b70a80be67eae6ce89ee0154fe83e8550aab5d0a/Doc/whatsnew/3.16.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/134627/{{ revealButtonHref }}
https://github.com/python/cpython/pull/134627/files#diff-e69e0be717f3409832d520e20348f62af39c9436ba1a9d82e842bc10e5eb51d7
https://github.com/python/cpython/pull/134627/files#diff-e69e0be717f3409832d520e20348f62af39c9436ba1a9d82e842bc10e5eb51d7
Please reload this pagehttps://github.com/python/cpython/pull/134627/files
Please reload this pagehttps://github.com/python/cpython/pull/134627/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.