Skip to content

Conversation

@barneygale
Copy link
Contributor

@barneygalebarneygale commented Feb 17, 2025

Replace WritablePath._copy_writer with a new _write_info() method. This method allows the target of a copy() to preserve metadata.

Replace pathlib._os.CopyWriter and LocalCopyWriter classes with new copy_file() and copy_info() functions. The copy_file() function uses source_path.info wherever possible to save on stat()s.

Replace `WritablePath._copy_writer` with a new `_write_info()` method. This method allows the target of a `copy()` to preserve metadata. Replace `pathlib._os.CopyWriter` and `LocalCopyWriter` classes with new `copy_file()` and `copy_info()` functions. The `copy_file()` function uses `source_path.info` wherever possible to save on `stat()`s.
@barneygalebarneygale changed the title GH-129897: Add private pathlib.Path method to write metadataGH-125413: Add private pathlib.Path method to write metadataFeb 17, 2025
@barneygalebarneygale marked this pull request as draft February 17, 2025 20:05
@barneygalebarneygale merged commit b251d40 into python:mainFeb 26, 2025
39 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@barneygale