[issue17639] symlinking .py files creates unexpected sys.path

Kristján Valur Jónsson report at bugs.python.org
Fri Apr 5 18:35:12 CEST 2013


Kristján Valur Jónsson added the comment:

Yes, of course.  But I still maintain that the failure of python to work with a linktree of .py files, where the destination position of said links is arbitrary, is rather unusual, and IMHO violates the principle of least surprise.  In this case, the existence of the virtual linktree is apparently an implementation detail of the hadoop implementation, not something that we as hadoop users were supposed to know or care about.

Exploiting the OS file system implementation detail of a symbolic link as a language import feature is an example of an unusual coupling indeed, in my opinion.

Even import-guru Nick didn't seem to be aware of this feature.  It's great that we plan at least to document this unix-only feature at some point.

Cheers!

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17639>
_______________________________________


More information about the Python-bugs-list mailing list