[Python-checkins] cpython (3.3): Issue #19911: ntpath.splitdrive() now correctly processes the 'İ' character
serhiy.storchaka
python-checkins at python.org
Mon Dec 16 14:22:50 CET 2013
http://hg.python.org/cpython/rev/7b0d083082ea
changeset: 87987:7b0d083082ea
branch: 3.3
parent: 87973:6afad4f29249
user: Serhiy Storchaka <storchaka at gmail.com>
date: Mon Dec 16 14:34:55 2013 +0200
summary:
Issue #19911: ntpath.splitdrive() now correctly processes the 'İ' character
(U+0130, LATIN CAPITAL LETTER I WITH DOT ABOVE).
files:
Lib/ntpath.py | 2 +-
Lib/test/test_ntpath.py | 3 +++
Misc/NEWS | 3 +++
3 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/Lib/ntpath.py b/Lib/ntpath.py
--- a/Lib/ntpath.py
+++ b/Lib/ntpath.py
@@ -207,7 +207,7 @@
empty = _get_empty(p)
if len(p) > 1:
sep = _get_sep(p)
- normp = normcase(p)
+ normp = p.replace(_get_altsep(p), sep)
if (normp[0:2] == sep*2) and (normp[2:3] != sep):
# is a UNC path:
# vvvvvvvvvvvvvvvvvvvv drive letter or UNC path
diff --git a/Lib/test/test_ntpath.py b/Lib/test/test_ntpath.py
--- a/Lib/test/test_ntpath.py
+++ b/Lib/test/test_ntpath.py
@@ -66,6 +66,9 @@
('', '\\\\conky\\\\mountpoint\\foo\\bar'))
tester('ntpath.splitdrive("//conky//mountpoint/foo/bar")',
('', '//conky//mountpoint/foo/bar'))
+ # Issue #19911: UNC part containing U+0130
+ self.assertEqual(ntpath.splitdrive('//conky/MOUNTPOİNT/foo/bar'),
+ ('//conky/MOUNTPOİNT', '/foo/bar'))
def test_split(self):
tester('ntpath.split("c:\\foo\\bar")', ('c:\\foo', 'bar'))
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -29,6 +29,9 @@
Library
-------
+- Issue #19911: ntpath.splitdrive() now correctly processes the 'İ' character
+ (U+0130, LATIN CAPITAL LETTER I WITH DOT ABOVE).
+
- Issue #19532: python -m compileall with no filename/directory arguments now
respects the -f and -q flags instead of ignoring them.
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list