STINNER Victor <victor.stin...@gmail.com> added the comment:

realpath.patch:

 - Add os.realpath()
 - posixpath.realpath() uses os.realpath(), or os.getcwd() if the path is an 
empty string
 - os.realpath() uses canonicalize_file_name() if available, or use realpath() 
with a buffer of MAXPATHLEN bytes

Don't use realpath(path, NULL) because it is not possible to test if realpath() 
supports NULL: OpenBSD did segfault if the buffer was NULL. Testing the support 
in configure is not a good idea because it depends on the version of the C 
library. You may use a more recent C library to compile Python for example.

genericpath, macpath and os2emxpath are not patched to use os.realpath(), even 
if it is available. I don't know if these modules should be patched. ntpath 
uses the native Windows function (if available): GetFullPathNameW().

----------
Added file: http://bugs.python.org/file24596/realpath.path

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12801>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to