Message 150188 - Python tracker (original) (raw)

I propose quite the opposite. rename() should not overwrite existing files by default.

  1. That's not what I understood from:

    os.rename(overwrite=True) to produce consistent cross-platform behavior.

  2. The above argument on backward incompatible change applies in exactly the same way (just exchange Windows for POSIX).

  3. As explained above, it can not be done reliably on POSIX (TOCTTOU race).