Skip to content

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

Closed
@barneygale

Description

@barneygale

(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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions