[issue9035] os.path.ismount on windows doesn't support windows mount points

2013-08-01 Thread Tim Golden
Tim Golden added the comment: Fixed. Thanks for the patch -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker ___ _

[issue9035] os.path.ismount on windows doesn't support windows mount points

2013-08-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5258c4399f2e by Tim Golden in branch 'default': issue9035: Prevent Windows-specific tests from running on non-Windows platforms http://hg.python.org/cpython/rev/5258c4399f2e -- ___ Python tracker

[issue9035] os.path.ismount on windows doesn't support windows mount points

2013-08-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset f283589cb71e by Tim Golden in branch 'default': Issue #9035: os.path.ismount now recognises volumes mounted below http://hg.python.org/cpython/rev/f283589cb71e -- nosy: +python-dev ___ Python tracker

[issue9035] os.path.ismount on windows doesn't support windows mount points

2013-07-31 Thread Tim Golden
Tim Golden added the comment: 4th and hopefully final patch. Added tests for byte paths. Reworked the ismount so it uses the original detection approach first (which is wholly lexical) and drops back to the volume path technique only if the path doesn't appear to be a drive or a share root. Th

[issue9035] os.path.ismount on windows doesn't support windows mount points

2013-07-31 Thread Tim Golden
Changes by Tim Golden : Removed file: http://bugs.python.org/file31092/issue9035.3.patch ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue9035] os.path.ismount on windows doesn't support windows mount points

2013-07-31 Thread Tim Golden
Changes by Tim Golden : Removed file: http://bugs.python.org/file31087/issue9035.2.patch ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue9035] os.path.ismount on windows doesn't support windows mount points

2013-07-30 Thread Tim Golden
Tim Golden added the comment: issue9035.3.patch has switched to the new memory management API and has tweaked the tests slightly for robustness. This approach does introduce a behavioural change: the root of a SUBSTed drive (essentially a symlink into the Dos namespace) will raise an OSError

[issue9035] os.path.ismount on windows doesn't support windows mount points

2013-07-30 Thread Tim Golden
Tim Golden added the comment: issue9035.2.patch is an updated version of Atsuo's patch. Known issues: * I haven't reworked it for the new memory-management API * There's no test for a non-root mount point (which is really the basis for this issue). It's difficult to see how to do that in a ro

[issue9035] os.path.ismount on windows doesn't support windows mount points

2013-07-30 Thread Tim Golden
Tim Golden added the comment: I put a bit of work in on this this morning, following Mark's suggestion (msg138197) since that's the "canonical" approach. Unfortunately, it completely fails to work for the most common case: the root folder of a drive! The documentation for FindFirstFile explici

[issue9035] os.path.ismount on windows doesn't support windows mount points

2013-07-22 Thread Christian Tismer
Christian Tismer added the comment: Hi Tim, Yes, this would be great to get sorted out. Then we could make watchdog.py automatically configure itself for network mounts. Right now this makes no nense because of windows. cheers - chris -- nosy: +Christian.Tismer __

[issue9035] os.path.ismount on windows doesn't support windows mount points

2012-09-28 Thread Tim Golden
Tim Golden added the comment: Unfortunately this missed the boat for 3.3; I'll target 3.4 when we've got a branch to commit to. -- versions: +Python 3.4 -Python 3.2, Python 3.3 ___ Python tracker __

[issue9035] os.path.ismount on windows doesn't support windows mount points

2012-07-28 Thread Atsuo Ishimoto
Atsuo Ishimoto added the comment: Patch to expose GetVolumePathName() and implementation of ismount(). Tested on Windows7/XP. -- keywords: +patch Added file: http://bugs.python.org/file26558/issue9035.patch ___ Python tracker

[issue9035] os.path.ismount on windows doesn't support windows mount points

2012-07-27 Thread Atsuo Ishimoto
Changes by Atsuo Ishimoto : -- nosy: +ishimoto ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue9035] os.path.ismount on windows doesn't support windows mount points

2011-10-04 Thread Brian Curtin
Brian Curtin added the comment: We can't depend on stuff from pywin32, but we could expose GetVolumePathName ourselves. -- ___ Python tracker ___ ___

