Message153916
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(). |
|
Date |
User |
Action |
Args |
2012-02-21 23:51:29 | vstinner | set | recipients:
+ vstinner, pitrou, matejcik, eric.araujo, neologix, santoso.wijaya, rosslagerwall |
2012-02-21 23:51:29 | vstinner | set | messageid: <1329868289.43.0.901396663923.issue12801@psf.upfronthosting.co.za> |
2012-02-21 23:51:28 | vstinner | link | issue12801 messages |
2012-02-21 23:51:28 | vstinner | create | |
|