| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…arge_file_with_dd_no_sig` Remove the overly restrictive `allowed_memory` override (200 KiB) in `test_strip_removed_large_file_with_dd_no_sig` to prevent a memory checking failure.
Introduce the `assert_memory_usage` context manager to narrow the scope of tracemalloc tracking down exclusively to the file-repacking phase. This prevents previous file-writing side effects from interfering with the baseline, improves tracing accuracy, and eliminates redundant inner sub-function wrappers.
|
It seems that a dynamic memory threshold cannot be easily calculated. Keep the original empirical threshold and revise the comment to be more clear. Additionally, introduce the assert_memory_usage context manager and refactor the test code to improve memory checking accuracy as well as remove redundant inner sub-function wrappers. |
Sorry, something went wrong.
|
!buildbot bigmem |
Sorry, something went wrong.
|
🤖 New build scheduled with the buildbot fleet by @StanFromIreland for commit 5335be0 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F152203%2Fmerge The command will test the builders whose names match following regular expression: bigmem The builders matched are:
|
Sorry, something went wrong.
Remove redundant "TESTFN2" disk space warnings from TestRepack, as these tests exclusively use TemporaryFile(). Additionally, remove the repetitive `self.assertFalse(f.closed)` checks from `TestRepack` methods since it's already verified in `TestsWithSourceFile`.
Rename `TestRepack` to `TestRepacker` to better reflect its coverage of `zipfile._Repacker`. Move heavy text chunk generation and common constants from `setUp` to `setUpClass` to ensure single initialization across tests. Clean up repetitive local definitions of filenames and lorem text by promoting them to class properties. Reduce the test file size from 8 GiB to 4.1 GiB, which is large enough to trigger ZIP64 extension and sufficient for the testing purpose.
There was a problem hiding this comment.
nice refactoring
Sorry, something went wrong.
|
Thanks @danny0838 for the PR, and @gpshead for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
Sorry, something went wrong.
|
Thanks @danny0838 for the PR, and @gpshead for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14. |
Sorry, something went wrong.
|
Sorry, @danny0838 and @gpshead, I could not cleanly backport this to 3.13 due to a conflict. cherry_picker e5ed2ad9be8e0014a3bf4dc9f89c4ad2695500cd 3.13 |
Sorry, something went wrong.
|
Thanks @danny0838 for the PR, and @gpshead for merging it 🌮🎉.. I'm working now to backport this PR to: 3.15. |
Sorry, something went wrong.
|
Sorry, @danny0838 and @gpshead, I could not cleanly backport this to 3.14 due to a conflict. cherry_picker e5ed2ad9be8e0014a3bf4dc9f89c4ad2695500cd 3.14 |
Sorry, something went wrong.
|
Sorry, @danny0838 and @gpshead, I could not cleanly backport this to 3.15 due to a conflict. cherry_picker e5ed2ad9be8e0014a3bf4dc9f89c4ad2695500cd 3.15 |
Sorry, something went wrong.
|
(this was for a recent feature, no backports needed) |
Sorry, something went wrong.
|
@gpshead Can you help check other remove/repack related PRs? There are at least 3, listed in the README page of the zipremove package as badges. |
Sorry, something went wrong.
…ythonGH-152203) * pythongh-152190: Fix memory checking failure in `test_strip_removed_large_file_with_dd_no_sig` Remove the overly restrictive `allowed_memory` override (200 KiB) in `test_strip_removed_large_file_with_dd_no_sig` to prevent a memory checking failure. * pythongh-152190: Revise comment about the empirical memory threshold * pythongh-152190: Improve memory checking accuracy for `test_zipfile64` Introduce the `assert_memory_usage` context manager to narrow the scope of tracemalloc tracking down exclusively to the file-repacking phase. This prevents previous file-writing side effects from interfering with the baseline, improves tracing accuracy, and eliminates redundant inner sub-function wrappers. * pythongh-152190: Improve coding style and docstrings * pythongh-152190: Remove unneeded comments and checks Remove redundant "TESTFN2" disk space warnings from TestRepack, as these tests exclusively use TemporaryFile(). Additionally, remove the repetitive `self.assertFalse(f.closed)` checks from `TestRepack` methods since it's already verified in `TestsWithSourceFile`. * pythongh-152190: Further optimize tests and tidy code Rename `TestRepack` to `TestRepacker` to better reflect its coverage of `zipfile._Repacker`. Move heavy text chunk generation and common constants from `setUp` to `setUpClass` to ensure single initialization across tests. Clean up repetitive local definitions of filenames and lorem text by promoting them to class properties. Reduce the test file size from 8 GiB to 4.1 GiB, which is large enough to trigger ZIP64 extension and sufficient for the testing purpose. --------- Co-authored-by: Zachary Ware <zach@python.org>
| Back | FazBrowse Home | New Git URL |
Remove the overly restrictive allowed_memory override (200 KiB) in test_strip_removed_large_file_with_dd_no_sig to prevent a memory checking failure.
Additionally, revise the comment about the empirical 10 MiB memory threshold, optimize the code, and clear improper comments.