cpython/Lib/pathlib
Barney Gale 563ab5cefe
GH-130614: pathlib ABCs: improve support for receiving path metadata (#131259)
In the private pathlib ABCs, replace `_WritablePath._write_info()` with
`_WritablePath._copy_from()`. This provides the target path object with
more control over the copying process, including support for querying and
setting metadata *before* the path is created.

Adjust `_ReadablePath.copy()` so that it forwards its keyword arguments to
`_WritablePath._copy_from()` of the target path object. This allows us to
remove the unimplemented *preserve_metadata* argument in the ABC method,
making it a `Path` exclusive.
2025-03-16 06:11:20 +00:00
..
__init__.py GH-130614: pathlib ABCs: improve support for receiving path metadata (#131259) 2025-03-16 06:11:20 +00:00
_os.py GH-130614: pathlib ABCs: improve support for receiving path metadata (#131259) 2025-03-16 06:11:20 +00:00
types.py GH-130614: pathlib ABCs: improve support for receiving path metadata (#131259) 2025-03-16 06:11:20 +00:00