-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
gh-81340: Use copy_file_range
in shutil.copyfile
copy functions
#93152
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
985159a
Move determining a block size for copying to a separate function
illia-v e4fa33b
Add copy-on-write support to shutil
illia-v 47b0834
Update comments in `_determine_linux_fastcopy_blocksize`
illia-v 474859c
Update docs to link to `copy_file_range` as a Python function
illia-v 1846895
Merge branch 'main' into fix-issue-81340
illia-v 41d48d9
Drop the `allow_reflink` argument
illia-v e8feaca
Remove duplicate change entries from docs
illia-v dc07a54
Merge branch 'main' into fix-issue-81340
illia-v cb1dae8
Merge branch 'main' into fix-issue-81340
zooba File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Drop the
allow_reflink
argument
- Loading branch information
commit 41d48d9cdfcee263c980405cf67d542d47c7f6a4
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
Misc/NEWS.d/next/Library/2022-05-23-21-23-29.gh-issue-81340.D11RkZ.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
Use :func:`os.copy_file_range` in :func:`shutil.copy`, :func:`shutil.copy2`, | ||
and :func:`shutil.copyfile` functions by default. An underlying Linux system | ||
call gives filesystems an opportunity to implement the use of copy-on-write | ||
(in case of btrfs and XFS) or server-side copy (in the case of NFS.) The | ||
functions have a new *allow_reflink* argument to control the functionality. | ||
(in case of btrfs and XFS) or server-side copy (in the case of NFS.) | ||
Patch by Illia Volochii. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.