[issue28356] Windows: os.rename different in python 2.7.12 and python 3.5.2

Eryk Sun report at bugs.python.org
Tue Oct 4 11:26:35 EDT 2016


Eryk Sun added the comment:

In scanning over issue 8828, I see no discussion of the consequences of not using MOVEFILE_COPY_ALLOWED in Antoine's patch, so it appears that this behavior change was unintentional.

> For now I switched to shutil.move() but I suppose its not
> as performant/optimal as an "move" or "rename" directly 
> supported by the OS.

Correct, the copy employed by shutil.move for a cross-volume move is not as optimized as what MoveFile uses (basically CopyFile), but unless you're moving a file that's very large it shouldn't matter, and even then without testing I don't know if it's a significant difference relative to the throughput of the disk(s) involved.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28356>
_______________________________________


More information about the Python-bugs-list mailing list