-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
gh-136170: Revert adding ZipFile.data_offset
#136950
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
Conversation
)" This reverts commit 0788948.
ZipFile.data_offset
ZipFile.data_offset
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a news entry for completeness as someone reading the verbose news could find the earlier news entry and wonder otherwise.
Misc/NEWS.d/next/Library/2025-07-21-22-35-50.gh-issue-136170.QUlc78.rst
Outdated
Show resolved
Hide resolved
I've updated the NEWS entry to use the exact versioning as in PEP-745. |
Thanks @emmatyping for the PR, and @gpshead for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14. |
* Revert "pythongh-84481: Make ZipFile.data_offset more robust (pythonGH-132178)" This reverts commit 6cd1d6c. * Revert "pythongh-84481: Add ZipFile.data_offset attribute (pythonGH-132165)" This reverts commit 0788948. --------- (cherry picked from commit 6bf1c0ab3497b1b193812654bcdfd0c11b4192d8) Co-authored-by: Emma Smith <emma@emmatyping.dev> Co-authored-by: Gregory P. Smith <greg@krypto.org>
GH-136955 is a backport of this pull request to the 3.14 branch. |
Thanks! That's a good idea. |
…36955) gh-136170: Revert adding `ZipFile.data_offset` (GH-136950) * Revert "gh-84481: Make ZipFile.data_offset more robust (GH-132178)" This reverts commit 6cd1d6c. * Revert "gh-84481: Add ZipFile.data_offset attribute (GH-132165)" This reverts commit 0788948. --------- (cherry picked from commit 6bf1c0a) Co-authored-by: Emma Smith <emma@emmatyping.dev> Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
- The `data_offset` attribute is retracted in 3.14rc: ref: python/cpython#136950
As reported in #136170,
ZipFile.data_offset
isn't always correct depending on how one measures offsets. With 3.14rc1 tomorrow, I decided it would be best to push this to 3.15 and take more time to think about the feature and it's implementation.This PR reverts PRs #132165 and #132178.
Note that I had to resolve a merge conflict in
ZipFile._RealGetContents
due to #134250 landing after the two PRs addingdata_offset
, so this isn't quite a clean revert of the two above PRs.📚 Documentation preview 📚: https://cpython-previews--136950.org.readthedocs.build/