I have another patch I would like to contribute to the zipfile module but would like to request a review of this one to minimise conflicts with later patches. If anyone is able to review the patch, I would really appreciate it :)
Also, with regards to selecting Python versions for this issue, is there any rule of thumb I should be following?
I got carried away refactoring the decrypter for a future scenario where there could be different decrypters (possibly using certificates too) :)
The decrypter was implemented with a generator for performance. The performance of decrypting is not critical, but this got us 2x speed up without complicating the code. See bpo-10030. If the support of other decrypters be added, they will likely be implemented in C in any case.
I also think that the read_init method in my PR is a useful refactor as it locates all the state that needs to be (re)set when starting a read into the same location.
This is a different issue.
Would you also be able to take a look at some other PRs I've submitted for zipfile.
Thank you, they look good to me. I left just few comments.
As for the original issue, I have doubts that backward seeking in a compressed file is a good idea. But this feature was added, and it worked with encrypted files if seek in the range of the buffer, so not working out of the range of the buffer is a bug which we should fix.
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
The text was updated successfully, but these errors were encountered: