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
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
Tim Golden added the comment:
Fixed. Thanks for the patch
--
resolution: - fixed
stage: needs patch - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9035
Changes by Tim Golden m...@timgolden.me.uk:
Removed file: http://bugs.python.org/file31092/issue9035.3.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9035
___
Changes by Tim Golden m...@timgolden.me.uk:
Removed file: http://bugs.python.org/file31087/issue9035.2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9035
___
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.
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
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
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
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
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 rep...@bugs.python.org
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 rep...@bugs.python.org
Changes by Atsuo Ishimoto ishim...@gembook.org:
--
nosy: +ishimoto
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9035
___
___
Python-bugs-list
Oren Held o...@held.org.il 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
Brian Curtin br...@python.org added the comment:
We can't depend on stuff from pywin32, but we could expose GetVolumePathName
ourselves.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9035
Mark Mc Mahon mtnbikingm...@gmail.com 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
Changes by Brian Curtin br...@python.org:
--
nosy: +brian.curtin
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9035
___
___
Python-bugs-list
Senthil Kumaran sent...@uthcode.com added the comment:
Sijin, please go ahead and submit a patch. No one is working on this at the
moment.
--
nosy: +markm
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9035
Changes by Sijin Joseph sijinjos...@gmail.com:
--
nosy: +sijinjoseph
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9035
___
___
Python-bugs-list
Sijin Joseph sijinjos...@gmail.com added the comment:
I'd like to add the win_ismount function mentioned by Tim. Is anyone else
working on this presently?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9035
Changes by Santoso Wijaya santoso.wij...@gmail.com:
--
nosy: +santa4nt
versions: +Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9035
___
Senthil Kumaran orsent...@gmail.com 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
Tim Golden m...@timgolden.me.uk 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
New submission from Oren Held o...@held.org.il:
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(rc:\mount1),
while c:\mount1 is a real mount point.
This
Tim Golden m...@timgolden.me.uk 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
Tim Golden m...@timgolden.me.uk 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
Tim Golden m...@timgolden.me.uk 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 rep...@bugs.python.org
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9035
___
___
28 matches
Mail list logo