cpython/Doc/whatsnew
Barney Gale 7c38097add
GH-73991: Add pathlib.Path.copy() (#119058)
Add a `Path.copy()` method that copies the content of one file to another.

This method is similar to `shutil.copyfile()` but differs in the following ways:

- Uses `fcntl.FICLONE` where available (see GH-81338)
- Uses `os.copy_file_range` where available (see GH-81340)
- Uses `_winapi.CopyFile2` where available, even though this copies more metadata than the other implementations. This makes `WindowsPath.copy()` more similar to `shutil.copy2()`.

The method is presently _less_ specified than the `shutil` functions to allow OS-specific optimizations that might copy more or less metadata.

Incorporates code from GH-81338 and GH-93152.

Co-authored-by: Eryk Sun <eryksun@gmail.com>
2024-06-14 17:15:49 +01:00
..
2.0.rst gh-101100: Fix Sphinx warnings in whatsnew/2.0.rst (#112351) 2024-02-25 02:45:56 -07:00
2.1.rst gh-101100: Fix Sphinx warnings in whatsnew/2.1.rst (#112357) 2024-02-25 23:49:04 -07:00
2.2.rst docs: fix a few typos identified by codespell (#119516) 2024-05-25 18:13:31 -07:00
2.3.rst Add 'The Python 2.3 Method Resolution Order' (#116435) 2024-04-15 13:01:15 +03:00
2.4.rst gh-101100: Fix Sphinx warnings from PEP 3108 stdlib re-organisation (#114327) 2024-02-04 09:45:35 +00:00
2.5.rst gh-120345: Fix incorrect use of the :class: role with the "()" suffix (GH-120347) 2024-06-12 17:23:03 +03:00
2.6.rst Docs: add link roles with Sphinx extlinks (#117850) 2024-04-15 21:22:00 +03:00
2.7.rst docs: fix a few typos identified by codespell (#119516) 2024-05-25 18:13:31 -07:00
3.0.rst gh-101100: Fix Sphinx warnings from PEP 3108 stdlib re-organisation (#114327) 2024-02-04 09:45:35 +00:00
3.1.rst gh-101100: Fix Sphinx warnings in whatsnew/3.1.rst (#115575) 2024-02-17 02:39:07 -07:00
3.2.rst gh-118671: Updated dead ActiveState links (#118730) 2024-05-08 01:06:38 -06:00
3.3.rst gh-113664: Improve style of Big O notation (GH-113695) 2024-01-10 15:01:18 +02:00
3.4.rst docs: fix a few typos identified by codespell (#119516) 2024-05-25 18:13:31 -07:00
3.5.rst Docs: add link roles with Sphinx extlinks (#117850) 2024-04-15 21:22:00 +03:00
3.6.rst docs: fix a few typos identified by codespell (#119516) 2024-05-25 18:13:31 -07:00
3.7.rst gh-101100: Fix Sphinx warnings in whatsnew/3.9.rst (#118364) 2024-04-28 20:31:22 +03:00
3.8.rst Docs: add link roles with Sphinx extlinks (#117850) 2024-04-15 21:22:00 +03:00
3.9.rst docs: fix a few typos identified by codespell (#119516) 2024-05-25 18:13:31 -07:00
3.10.rst gh-101100: Fix Sphinx warnings in whatsnew/3.10.rst (#118356) 2024-04-28 18:12:25 +00:00
3.11.rst Docs: add link roles with Sphinx extlinks (#117850) 2024-04-15 21:22:00 +03:00
3.12.rst gh-120345: Fix incorrect use of the :class: role with the "()" suffix (GH-120347) 2024-06-12 17:23:03 +03:00
3.13.rst gh-119577: Adjust DeprecationWarning when testing element truth values in ElementTree (GH-119762) 2024-06-06 20:18:30 -07:00
3.14.rst GH-73991: Add pathlib.Path.copy() (#119058) 2024-06-14 17:15:49 +01:00
changelog.rst
index.rst Fix file extensions for 3.14 Whats New (#118770) 2024-05-08 16:40:40 +00:00