refactor: replace shutil.copy2 with pathlib.Path.copy (Python 3.14)
pathlib.Path.copy() (new in 3.14) delegates to the OS copy mechanism (sendfile/copy_file_range) like shutil.copy2 but does not propagate file metadata, which is cleaner for both call sites:
- object_store.py write path: mode is set explicitly via fchmod anyway - object_store.py restore path: shutil.copy2 required a manual os.utime to reset the object-store mtime so editors reload the buffer; with pathlib.copy() (preserve_metadata=False by default) mtime is already 'now', so os.utime is dropped along with its workaround comment - init.py template copy: straight drop-in with no behavioral difference
shutil import removed from object_store.py (no remaining usages). copytree call sites in init.py and domains.py left as shutil — no pathlib equivalent exists yet.
0 comments
muse hub commit comment sha256:a20e7f7a104830b9670ac5057b75c167b5f7b86e43c38dc8c439b4da9a575fe0 --body "your comment"
No comments yet. Be the first to start the discussion.