[issue9035] os.path.ismount on windows doesn't support windows mount points

2011-10-04 Thread Oren Held
Oren Held added the comment: Anything wrong with the following simple approach? (e.g. is it bad to depend on win32file?) def win_ismount(path): import win32file volume_path = win32file.GetVolumePathName(path) return volume_path == path # May have to ignore a trailing backslash -

[issue9035] os.path.ismount on windows doesn't support windows mount points

2011-06-11 Thread Brian Curtin
Changes by Brian Curtin : -- nosy: +brian.curtin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue9035] os.path.ismount on windows doesn't support windows mount points

2011-06-11 Thread Mark Mc Mahon
Mark Mc Mahon added the comment: I was looking at this - and see that (at least as far as GetFileAttributes is concerned) that a mount and a linked directory are seen the same... Here are some tests using ctypes # mounted drive >>> hex(windll.kernel32.GetFileAttributesW(ur"c:\temp\test_c_moun

[issue9035] os.path.ismount on windows doesn't support windows mount points

2011-04-28 Thread Senthil Kumaran
Senthil Kumaran added the comment: Sijin, please go ahead and submit a patch. No one is working on this at the moment. -- nosy: +markm ___ Python tracker ___ ___

[issue9035] os.path.ismount on windows doesn't support windows mount points

2011-04-25 Thread Santoso Wijaya
Changes by Santoso Wijaya : -- nosy: +santa4nt versions: +Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue9035] os.path.ismount on windows doesn't support windows mount points

2011-04-25 Thread Sijin Joseph
Sijin Joseph added the comment: I'd like to add the win_ismount function mentioned by Tim. Is anyone else working on this presently? -- ___ Python tracker ___ __

[issue9035] os.path.ismount on windows doesn't support windows mount points

2011-04-25 Thread Sijin Joseph
Changes by Sijin Joseph : -- nosy: +sijinjoseph ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue9035] os.path.ismount on windows doesn't support windows mount points

2010-06-22 Thread Tim Golden
Tim Golden added the comment: I think we're saying the same thing :) The simplest thing to do here is to create a win_ismount function in posixmodule.c which does the attributes / reparse tag dance and returns True/False and use that wherever it's needed to support this concept under Windows. T

[issue9035] os.path.ismount on windows doesn't support windows mount points

2010-06-22 Thread Senthil Kumaran
Senthil Kumaran added the comment: I see that ismount like function on windows is provide by the various Win32 extensions. If Windows supported is added to ismount function itself, then it might be a good idea to have attributes or list_attributes function as well. But for posix, how will it

[issue9035] os.path.ismount on windows doesn't support windows mount points

2010-06-20 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue9035] os.path.ismount on windows doesn't support windows mount points

2010-06-20 Thread Tim Golden
Tim Golden added the comment: ... of course you still need to get the reparse tag to determine whether this is a mount point so the file attributes alone in this case are not enough. -- ___ Python tracker

[issue9035] os.path.ismount on windows doesn't support windows mount points

2010-06-20 Thread Tim Golden
Tim Golden added the comment: All we need to do is check the FILE_ATTRIBUTE_REPARSE_POINT in the file attributes. Frustratingly, we grab file attributes a dozen times in posixpath.c only to throw most of it away. Is there a case for adding an "attributes" function to os.path which exposes the f

[issue9035] os.path.ismount on windows doesn't support windows mount points

2010-06-20 Thread Tim Golden
Tim Golden added the comment: Switching to Python 3.2 as this essentially constitutes a behaviour change and 2.6 is in bugfix mode and 2.7 is about to enter rc2. It would certainly be possible to use one of the volume APIs under the covers. Would you be willing to offer a patch to, say, posix

[issue9035] os.path.ismount on windows doesn't support windows mount points

2010-06-20 Thread Oren Held
New submission from Oren Held : On unices, ismount checks whether the given path is a mount point. On windows, it only checks whether it's a drive letter. Long story short, Python simply returns False when doing ismount(r"c:\mount1"), while c:\mount1 is a real mount point. This is relevant for