Message142909
> It would probably be simpler, safer and more efficient to simply call
> the POSIX function instead (but it most be exposed somewhere, by
> posixmodule.c I suppose).
Indeed.
> Would it be a good idea to use the full docstring of posixpath.realpath
> to os.realpath and then just do “realpath = os.realpath” in posixpath?
Yes. That would also be a way to add the '.' default argument.
> An initial patch.
I'm actually concerned because realpath doesn't seem as portable as I first thought. Here's what my man page says:
"""
OSIX.1-2001 says that the behavior if resolved_path is NULL is implementation-defined. POSIX.1-2008 specifies the behavior described in this page.
"""
So I'm not sure that all implementations support passing a NULL buffer as argument.
Also:
"""
Solaris may return a relative pathname when the path argument is relative.
"""
Well, I guess we can also commit this patch and see if a buildbot breaks... |
|
Date |
User |
Action |
Args |
2011-08-24 20:11:59 | neologix | set | recipients:
+ neologix, pitrou, vstinner, eric.araujo, rosslagerwall |
2011-08-24 20:11:59 | neologix | set | messageid: <1314216719.12.0.736879801191.issue12801@psf.upfronthosting.co.za> |
2011-08-24 20:11:58 | neologix | link | issue12801 messages |
2011-08-24 20:11:58 | neologix | create | |
|