[Python-checkins] r84988 - in python/branches/py3k: Lib/ntpath.py Misc/NEWS

Brian Curtin brian.curtin at gmail.com
Fri Sep 24 01:53:15 CEST 2010


On Thu, Sep 23, 2010 at 17:30, Nick Coghlan <ncoghlan at gmail.com> wrote:

> On Fri, Sep 24, 2010 at 6:38 AM, brian.curtin
> <python-checkins at python.org> wrote:
> > Modified: python/branches/py3k/Lib/ntpath.py
> >
> ==============================================================================
> > --- python/branches/py3k/Lib/ntpath.py  (original)
> > +++ python/branches/py3k/Lib/ntpath.py  Thu Sep 23 22:38:14 2010
> > @@ -641,24 +641,29 @@
> >
> >
> >  # determine if two files are in fact the same file
> > +try:
> > +    from nt import _getfinalpathname
> > +except (NotImplementedError, ImportError):
> > +    # On Windows XP and earlier, two files are the same if their
> absolute
> > +    # pathnames are the same.
> > +    # Also, on other operating systems, fake this method with a
> > +    # Windows-XP approximation.
> > +    def _getfinalpathname(f):
> > +        return abspath(f)
>
> This only needs to catch ImportError now.
>
> Cheers,
> Nick.
>
> --
> Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
> _______________________________________________
> Python-checkins mailing list
> Python-checkins at python.org
> http://mail.python.org/mailman/listinfo/python-checkins
>

Good catch. I put up a patch on http://bugs.python.org/issue9790 to rework
this yet again. The NotImplementedError had to do with the underlying Win32
call only existing on Vista and above, and it was loaded at runtime. I added
another condition to the import dance which should have us covered.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-checkins/attachments/20100923/c8b0a635/attachment-0001.html>


More information about the Python-checkins mailing list