changeset: 100490:1602fa504e72 parent: 100488:de66a88e4132 parent: 100489:8ac695499fa3 user: Berker Peksag date: Fri Mar 11 23:08:11 2016 +0200 files: Lib/test/test_pathlib.py Misc/NEWS description: Issue #20589: Invoking Path.owner() and Path.group() on Windows now raise NotImplementedError instead of ImportError. diff -r de66a88e4132 -r 1602fa504e72 Lib/pathlib.py --- a/Lib/pathlib.py Fri Mar 11 15:31:02 2016 -0500 +++ b/Lib/pathlib.py Fri Mar 11 23:08:11 2016 +0200 @@ -1425,3 +1425,9 @@ class WindowsPath(Path, PureWindowsPath): __slots__ = () + + def owner(self): + raise NotImplementedError("Path.owner() is unsupported on this system") + + def group(self): + raise NotImplementedError("Path.group() is unsupported on this system") diff -r de66a88e4132 -r 1602fa504e72 Lib/test/test_pathlib.py --- a/Lib/test/test_pathlib.py Fri Mar 11 15:31:02 2016 -0500 +++ b/Lib/test/test_pathlib.py Fri Mar 11 23:08:11 2016 +0200 @@ -1156,6 +1156,15 @@ # UNC paths are never reserved self.assertIs(False, P('//my/share/nul/con/aux').is_reserved()) + def test_owner(self): + P = self.cls + with self.assertRaises(NotImplementedError): + P('c:/').owner() + + def test_group(self): + P = self.cls + with self.assertRaises(NotImplementedError): + P('c:/').group() class PurePathTest(_BasePurePathTest, unittest.TestCase): cls = pathlib.PurePath diff -r de66a88e4132 -r 1602fa504e72 Misc/NEWS --- a/Misc/NEWS Fri Mar 11 15:31:02 2016 -0500 +++ b/Misc/NEWS Fri Mar 11 23:08:11 2016 +0200 @@ -201,6 +201,9 @@ Library ------- +- Issue #20589: Invoking Path.owner() and Path.group() on Windows now raise + NotImplementedError instead of ImportError. + - Issue #26177: Fixed the keys() method for Canvas and Scrollbar widgets. - Issue #21042: Make ctypes.util.find_library() return the full path on