Title: gh-81340: Use `copy_file_range` in `shutil.copyfile` copy functions by illia-v · Pull Request #93152 · python/cpython · GitHub
Open Graph Title: gh-81340: Use `copy_file_range` in `shutil.copyfile` copy functions by illia-v · Pull Request #93152 · python/cpython
X Title: gh-81340: Use `copy_file_range` in `shutil.copyfile` copy functions by illia-v · Pull Request #93152 · python/cpython
Description: This makes shutil.copyfile prefer the copy_file_range system call on Linux. copy_file_range gives filesystems an opportunity to implement the use of reflinks or server-side copy, but we cannot determine whether any of them are implemented. Therefore, I added an allow_reflink argument in case anyone wants to disable copy-on-write. GNU Coreutils enables copy-on-write by default, that is why I set allow_reflink to true by default (unlike @vstinner proposed in #81338). Note, there is a known copy_file_range bug for copying from special filesystems like procfs and sysfs. It seems not to be fixed yet, so we have to check for a silent copy_file_range fail as Coreutils and Go do. Issue: gh-81340
Open Graph Description: This makes shutil.copyfile prefer the copy_file_range system call on Linux. copy_file_range gives filesystems an opportunity to implement the use of reflinks or server-side copy, but we cannot dete...
X Description: This makes shutil.copyfile prefer the copy_file_range system call on Linux. copy_file_range gives filesystems an opportunity to implement the use of reflinks or server-side copy, but we cannot dete...
Opengraph URL: https://github.com/python/cpython/pull/93152
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:88f51dc1-a603-2617-bfd1-d1af8b276a15 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 8C1A:147CA2:28DEF65:36C7E05:6992EFDB |
| html-safe-nonce | ea6743d9363d7f5a295c8a9eabc810b8be702ffc12303036512717b24f47e41c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QzFBOjE0N0NBMjoyOERFRjY1OjM2QzdFMDU6Njk5MkVGREIiLCJ2aXNpdG9yX2lkIjoiNTkxMTE3NTY4ODk2MzE1Nzk3OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c767909ca0f4e3cf891079859458f8f24c06011ec65c1e2bb2bdd2e5ec7c1712 |
| hovercard-subject-tag | pull_request:944822682 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/93152/files |
| twitter:image | https://avatars.githubusercontent.com/u/17710133?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/17710133?s=400&v=4 |
| og:image:alt | This makes shutil.copyfile prefer the copy_file_range system call on Linux. copy_file_range gives filesystems an opportunity to implement the use of reflinks or server-side copy, but we cannot dete... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 01ab16879a3159e6f0717ab948b9b562e162a6aafd1f4393b786b07b747df244 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | b1570f3928bef80fa5fc7890ce0942e9b696ad9d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width