FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

GH-125413: Add private `pathlib.Path` method to write metadata by barneygale · Pull Request #130238 · python/cpython · GitHub

Repository navigation

GH-125413: Add private pathlib.Path method to write metadata - #130238

Merged
barneygale merged 4 commits into
python:mainfrom
barneygale:gh-129897-del-copywriter
Feb 26, 2025
Merged

barneygale merged 4 commits into
python:mainfrom
barneygale:gh-129897-del-copywriter

Conversation

barneygale commented Feb 17, 2025 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Contributor

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.
barneygale changed the title GH-129897: Add private pathlib.Path method to write metadata GH-125413: Add private pathlib.Path method to write metadata Feb 17, 2025
barneygale marked this pull request as draft February 17, 2025 20:05
Comment thread Lib/pathlib/_os.py
barneygale merged commit b251d40 into python:main Feb 26, 2025
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL