Message288906
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. |
|
Date |
User |
Action |
Args |
2017-03-03 17:46:02 | andrewnester | set | recipients:
+ andrewnester, wrohdewald, sayanchowdhury, xiang.zhang |
2017-03-03 17:46:02 | andrewnester | set | messageid: <1488563162.4.0.850337815376.issue29657@psf.upfronthosting.co.za> |
2017-03-03 17:46:02 | andrewnester | link | issue29657 messages |
2017-03-03 17:46:02 | andrewnester | create | |
|