cpython/Lib/pathlib
Barney Gale 7bd6ebf696
GH-73991: Prune `pathlib.Path.copy()` and `copy_into()` arguments (#123337)
Remove *ignore* and *on_error* arguments from `pathlib.Path.copy[_into]()`,
because these arguments are under-designed. Specifically:

- *ignore* is appropriated from `shutil.copytree()`, but it's not clear
  how it should apply when the user copies a non-directory. We've changed
  the callback signature from the `shutil` version, but I'm not confident
  the new signature is as good as it can be.
- *on_error* is a generalisation of `shutil.copytree()`'s error handling,
  which is to accumulate exceptions and raise a single `shutil.Error` at
  the end. It's not obvious which solution is better.

Additionally, this arguments may be challenging to implement in future user
subclasses of `PathBase`, which might utilise a native recursive copying
method.
2024-08-26 17:05:34 +01:00
..
__init__.py GH-73991: Rework `pathlib.Path.copytree()` into `copy()` (#122369) 2024-08-11 22:43:18 +01:00
_abc.py GH-73991: Prune `pathlib.Path.copy()` and `copy_into()` arguments (#123337) 2024-08-26 17:05:34 +01:00
_local.py GH-73991: Make `pathlib.Path.delete()` private. (#123315) 2024-08-26 16:26:34 +01:00
_os.py GH-122890: Fix low-level error handling in `pathlib.Path.copy()` (#122897) 2024-08-24 15:11:39 +01:00