[issue29657] os.symlink: FileExistsError shows wrong message

2021-05-01 Thread Yonatan Goldschmidt
Yonatan Goldschmidt added the comment: Just reached this issue independently (spent a few minutes debugging an error message like "FileExistsError: [Errno 17] File exists: 'a' -> 'b'", where 'a' didn't exist...) I agree with Rich on this - for me, the source of confusion was that the way Py

[issue29657] os.symlink: FileExistsError shows wrong message

2021-03-14 Thread Kamil Turek
Change by Kamil Turek : -- nosy: +kamilturek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue29657] os.symlink: FileExistsError shows wrong message

2021-03-12 Thread Eryk Sun
Change by Eryk Sun : -- components: +Extension Modules, Interpreter Core -Library (Lib) stage: patch review -> versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.5, Python 3.6, Python 3.7 ___ Python tracker

[issue29657] os.symlink: FileExistsError shows wrong message

2018-11-30 Thread Rich Jones
Rich Jones added the comment: @Larry - that would be an acceptable solution! I'm here because I encountered this error independently. I explain why the arrow is a problem here: https://bugs.python.org/issue35367 The issue is that the '->' notation is already used by the standard operating

[issue29657] os.symlink: FileExistsError shows wrong message

2017-06-18 Thread Larry Hastings
Larry Hastings added the comment: "Special cases aren't special enough to break the rules." I want the error message to mirror the API, which it currently does. If we swapped them, the error message would now contradict the API. So no, I don't support swapping "src" and "dst" in the error m

[issue29657] os.symlink: FileExistsError shows wrong message

2017-06-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See issue20517 for the discussion about current implementation. Are there any ideas about clearer error messages? Added Larry as the author of the original idea and implementation. -- nosy: +larry ___ Python track

[issue29657] os.symlink: FileExistsError shows wrong message

2017-03-05 Thread Xiang Zhang
Xiang Zhang added the comment: I agree with Eryk. The error message is misleading. When I see it, I take it as source -> destination. I think we should make the error message clearer, or document it in the OSError documentation. -- ___ Python tracke

[issue29657] os.symlink: FileExistsError shows wrong message

2017-03-03 Thread Eryk Sun
Eryk Sun added the comment: To me the error message is in the model of a source -> destination operation, in which the arrow indicates the operation's information flow (e.g. of the target path or inode number) from the source file to the destination file. I've never viewed it superficially as

[issue29657] os.symlink: FileExistsError shows wrong message

2017-03-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is not about how a symbolic link is represented. This is about how the operation of creating a symbolic link is represented. The first filename is the first argument of os.symlink(), the second filename is the second argument. Try to run os.symlink

[issue29657] os.symlink: FileExistsError shows wrong message

2017-03-03 Thread Eryk Sun
Eryk Sun added the comment: A symbolic link is typically represented the other way around, from the point of view of the link pointing at the target. However, Python conceptualizes linking as something like a copy or rename operation, with source and destination filenames, and the current erro

[issue29657] os.symlink: FileExistsError shows wrong message

2017-03-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The current error message looks good to me. What is wrong with it? -- nosy: +serhiy.storchaka ___ Python tracker ___ _

[issue29657] os.symlink: FileExistsError shows wrong message

2017-03-03 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- stage: -> patch review type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue29657] os.symlink: FileExistsError shows wrong message

2017-03-03 Thread Andrew Nester
Andrew Nester added the comment: I've been investigating this issue and did not come up with some easy solution. So the problem is: os_symlink uses `path_error2` to throw exception. the order of file arguments now is src then dest. For provided example src is `a` and dest is `sym_link`. As a re

[issue29657] os.symlink: FileExistsError shows wrong message

2017-02-26 Thread Sayan Chowdhury
Changes by Sayan Chowdhury : -- nosy: +sayanchowdhury ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue29657] os.symlink: FileExistsError shows wrong message

2017-02-26 Thread Xiang Zhang
Xiang Zhang added the comment: I concur the current message is misleading. OSError makes the string "file1 -> file2". This also affects other methods calling `path_error2()` such as os.link(). -- nosy: +xiang.zhang versions: +Python 3.6, Python 3.7

[issue29657] os.symlink: FileExistsError shows wrong message

2017-02-26 Thread Wolfgang Rohdewald
New submission from Wolfgang Rohdewald: execute the attached script. It should return FileExistsError: [Errno 17] File exists: 'a_link' -> 'a' but it returns FileExistsError: [Errno 17] File exists: 'a' -> 'a_link' -- components: Library (Lib) files: x.py messages: 288591 nosy: wrohde