Skip to content

Remove dirs_exist_ok argument from pathlib.Path.copy() #130608

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
barneygale opened this issue Feb 26, 2025 · 0 comments
Closed

Remove dirs_exist_ok argument from pathlib.Path.copy() #130608

barneygale opened this issue Feb 26, 2025 · 0 comments
Labels
stdlib Python modules in the Lib dir topic-pathlib type-feature A feature request or enhancement

Comments

@barneygale
Copy link
Contributor

barneygale commented Feb 26, 2025

(Background: pathlib.Path.copy() is new in Python 3.14, so it hasn't been released yet.)

I don't think there's a compelling case to support a dirs_exist_ok argument in the initial version of Path.copy(). Most Python users don't need "copy and merge directory" functionality. Particularly unlucky users might use the wrong source or target path, and perform a large directory tree merge that is difficult to unpick.

We could add this back in later, in response to user demand.

Linked PRs

barneygale added a commit to barneygale/cpython that referenced this issue Feb 26, 2025
…opy()`

This feature isn't sufficiently motivated.
@picnixz picnixz added stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Feb 28, 2025
barneygale added a commit that referenced this issue Feb 28, 2025
seehwan pushed a commit to seehwan/cpython that referenced this issue Apr 16, 2025
…opy()` (python#130610)

This feature isn't sufficiently motivated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir topic-pathlib type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants