]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-125413: Fix stale metadata from `pathlib.Path.copy()` and `move()` (#130424)
authorBarney Gale <barney.gale@gmail.com>
Mon, 24 Feb 2025 19:10:50 +0000 (19:10 +0000)
committerGitHub <noreply@github.com>
Mon, 24 Feb 2025 19:10:50 +0000 (19:10 +0000)
commit78e09a488d41066dea5f8dcf22405a0d5dd8be23
tree4c9f7cf2b06f66eec462608e4dbde057b81ae2ba
parent48c84a400aa90014a16ceac92df4b0cf5ca6b3d4
GH-125413: Fix stale metadata from `pathlib.Path.copy()` and `move()` (#130424)

In `pathlib.Path.copy()` and `move()`, return a fresh `Path` object with an
unpopulated `info` attribute, rather than a `Path` object with information
recorded *prior* to the path's creation.
Lib/pathlib/_abc.py
Lib/pathlib/_local.py
Lib/test/test_pathlib/test_pathlib_abc.py
Misc/NEWS.d/next/Library/2025-02-21-21-50-21.gh-issue-125413.DEAD0L.rst [new file with mode: 0644]