Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
04d42297
Commit
04d42297
authored
Mar 11, 2016
by
Berker Peksag
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #20589: Invoking Path.owner() and Path.group() on Windows now raise
NotImplementedError instead of ImportError.
parent
ca0250a8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
0 deletions
+18
-0
Lib/pathlib.py
Lib/pathlib.py
+6
-0
Lib/test/test_pathlib.py
Lib/test/test_pathlib.py
+9
-0
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Lib/pathlib.py
View file @
04d42297
...
...
@@ -1425,3 +1425,9 @@ class PosixPath(Path, PurePosixPath):
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"
)
Lib/test/test_pathlib.py
View file @
04d42297
...
...
@@ -1156,6 +1156,15 @@ class PureWindowsPathTest(_BasePurePathTest, unittest.TestCase):
# 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
...
...
Misc/NEWS
View file @
04d42297
...
...
@@ -91,6 +91,9 @@ Core and Builtins
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 #15068: Got rid of excessive buffering in the fileinput module.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment