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 result `src` -> `dest` is generated here https://github.com/python/cpython/blob/master/Objects/exceptions.c#L1059 If we change order of arguments passed to `path_error2`, error message will be generated properly but OSError.filename will be incorrect (a_link instead of a) and following test will fail for `link`/`symlink` https://github.com/python/cpython/blob/master/Lib/test/test_os.py#L2901 Not sure if it's OK or not, so it definitely needs some input from Python core developers. ---------- nosy: +andrewnester _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29657> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com