Repository navigation
Conversation
eyal-benatav
requested review from
avishaiamiel and
omer-roth
as code owners
November 18, 2026 15:54
omer-roth
approved these changes
Nov 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commit-range scans print
Exception ignored in: <function ZipFile.__del__>tracebacks when the range has no files for the scan type. For example, an SCAcommit-historyscan of a range that doesn't touch any manifest or lockfile prints:The scan result and exit code are correct; only stderr is noisy. It appears twice per scan, once for each placeholder archive.
Cause
commit_range_scanner.pycreatesfrom_commit_zipped_documentsandto_commit_zipped_documentsas placeholderInMemoryZip()instances. They are replaced by closed archives fromzip_documents()only when there is something to scan.ZipFileis never closed.InMemoryZip.cleanup()closes theSpooledTemporaryFilebuffer but not theZipFile. When the placeholder is garbage collected,ZipFile.__del__callsclose(), which seeks on the already-closed buffer and raises.Fix
InMemoryZip.cleanup()now closes the archive before releasing the buffer.ZipFile.close()returns early when the archive is already closed, so archives built byzip_documents()are unaffected.cleanup()on an archive that was never closed and asserts that garbage collection raises no unraisable exception. It fails without the fix.Testing
pytest tests: 1564 passed, 1 skippedruff checkandruff format --checkare clean