Skip to content

gh-121639: Deduplicate reinitialization setup for ZipExtFile when seeking #121640

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

danifus
Copy link
Contributor

@danifus danifus commented Jul 12, 2024

Fixes: gh-121639
Related to: #81719

Add ZipExtFile._init_read() to perform initialization and any reinitialization if necessary. The name _init_read() was chosen to match the surrounding _init_decrypter() method but these might need to lose the leading _ in a different PR if we're going to allow subclassing ZipExtFile.

Since we now check the decryption check byte in _init_decrypter(), I think it would also make sense for _init_decrypter() to return the decrypter (or nothing) rather than the check byte but that would change the (_internal) api so I haven't added it here. Happy to update this PR with that change if it is acceptable.

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.

zipfile: Deduplicate reinitialization setup for ZipExtFile when seeking
1 participant
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy