Message186063
> I am not sure about what use cases could be broken by the above change, do you have examples?
> Normal use cases of symbolic links have to do with linking entire folders, not individual files, and that behaviour would not be broken by such a hypothetical change, I think.
For example:
/tmp/
foo/
foo.py
libfoo.py
foo.py -> /tmp/foo/foo.py
With foo.py containing "import libfoo".
Now, calling /tmp/foo.py works because sys.path[0] ==
dirname(realpath("/tmp/foo.py")) == dirname("/tmp/foo/foo.py") ==
"/tmp/foo.
If we change sys.path[0] to not dereference the symlink (that's how I
understood your suggestion, maybe I got it wrong), it will now be
/tmp, and importing libfoo will fail.
That's AFAICT exacyly the problem reported by the OP on OS-X. |
|
Date |
User |
Action |
Args |
2013-04-05 07:06:09 | neologix | set | recipients:
+ neologix, jackjansen, kowaltowski, kristjan.jonsson |
2013-04-05 07:06:09 | neologix | link | issue1387483 messages |
2013-04-05 07:06:09 | neologix | create | |
|