Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update shutil.rst to clarify copy performance on Windows #142407

Open
Labels
OS-windowsdocsDocumentation in the Doc dir
@NewUserHa

Description

@NewUserHa

Documentation

The original documentionhttps://docs.python.org/3/library/shutil.html#shutil-platform-dependent-efficient-copy-operations about Platform-dependent efficient for Windows only mentioned thatshutil.copyfile(), but which is a bad read and write loop still.

Actually theshutil.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.
So 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 ofshutil.

Related info:
howshutil was implemented:#7160.
why onlyshutil.copy2() use Windows APICOPYFILE2 whileshutil.copyfile() not:#137074.
data that showsshutil.copy2() or Windows APICOPYFILE2 can accelerate transfer speed:https://github.com/antirotor/speedcopy.
PR of new version copy2 implemented:#105055.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-windowsdocsDocumentation in the Doc dir

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2026 Movatter.jp