Commit 04d42297 authored by Berker Peksag's avatar Berker Peksag

Issue #20589: Invoking Path.owner() and Path.group() on Windows now raise

NotImplementedError instead of ImportError.
parent ca0250a8
...@@ -1425,3 +1425,9 @@ class PosixPath(Path, PurePosixPath): ...@@ -1425,3 +1425,9 @@ class PosixPath(Path, PurePosixPath):
class WindowsPath(Path, PureWindowsPath): class WindowsPath(Path, PureWindowsPath):
__slots__ = () __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")
...@@ -1156,6 +1156,15 @@ class PureWindowsPathTest(_BasePurePathTest, unittest.TestCase): ...@@ -1156,6 +1156,15 @@ class PureWindowsPathTest(_BasePurePathTest, unittest.TestCase):
# UNC paths are never reserved # UNC paths are never reserved
self.assertIs(False, P('//my/share/nul/con/aux').is_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): class PurePathTest(_BasePurePathTest, unittest.TestCase):
cls = pathlib.PurePath cls = pathlib.PurePath
......
...@@ -91,6 +91,9 @@ Core and Builtins ...@@ -91,6 +91,9 @@ Core and Builtins
Library 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 #26177: Fixed the keys() method for Canvas and Scrollbar widgets.
- Issue #15068: Got rid of excessive buffering in the fileinput module. - Issue #15068: Got rid of excessive buffering in the fileinput module.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment