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
1d922d0c
Commit
1d922d0c
authored
Nov 19, 2014
by
Antoine Pitrou
Browse files
Options
Browse Files
Download
Plain Diff
Close #22370: Windows detection in pathlib is now more robust.
parents
28c295f4
db118f5d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
Lib/pathlib.py
Lib/pathlib.py
+4
-5
Misc/NEWS
Misc/NEWS
+2
-0
No files found.
Lib/pathlib.py
View file @
1d922d0c
...
...
@@ -15,16 +15,15 @@ from urllib.parse import quote_from_bytes as urlquote_from_bytes
supports_symlinks
=
True
try
:
if
os
.
name
==
'nt'
:
import
nt
except
ImportError
:
nt
=
None
else
:
if
sys
.
getwindowsversion
()[:
2
]
>=
(
6
,
0
):
from
nt
import
_getfinalpathname
else
:
supports_symlinks
=
False
_getfinalpathname
=
None
else
:
nt
=
None
__all__
=
[
...
...
@@ -110,7 +109,7 @@ class _WindowsFlavour(_Flavour):
has_drv
=
True
pathmod
=
ntpath
is_supported
=
(
nt
is
not
None
)
is_supported
=
(
os
.
name
==
'nt'
)
drive_letters
=
(
set
(
chr
(
x
)
for
x
in
range
(
ord
(
'a'
),
ord
(
'z'
)
+
1
))
|
...
...
Misc/NEWS
View file @
1d922d0c
...
...
@@ -185,6 +185,8 @@ Core and Builtins
Library
-------
-
Issue
#
22370
:
Windows
detection
in
pathlib
is
now
more
robust
.
-
Issue
#
22841
:
Reject
coroutines
in
asyncio
add_signal_handler
().
Patch
by
Ludovic
.
Gasc
.
...
...
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