This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients eric.araujo, matejcik, neologix, pitrou, rosslagerwall, santoso.wijaya, vstinner
Date 2012-02-21.23:51:27
SpamBayes Score 1.4465218e-08
Marked as misclassified No
Message-id <1329868289.43.0.901396663923.issue12801@psf.upfronthosting.co.za>
In-reply-to
Content
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().
History
Date User Action Args
2012-02-21 23:51:29vstinnersetrecipients: + vstinner, pitrou, matejcik, eric.araujo, neologix, santoso.wijaya, rosslagerwall
2012-02-21 23:51:29vstinnersetmessageid: <1329868289.43.0.901396663923.issue12801@psf.upfronthosting.co.za>
2012-02-21 23:51:28vstinnerlinkissue12801 messages
2012-02-21 23:51:28vstinnercreate