File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1425,3 +1425,9 @@ class PosixPath(Path, PurePosixPath):
14251425
14261426class WindowsPath (Path , PureWindowsPath ):
14271427 __slots__ = ()
1428+
1429+ def owner (self ):
1430+ raise NotImplementedError ("Path.owner() is unsupported on this system" )
1431+
1432+ def group (self ):
1433+ raise NotImplementedError ("Path.group() is unsupported on this system" )
Original file line number Diff line number Diff line change @@ -1156,6 +1156,15 @@ def test_is_reserved(self):
11561156 # UNC paths are never reserved
11571157 self .assertIs (False , P ('//my/share/nul/con/aux' ).is_reserved ())
11581158
1159+ def test_owner (self ):
1160+ P = self .cls
1161+ with self .assertRaises (NotImplementedError ):
1162+ P ('c:/' ).owner ()
1163+
1164+ def test_group (self ):
1165+ P = self .cls
1166+ with self .assertRaises (NotImplementedError ):
1167+ P ('c:/' ).group ()
11591168
11601169class PurePathTest (_BasePurePathTest , unittest .TestCase ):
11611170 cls = pathlib .PurePath
Original file line number Diff line number Diff line change @@ -201,6 +201,9 @@ Core and Builtins
201201Library
202202-------
203203
204+ - Issue #20589: Invoking Path.owner() and Path.group() on Windows now raise
205+ NotImplementedError instead of ImportError.
206+
204207- Issue #26177: Fixed the keys() method for Canvas and Scrollbar widgets.
205208
206209- Issue #21042: Make ctypes.util.find_library() return the full path on
You can’t perform that action at this time.
0 commit comments