[issue20589] pathlib.owner() and pathlib.group() raise ImportError on Windows

2016-03-11 Thread Berker Peksag
Berker Peksag added the comment: Thanks Victor. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs

[issue20589] pathlib.owner() and pathlib.group() raise ImportError on Windows

2016-03-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 64d45f3d0978 by Victor Stinner in branch '3.5': Issue #20589: Fix test_pathlib https://hg.python.org/cpython/rev/64d45f3d0978 -- ___ Python tracker ___

[issue20589] pathlib.owner() and pathlib.group() raise ImportError on Windows

2016-03-11 Thread STINNER Victor
STINNER Victor added the comment: Tests fail... http://buildbot.python.org/all/builders/x86-64 Ubuntu 15.10 Skylake CPU 3.5/builds/276/ == ERROR: test_group (test.test_pathlib.PureWindowsPathTest) --

[issue20589] pathlib.owner() and pathlib.group() raise ImportError on Windows

2016-03-11 Thread Berker Peksag
Berker Peksag added the comment: I've changed the exception to raise NotImplementedError. I'm not sure about using the ctypes solution in the stdlib. Perhaps we should wrap Windows GetSecurity* APIs (similar to what we did for UNIX/POSIX APIs) first then we can use it in pathlib. -- n

[issue20589] pathlib.owner() and pathlib.group() raise ImportError on Windows

2016-03-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8ac695499fa3 by Berker Peksag in branch '3.5': Issue #20589: Invoking Path.owner() and Path.group() on Windows now raise https://hg.python.org/cpython/rev/8ac695499fa3 New changeset 1602fa504e72 by Berker Peksag in branch 'default': Issue #20589: In

[issue20589] pathlib.owner() and pathlib.group() raise ImportError on Windows

2015-02-19 Thread Mark Lawrence
Mark Lawrence added the comment: Just to note that 3.5 still raises ImportError rather than NotImplementedError although the latter is the consensus here. -- nosy: +BreamoreBoy ___ Python tracker _

[issue20589] pathlib.owner() and pathlib.group() raise ImportError on Windows

2014-02-11 Thread James Skinner
James Skinner added the comment: Ok, I'm not sure when I got the idea they should return ids instead of the names :) But raising NotImplementedError is certainly an improvement on ImportError. As to implementing it on Windows, the answer by eryksun on this page works without requiring anythin

[issue20589] pathlib.owner() and pathlib.group() raise ImportError on Windows

2014-02-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: But owner() and group() don't return the uid or gid: they return the *name* of the owner or group (respectively). If you want the uid (resp. gid), just use st_uid (resp. st_gid) as shown in your example. Under Unix: >>> p = Path('setup.py') >>> p.owner() 'ant

[issue20589] pathlib.owner() and pathlib.group() raise ImportError on Windows

2014-02-10 Thread Vajrasky Kok
Changes by Vajrasky Kok : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue20589] pathlib.owner() and pathlib.group() raise ImportError on Windows

2014-02-10 Thread James Skinner
New submission from James Skinner: When using the Path class in Lib/pathlib.py under Windows, calling p.owner() or p.group() fails with an ImportError due to importing the pwd and grp modules respectively, as neither of those exist. The documentation doesn't mention this behaviour. The preced