`pathlib.Path.move()` consumes too much disk space
Open
Nobody has claimed this yet.
performance
stdlib
topic-pathlib
type-bug
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
Bug report
Bug description:
pathlib.Path.move() and move_into() (new in 3.14+) currently perform a complete copy before deleting any source files, which can consume a lot of disk space. It might be better if they removed source files/directories as the copy operation progresses.
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Linked PRs
- gh-132569
- gh-133852
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the pathlib.Path.move() and move_into() entry points described in the report, then review linked PRs gh-132569 and gh-133852 before making changes. The desired outcome is to avoid retaining a complete copy while moving files and directories, with source removal progressing during the copy.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 20/100