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 neologix
Recipients eric.araujo, neologix, pitrou, rosslagerwall, vstinner
Date 2011-08-24.20:11:58
SpamBayes Score 1.3066215e-12
Marked as misclassified No
Message-id <1314216719.12.0.736879801191.issue12801@psf.upfronthosting.co.za>
In-reply-to
Content
> 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...
History
Date User Action Args
2011-08-24 20:11:59neologixsetrecipients: + neologix, pitrou, vstinner, eric.araujo, rosslagerwall
2011-08-24 20:11:59neologixsetmessageid: <1314216719.12.0.736879801191.issue12801@psf.upfronthosting.co.za>
2011-08-24 20:11:58neologixlinkissue12801 messages
2011-08-24 20:11:58neologixcreate