You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Only read the previous contents during atomic append if the destination exists. This lets atomic append create a missing file, matching non-atomic append, while preserving the existing temporary-file replacement and Windows cleanup handling.
Add eight native-filesystem regression cases covering atomic/non-atomic append, UTF-8/UTF-16, empty/nonempty first writes, nested parent creation and a subsequent append. Against the unchanged source, four atomic cases fail and the four non-atomic cases pass.
Validation:
Windows Python 3.12.14: baseline 302 passed/3 skipped; patched 310 passed/3 skipped. Both had one pytest cache permission warning.
This does not change concurrent append guarantees or the error/cleanup behavior discussed in #194. The reproduction uses real temporary files and no fault injection. AI assistance was used for investigation, tests, implementation and review; no independent human review is claimed.
The Codacy check reports two Bandit B101 findings on the new pytest assertions in tests/test_io.py (lines 210 and 214): "Use of assert detected". Both are test assertions, following this module's existing pytest style; neither is a runtime security check. I have retained them rather than suppressing the rule or changing repository settings.
The full suite passes locally on Windows Python 3.10/3.12 and Linux Python 3.12. The GitHub Actions "Test package" run is currently action_required, awaiting maintainer approval to run this first fork contribution. Remote CI is therefore not yet verified.
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
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.
Describe your changes
Only read the previous contents during atomic append if the destination exists. This lets atomic append create a missing file, matching non-atomic append, while preserving the existing temporary-file replacement and Windows cleanup handling.
Add eight native-filesystem regression cases covering atomic/non-atomic append, UTF-8/UTF-16, empty/nonempty first writes, nested parent creation and a subsequent append. Against the unchanged source, four atomic cases fail and the four non-atomic cases pass.
Validation:
This does not change concurrent append guarantees or the error/cleanup behavior discussed in #194. The reproduction uses real temporary files and no fault injection. AI assistance was used for investigation, tests, implementation and review; no independent human review is claimed.
Related issue
Closes #201
Checklist before requesting a review