[issue16074] Bad error message in os.rename, os.link, and os.symlink

2014-02-24 Thread Larry Hastings
Larry Hastings added the comment: It's fine that we're not fixing this in 3.3, but since this did get fixed in 3.4, I propose dropping 3.3 from the version list and changing the resolution to "fixed". *waves magic wand* -- resolution: wont fix -> fixed stage: needs patch -> committed/

[issue16074] Bad error message in os.rename, os.link, and os.symlink

2014-02-24 Thread Georg Brandl
Georg Brandl added the comment: No change for 3.3. -- resolution: -> wont fix status: open -> closed ___ Python tracker ___ ___ Pytho

[issue16074] Bad error message in os.rename, os.link, and os.symlink

2014-02-09 Thread Vajrasky Kok
Vajrasky Kok added the comment: Now, that we have fixed this bug in Python 3.4 with this commit http://hg.python.org/cpython/rev/081a9d8ba3c7, what should we do with the bug in Python 3.3? Use my patch (omitting filenames)? Keep the status quo (one filename)? If yes, close this ticket as inva

[issue16074] Bad error message in os.rename, os.link, and os.symlink

2014-02-05 Thread Larry Hastings
Larry Hastings added the comment: I probably should have continued with this issue instead of creating a new issue for it, sorry. But there's a new issue tracking this change, where I propose to add new error-reporting functions that support two filenames. That's happening in #20517. --

[issue16074] Bad error message in os.rename, os.link, and os.symlink

2014-02-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: However it is still a bug in 3.3. -- assignee: serhiy.storchaka -> larry ___ Python tracker ___ __

[issue16074] Bad error message in os.rename, os.link, and os.symlink

2014-02-03 Thread Larry Hastings
Larry Hastings added the comment: As release manager, I would be willing to consider this patch. However, as original author of the code in question, I don't like it. Showing zero filenames, while potentially less confusing, is also far less helpful. A better solution would be to show both

[issue16074] Bad error message in os.rename, os.link, and os.symlink

2014-02-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Larry, are you agree with this solution (remove ambiguous filename attribute from OSError raised by functions with two filename arguments)? -- ___ Python tracker ___

[issue16074] Bad error message in os.rename, os.link, and os.symlink

2014-01-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The 3.4 patch LGTM, but the 3.3 patch perhaps has a bug. -- assignee: -> serhiy.storchaka ___ Python tracker ___

[issue16074] Bad error message in os.rename, os.link, and os.symlink

2014-01-06 Thread Vajrasky Kok
Vajrasky Kok added the comment: Jakub Wilk, yeah, I missed that one. Jason Gerard DeRose, thanks for the additional information. Anyway, I already "persuaded" Ruby developers to specialize the message, although it's only for creating symlink. https://bugs.ruby-lang.org/issues/9263 As of Pyth

[issue16074] Bad error message in os.rename, os.link, and os.symlink

