[issue6764] os.path.join should call os.path.normpath on result

2009-08-22 Thread Michael Foord
New submission from Michael Foord mich...@voidspace.org.uk: os.path.join has very basic behavior in the handling of '..' import os os.path.join('/foo', '..') '/foo/..' For some usecases (comparing paths for example) this is not useful and you have to manually call normpath on the results:

[issue6764] os.path.join should call os.path.normpath on result

2009-08-22 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Is there any problem with join always calling normpath on it's result? Yes. If /usr/local/bin was a symlink to /net/x86, then /usr/local/bin/../lib might not be /usr/local/lib, but /net/lib. So calling normpath in the presence of symlinks

[issue6764] os.path.join should call os.path.normpath on result

2009-08-22 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: Damn. :-) Detecting the case where the normpath'd location is the same means hitting the filesystem - and the current version just does string manipulation so it doesn't seem like an acceptable change. Still, compared to other languages