[issue5985] Implement os.path.samefile and os.path.sameopenfile on Windows

2010-09-09 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Both os.path.samefile and os.path.sameopenfile are now in py3k. And release27-maint is in feature freeze, so I think this issue should be closed. # Implemented on os.path.samefile: #1578269 os.path.sameopenfile: #7566 -- resolution: -> out of date

[issue5985] Implement os.path.samefile and os.path.sameopenfile on Windows

2009-12-05 Thread Andrew Svetlov
Andrew Svetlov added the comment: Please note: patch for http://bugs.python.org/issue1578269 is already has implementation for samefile. It's easer to add sameopenfile is same way than maintain two different approaches. Unfortunately solution will work only starting from Windows Vista and Wi

[issue5985] Implement os.path.samefile and os.path.sameopenfile on Windows

2009-12-03 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: -tjreedy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue5985] Implement os.path.samefile and os.path.sameopenfile on Windows

2009-12-03 Thread Erik Carstensen
Erik Carstensen added the comment: > Once I considered this approach, but problems was that > nFileIndexLow/High can change every time file handle is opened, so it's > not unique. See remarks in following page. > http://msdn.microsoft.com/en-us/library/aa363788%28VS.85%29.aspx Actually, that pa

[issue5985] Implement os.path.samefile and os.path.sameopenfile on Windows

2009-10-14 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I'm not sure about this neither. So, XXX is in comment. ;-) On abspath() above, it also tries to import native method _getfullpathname(), and when it fails alternative implementation runs. (probably when someone calls ntpath.abspath from linux or somewhere..

[issue5985] Implement os.path.samefile and os.path.sameopenfile on Windows

2009-10-14 Thread Erik Carstensen
Erik Carstensen added the comment: > Once I considered this approach, but problems was that > nFileIndexLow/High can change every time file handle is opened, so > it's not unique. Ah, I see, then your approach makes sense. There's another part of your patch that I don't understand: +except Im

[issue5985] Implement os.path.samefile and os.path.sameopenfile on Windows

2009-10-14 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: > extend stat/fstat on Windows to set st_dev and st_ino to sensible > values (based on dwVolumeSerialNumber and nFileIndexLow/High) Once I considered this approach, but problems was that nFileIndexLow/High can change every time file handle is opened, so it's

[issue5985] Implement os.path.samefile and os.path.sameopenfile on Windows

2009-10-14 Thread Erik Sandberg
Erik Sandberg added the comment: An alternative solution which I would have considered, is to extend stat/fstat on Windows to set st_dev and st_ino to sensible values (based on dwVolumeSerialNumber and nFileIndexLow/High), and then use the POSIX implementations of samefile/sameopenfile. There m

[issue5985] Implement os.path.samefile and os.path.sameopenfile on Windows

2009-10-14 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Here is my experimental patch. -- keywords: +patch nosy: +ocean-city Added file: http://bugs.python.org/file15122/samefile.patch ___ Python tracker _

[issue5985] Implement os.path.samefile and os.path.sameopenfile on Windows

2009-05-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: At this point, 2.7/3.2 are the only targets for new features. -- nosy: +tjreedy versions: -Python 2.5, Python 2.6, Python 3.0, Python 3.1 ___ Python tracker __

[issue5985] Implement os.path.samefile and os.path.sameopenfile on Windows

2009-05-10 Thread Erik Sandberg
New submission from Erik Sandberg : It would be nice if samefile / sameopenfile was present on Windows. Right now I usually work around this by keeping a platform-specific hack for Windows that approximates samefile by comparing normalized paths; this is ugly and doesn't handle junctions correctl