[issue24154] pathlib.Path.rename moves file to Path.cwd() when argument is a string

2017-03-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This would contradict to all other functions and commands. The current behavior is correct. -- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue24154] pathlib.Path.rename moves file to Path.cwd() when argument is a string

2015-05-09 Thread Yuri Teixeira
New submission from Yuri Teixeira: from pathlib import Path p = Path('/any/folder') f = p / 'oldname' f.rename('newname') The above will rename the file 'oldname' to 'newname' but will also move it to Path.cwd() I thought that pathlib.Path.rename() when fed with a string would change f.name onl