[pypy-svn] r38580 - in pypy/dist: lib-python/modified-2.4.1/test pypy/module/unicodedata pypy/module/unicodedata/test pypy/objspace/std pypy/rlib/rsre/test
ac at codespeak.net
ac at codespeak.net
Mon Feb 12 17:01:15 CET 2007
Author: ac
Date: Mon Feb 12 17:01:15 2007
New Revision: 38580
Added:
pypy/dist/lib-python/modified-2.4.1/test/test_unicodedata.py
- copied, changed from r38555, pypy/dist/lib-python/2.4.1/test/test_unicodedata.py
Modified:
pypy/dist/pypy/module/unicodedata/__init__.py
pypy/dist/pypy/module/unicodedata/interp_ucd.py
pypy/dist/pypy/module/unicodedata/test/test_unicodedata.py
pypy/dist/pypy/objspace/std/unicodeobject.py
pypy/dist/pypy/rlib/rsre/test/test_rsre.py
Log:
Use Unicode database version 3.2.0 to match Python 2.4
Fix test to account for PyPy being more correct than Python.
Modified: pypy/dist/pypy/module/unicodedata/__init__.py
==============================================================================
--- pypy/dist/pypy/module/unicodedata/__init__.py (original)
+++ pypy/dist/pypy/module/unicodedata/__init__.py Mon Feb 12 17:01:15 2007
@@ -6,8 +6,8 @@
interpleveldefs = {
'unidata_version' : 'space.wrap(interp_ucd.ucd.version)',
'ucd_3_2_0' : 'space.wrap(interp_ucd.ucd_3_2_0)',
- 'ucd_4_1_0' : 'space.wrap(interp_ucd.ucd_4_1_0)',
- 'ucd_5_0_0' : 'space.wrap(interp_ucd.ucd_5_0_0)',
+ #'ucd_4_1_0' : 'space.wrap(interp_ucd.ucd_4_1_0)',
+ #'ucd_5_0_0' : 'space.wrap(interp_ucd.ucd_5_0_0)',
'ucd' : 'space.wrap(interp_ucd.ucd)',
'__doc__' : "space.wrap('unicode character database')",
}
Modified: pypy/dist/pypy/module/unicodedata/interp_ucd.py
==============================================================================
--- pypy/dist/pypy/module/unicodedata/interp_ucd.py (original)
+++ pypy/dist/pypy/module/unicodedata/interp_ucd.py Mon Feb 12 17:01:15 2007
@@ -289,5 +289,5 @@
ucd_3_2_0 = UCD(unicodedb_3_2_0)
ucd_4_1_0 = UCD(unicodedb_4_1_0)
ucd_5_0_0 = UCD(unicodedb_5_0_0)
-ucd = ucd_4_1_0
+ucd = ucd_3_2_0
Modified: pypy/dist/pypy/module/unicodedata/test/test_unicodedata.py
==============================================================================
--- pypy/dist/pypy/module/unicodedata/test/test_unicodedata.py (original)
+++ pypy/dist/pypy/module/unicodedata/test/test_unicodedata.py Mon Feb 12 17:01:15 2007
@@ -50,9 +50,13 @@
if sys.maxunicode < 0x10ffff:
skip("requires a 'wide' python build.")
import unicodedata
- for first, last in ((0x3400, 0x4DB5),
- (0x4E00, 0x9FBB),
- (0x20000, 0x2A6D6)):
+ cases = ((0x3400, 0x4DB5),
+ (0x4E00, 0x9FA5))
+ if unicodedata.unidata_version >= "4.1":
+ cases = ((0x3400, 0x4DB5),
+ (0x4E00, 0x9FBB),
+ (0x20000, 0x2A6D6))
+ for first, last in cases:
# Test at and inside the boundary
for i in (first, first + 1, last - 1, last):
charname = 'CJK UNIFIED IDEOGRAPH-%X'%i
Modified: pypy/dist/pypy/objspace/std/unicodeobject.py
==============================================================================
--- pypy/dist/pypy/objspace/std/unicodeobject.py (original)
+++ pypy/dist/pypy/objspace/std/unicodeobject.py Mon Feb 12 17:01:15 2007
@@ -4,7 +4,7 @@
from pypy.objspace.std.noneobject import W_NoneObject
from pypy.objspace.std.sliceobject import W_SliceObject
from pypy.rlib.rarithmetic import intmask, ovfcheck
-from pypy.module.unicodedata import unicodedb_4_1_0 as unicodedb
+from pypy.module.unicodedata import unicodedb_3_2_0 as unicodedb
class W_UnicodeObject(W_Object):
from pypy.objspace.std.unicodetype import unicode_typedef as typedef
Modified: pypy/dist/pypy/rlib/rsre/test/test_rsre.py
==============================================================================
--- pypy/dist/pypy/rlib/rsre/test/test_rsre.py (original)
+++ pypy/dist/pypy/rlib/rsre/test/test_rsre.py Mon Feb 12 17:01:15 2007
@@ -6,8 +6,8 @@
from pypy.rlib.rsre import rsre_char
isre = SimpleStringState.rsre_core
-from pypy.module.unicodedata import unicodedb_4_1_0
-set_unicode_db(unicodedb_4_1_0)
+from pypy.module.unicodedata import unicodedb_3_2_0
+set_unicode_db(unicodedb_3_2_0)
EM_SPACE = u"\u2001"
INDIAN_DIGIT = u"\u0966"
More information about the Pypy-commit
mailing list