2013-12-28 Thread Jason Gerard DeRose
Jason Gerard DeRose added the comment: vajrasky, one more errno to consider: [Errno 39] Directory not empty: '/tmp/bar' This is when renaming a directory: src directory exists; dst directory exists and is non-empty. In 3.4 Beta1, this error message now includes the src instead of the dst (fl

[issue16074] Bad error message in os.rename, os.link, and os.symlink

2013-12-21 Thread Jakub Wilk
Jakub Wilk added the comment: As far as rename() and link() are concerned, either of the arguments can cause an ENOENT error: os.rename('/dev/foobar', '/dev/barfoo') # fails because /dev/foobar doesn't exist os.rename('/dev/null', '/foo/bar/baz') # fails because /foo/bar doesn't exist --

[issue16074] Bad error message in os.rename, os.link, and os.symlink

2013-12-19 Thread Vajrasky Kok
Vajrasky Kok added the comment: Is there any possibility this ticket could be committed in Python 3.4? If yes, it would be good because we would have a good foundation for creating better error message in Python 3.5. Anyway, I check Python's competitors' behaviour. Ruby displays both files.

[issue16074] Bad error message in os.rename, os.link, and os.symlink

2013-12-01 Thread Vajrasky Kok
Vajrasky Kok added the comment: Patch for Python 3.3. It omitted file information for error messages in rename, symlink, and link. I'll create a separate ticket for adding extra file information to these error messages. -- Added file: http://bugs.python.org/file32935/better_error_mes

[issue16074] Bad error message in os.rename, os.link, and os.symlink

2013-12-01 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the patch for Python 3.4. It removed file information for os.rename, os.link, and os.symlink. I agree with Ezio that giving extra information is better but since Python 3.4 is in beta maybe we can defer this to Python 3.5. There are couples of errno

[issue16074] Bad error message in os.rename, os.link, and os.symlink

2013-12-01 Thread Vajrasky Kok
Changes by Vajrasky Kok : -- title: bad error message in os.rename -> Bad error message in os.rename, os.link, and os.symlink ___ Python tracker ___

[issue16074] bad error message in os.rename

2013-12-01 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- keywords: +3.3regression ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https

[issue16074] bad error message in os.rename

2013-04-13 Thread Ezio Melotti
Ezio Melotti added the comment: I would say either option 3, or, if it's too complicated, option 2. FTR the two issues mentioned in the previous message are #13775 and #16812. -- ___ Python tracker

[issue16074] bad error message in os.rename

2013-04-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I just closed two almost identical issues in favour of this issue. I believe that in order to avoid ambiguity, there are three possible solutions of such issues: 1. Do not display any filename (as in Python 2.7). 2. Display both filenames (this can also be s

[issue16074] bad error message in os.rename

2012-12-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: As I see, now 3.4 behavior differs from 3.3 behavior. >>> os.link('non-existent-name', 'new-name') Traceback (most recent call last): File "", line 1, in FileNotFoundError: [Errno 2] No such file or directory: 'non-existent-name' >>> os.symlink('long-name'*

[issue16074] bad error message in os.rename

2012-09-30 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue16074] bad error message in os.rename

2012-09-30 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue16074] bad error message in os.rename

2012-09-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Same issue for os.link and os.symlink. >>> import os >>> os.link('non-existent-name', 'new-name') Traceback (most recent call last): File "", line 1, in FileNotFoundError: [Errno 2] No such file or directory: 'new-name' >>> os.symlink('long-name'*1000, 'new

[issue16074] bad error message in os.rename

2012-09-28 Thread Larry Hastings
Larry Hastings added the comment: New patch, just calling posix_error directly. -- Added file: http://bugs.python.org/file27344/larry.rename_error.2.diff ___ Python tracker ___ _

[issue16074] bad error message in os.rename

2012-09-28 Thread Kushal Das
Changes by Kushal Das : Removed file: http://bugs.python.org/file27342/os_rename.patch ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue16074] bad error message in os.rename

2012-09-28 Thread Larry Hastings
Larry Hastings added the comment: As Serhiy says, which filename to display is wholly context-sensitive to which errno it is. And there's no cheap way to display both. The cheap fix is to call path_error with a nulled-out "path" object; this will display the error without a filename. Patch

[issue16074] bad error message in os.rename

2012-09-28 Thread Kushal Das
Kushal Das added the comment: Just for record the same issue can be seen in a Linux box also. I tested in a Fedora 17 system. -- ___ Python tracker ___ _

[issue16074] bad error message in os.rename

2012-09-28 Thread Kushal Das
Kushal Das added the comment: Now the printing the source name instead of the destination as the bug described. -- keywords: +patch nosy: +kushaldas Added file: http://bugs.python.org/file27342/os_rename.patch ___ Python tracker

[issue16074] bad error message in os.rename

2012-09-28 Thread Glenn Linderman
Glenn Linderman added the comment: Terry, I thought the test case would demonstrate the error details. As far as Windows, I encountered it there, and it seemed like the sort of error that could be in a Windows-specific module. Serhiy, thanks for confirming, and analyzing. At this point in the r

[issue16074] bad error message in os.rename

2012-09-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Error in argument of path_error in function internal_rename. In file Modules/posixmodule.c. -- ___ Python tracker ___ _

[issue16074] bad error message in os.rename

2012-09-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Error in argument of path_error in function internal_rename. For some errcode it should be dst, for some src, for some both, for some none, and for some it is unknown. And this can be platform-specific. I suggest rollback this enhancement. -- nosy:

[issue16074] bad error message in os.rename

2012-09-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I confirm the bug. >>> import os >>> os.rename('non-existent-name', 'new-name') Traceback (most recent call last): File "", line 1, in FileNotFoundError: [Errno 2] No such file or directory: 'new-name' It obviously should be "No such file or directory: 'no

[issue16074] bad error message in os.rename

2012-09-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: Could you give a specific example of the message you got, why it is wrong, and what you think it should be? Is there any reason to think that this is Windows-specific? -- components: +Library (Lib) -Windows nosy: +terry.reedy stage: -> needs patch titl