[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 10:00:10 EDT 2016


Eryk Sun added the comment:

3.3 added os.replace, which on Windows entailed a switch from calling MoveFile to MoveFileEx in order to specify the MOVEFILE_REPLACE_EXISTING flag. However, not passing the MOVEFILE_COPY_ALLOWED broke compatibility with os.rename on Windows for versions prior to 3.3. I don't know whether or not this was discussed as an intentional breaking change in order to align the behavior with POSIX rename(). The change seems reasonable to me, plus at this point I don't think much can be done other than to add a note to the docs that the behavior changed in 3.3.

----------
nosy: +eryksun

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


More information about the Python-bugs-list mailing list