Title: Update shutil.rst to clarify copy performance on Windows · Issue #142407 · python/cpython · GitHub
Open Graph Title: Update shutil.rst to clarify copy performance on Windows · Issue #142407 · python/cpython
X Title: Update shutil.rst to clarify copy performance on Windows · Issue #142407 · python/cpython
Description: Documentation The original documention https://docs.python.org/3/library/shutil.html#shutil-platform-dependent-efficient-copy-operations about Platform-dependent efficient for Windows only mentioned that shutil.copyfile(), but which is a...
Open Graph Description: Documentation The original documention https://docs.python.org/3/library/shutil.html#shutil-platform-dependent-efficient-copy-operations about Platform-dependent efficient for Windows only mentione...
X Description: Documentation The original documention https://docs.python.org/3/library/shutil.html#shutil-platform-dependent-efficient-copy-operations about Platform-dependent efficient for Windows only mentione...
Opengraph URL: https://github.com/python/cpython/issues/142407
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Update shutil.rst to clarify copy performance on Windows","articleBody":"# Documentation\n\nThe original documention https://docs.python.org/3/library/shutil.html#shutil-platform-dependent-efficient-copy-operations about Platform-dependent efficient for Windows only mentioned that `shutil.copyfile()`, but which is a bad read and write loop still.\n\nActually the `shutil.copy2()` used the Windows API COPYFILE2, which is faster, and native call which means don't copy to memory on userspace, and support copy-on-write. \nSo this should be mentioned in documention to let people know rather than only knowing until read all the opened issues on github and source code of `shutil`.\n\nRelated info:\nhow `shutil` was implemented: https://github.com/python/cpython/pull/7160.\nwhy only `shutil.copy2()` use Windows API `COPYFILE2` while `shutil.copyfile()` not: https://github.com/python/cpython/issues/137074.\ndata that shows `shutil.copy2()` or Windows API `COPYFILE2` can accelerate transfer speed: https://github.com/antirotor/speedcopy.\nPR of new version copy2 implemented: https://github.com/python/cpython/pull/105055.\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-142408\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/NewUserHa","@type":"Person","name":"NewUserHa"},"datePublished":"2025-12-08T09:00:24.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/142407/cpython/issues/142407"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d5fcf7c8-b9eb-b2d7-02e4-386fc01a728a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AE9C:106C25:3CE84A:566A62:696A44E2 |
| html-safe-nonce | e86d83027a7bd16a4474f401ff7d75afd51419c7265cb100bfaaef4e320c3848 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRTlDOjEwNkMyNTozQ0U4NEE6NTY2QTYyOjY5NkE0NEUyIiwidmlzaXRvcl9pZCI6IjY1NTg4ODU3NzM5OTYzNDQ1NDYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | ded42347547b144fbd5282f30585853aebe55bae1061449ae2db4ee294d94894 |
| hovercard-subject-tag | issue:3705361633 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/python/cpython/142407/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8c3dcfd3d291cc101a9e2a32b9523489a71892b0e2769f201ccf59083f763c7b/python/cpython/issues/142407 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8c3dcfd3d291cc101a9e2a32b9523489a71892b0e2769f201ccf59083f763c7b/python/cpython/issues/142407 |
| og:image:alt | Documentation The original documention https://docs.python.org/3/library/shutil.html#shutil-platform-dependent-efficient-copy-operations about Platform-dependent efficient for Windows only mentione... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | NewUserHa |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3f871c8e07f0ae1886fa8dac284166d28b09ad5bada6476fc10b674e489788ef |
| turbo-cache-control | no-preview |
| 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 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 63c426b30d262aba269ef14c40e3c817b384cd61 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width