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
Previously, `add()` and `commit()` opened the target file with
mode `"w"`, which truncates it immediately on open. A crash or
exception mid-write would leave an empty or partial JSON file,
with no way to recover the original content.
A new `_write_atomic()` helper writes to a temp file in the same
directory, then uses `os.replace()` (atomic rename) to swap it
into place. Both `add()` and `commit()` now use this helper.
0 commit comments