zipfile: Deduplicate ZipExtFile code for init and resetting when seeking #88294
Copy link
Copy link
Closed as duplicate
Closed as duplicate
Copy link
Labels
3.10 (EOL)end of lifeend of life3.11only security fixesonly security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement
Description
| BPO | 44128 |
|---|---|
| Nosy | @serhiy-storchaka, @danifus |
| PRs |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee = None
closed_at = None
created_at = <Date 2021-05-14.04:13:13.256>
labels = ['type-feature', 'library', '3.10', '3.11']
title = 'zipfile: Deduplicate ZipExtFile code for init and resetting when seeking'
updated_at = <Date 2021-05-14.04:33:18.225>
user = 'https://github.com/danifus'bugs.python.org fields:
activity = <Date 2021-05-14.04:33:18.225>
actor = 'dhillier'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2021-05-14.04:13:13.256>
creator = 'dhillier'
dependencies = []
files = []
hgrepos = []
issue_num = 44128
keywords = ['patch']
message_count = 1.0
messages = ['393619']
nosy_count = 2.0
nosy_names = ['serhiy.storchaka', 'dhillier']
pr_nums = ['26116']
priority = 'normal'
resolution = None
stage = 'patch review'
status = 'open'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue44128'
versions = ['Python 3.10', 'Python 3.11']Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
3.10 (EOL)end of lifeend of life3.11only security fixesonly security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement
Projects
- StatusShow more project fieldsDone
Activity
danifus commentedon May 14, 2021
Integrating a refactor suggested in https://bugs.python.org/issue38334
The logic for preparing a ZipExtFile for reading (setting CRC state, read positions, etc) is currently in two locations: first initialisation and when seeking back to the start of a file.
This change moves the logic into the method
ZipExtFile.init_read()emmatyping commentedon Oct 20, 2025
I'm going to close this as a duplicate of #121639, since that one as an open PR.