[Python-checkins] r71950 - in python/branches/release30-maint: Lib/test/test_unicodedata.py Misc/NEWS Objects/unicodectype.c
martin.v.loewis
python-checkins at python.org
Sun Apr 26 03:04:33 CEST 2009
Author: martin.v.loewis
Date: Sun Apr 26 03:04:33 2009
New Revision: 71950
Log:
Merged revisions 71949 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r71949 | martin.v.loewis | 2009-04-26 03:02:07 +0200 (So, 26 Apr 2009) | 10 lines
Merged revisions 71947 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r71947 | martin.v.loewis | 2009-04-26 02:53:18 +0200 (So, 26 Apr 2009) | 3 lines
Issue #4971: Fix titlecase for characters that are their own
titlecase, but not their own uppercase.
........
................
Modified:
python/branches/release30-maint/ (props changed)
python/branches/release30-maint/Lib/test/test_unicodedata.py
python/branches/release30-maint/Misc/NEWS
python/branches/release30-maint/Objects/unicodectype.c
Modified: python/branches/release30-maint/Lib/test/test_unicodedata.py
==============================================================================
--- python/branches/release30-maint/Lib/test/test_unicodedata.py (original)
+++ python/branches/release30-maint/Lib/test/test_unicodedata.py Sun Apr 26 03:04:33 2009
@@ -20,7 +20,7 @@
class UnicodeMethodsTest(unittest.TestCase):
# update this, if the database changes
- expectedchecksum = 'b7db9b5f1d804976fa921d2009cbef6f025620c1'
+ expectedchecksum = '6ec65b65835614ec00634c674bba0e50cd32c189'
def test_method_checksum(self):
h = hashlib.sha1()
@@ -271,6 +271,11 @@
[0]
)
+ def test_buf_4971(self):
+ # LETTER DZ WITH CARON: DZ, Dz, dz
+ self.assertEqual("\u01c4".title(), "\u01c5")
+ self.assertEqual("\u01c5".title(), "\u01c5")
+ self.assertEqual("\u01c6".title(), "\u01c5")
def test_main():
test.support.run_unittest(
Modified: python/branches/release30-maint/Misc/NEWS
==============================================================================
--- python/branches/release30-maint/Misc/NEWS (original)
+++ python/branches/release30-maint/Misc/NEWS Sun Apr 26 03:04:33 2009
@@ -12,6 +12,9 @@
Core and Builtins
-----------------
+- Issue #4971: Fix titlecase for characters that are their own
+ titlecase, but not their own uppercase.
+
- Issue #5829: complex('1e-500') no longer raises an exception
- Issue #5604: non-ASCII characters in module name passed to
Modified: python/branches/release30-maint/Objects/unicodectype.c
==============================================================================
--- python/branches/release30-maint/Objects/unicodectype.c (original)
+++ python/branches/release30-maint/Objects/unicodectype.c Sun Apr 26 03:04:33 2009
@@ -79,12 +79,7 @@
Py_UNICODE _PyUnicode_ToTitlecase(register Py_UNICODE ch)
{
const _PyUnicode_TypeRecord *ctype = gettyperecord(ch);
- int delta;
-
- if (ctype->title)
- delta = ctype->title;
- else
- delta = ctype->upper;
+ int delta = ctype->title;
if (ctype->flags & NODELTA_MASK)
return delta;
More information about the Python-checkins
mailing list