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

2010-09-09 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp 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 --

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

2009-12-05 Thread Andrew Svetlov
Andrew Svetlov andrew.svet...@gmail.com 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

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

2009-12-03 Thread Erik Carstensen
Erik Carstensen sandb...@virtutech.com 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

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

2009-12-03 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- nosy: -tjreedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5985 ___ ___ Python-bugs-list mailing

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

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

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

2009-10-14 Thread Erik Sandberg
Erik Sandberg sandb...@virtutech.com 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

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

2009-10-14 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp 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

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

2009-10-14 Thread Erik Carstensen
Erik Carstensen sandb...@virtutech.com 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

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

2009-10-14 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp 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

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

2009-05-15 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu 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 rep...@bugs.python.org

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

2009-05-10 Thread Erik Sandberg
New submission from Erik Sandberg sandb...@virtutech.com: 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