Author: Amaury Forgeot d'Arc <[email protected]>
Branch: py3.6
Changeset: r93627:c06ae9f3ddac
Date: 2018-01-04 17:58 +0100
http://bitbucket.org/pypy/pypy/changeset/c06ae9f3ddac/
Log: Upgrade pypy3.6 to UnicodeData 9.0.0
diff --git a/pypy/module/unicodedata/__init__.py
b/pypy/module/unicodedata/__init__.py
--- a/pypy/module/unicodedata/__init__.py
+++ b/pypy/module/unicodedata/__init__.py
@@ -15,7 +15,7 @@
interpleveldefs = {
'unidata_version' : 'space.wrap(interp_ucd.ucd.version)',
'ucd_3_2_0' : 'space.wrap(interp_ucd.ucd_3_2_0)',
- 'ucd_8_0_0' : 'space.wrap(interp_ucd.ucd_8_0_0)',
+ 'ucd_9_0_0' : 'space.wrap(interp_ucd.ucd_9_0_0)',
'ucd' : 'space.wrap(interp_ucd.ucd)',
'__doc__' : "space.wrap('unicode character database')",
}
diff --git a/pypy/module/unicodedata/interp_ucd.py
b/pypy/module/unicodedata/interp_ucd.py
--- a/pypy/module/unicodedata/interp_ucd.py
+++ b/pypy/module/unicodedata/interp_ucd.py
@@ -9,7 +9,7 @@
from rpython.rlib.rarithmetic import r_longlong
from rpython.rlib.objectmodel import we_are_translated
from rpython.rlib.runicode import MAXUNICODE
-from rpython.rlib.unicodedata import unicodedb_8_0_0, unicodedb_3_2_0
+from rpython.rlib.unicodedata import unicodedb_9_0_0, unicodedb_3_2_0
from rpython.rlib.runicode import code_to_unichr, ord_accepts_surrogate
import sys
@@ -337,5 +337,5 @@
**methods)
ucd_3_2_0 = UCD(unicodedb_3_2_0)
-ucd_8_0_0 = UCD(unicodedb_8_0_0)
-ucd = ucd_8_0_0
+ucd_9_0_0 = UCD(unicodedb_9_0_0)
+ucd = ucd_9_0_0
diff --git a/pypy/module/unicodedata/test/test_unicodedata.py
b/pypy/module/unicodedata/test/test_unicodedata.py
--- a/pypy/module/unicodedata/test/test_unicodedata.py
+++ b/pypy/module/unicodedata/test/test_unicodedata.py
@@ -153,3 +153,9 @@
for cp in range(0xf0000, 0xf0300, 7):
exc = raises(ValueError, unicodedata.name, chr(cp))
assert str(exc.value) == 'no such name'
+
+ def test_east_asian_width_9_0_changes(self):
+ import unicodedata
+ assert unicodedata.ucd_3_2_0.east_asian_width('\u231a') == 'N'
+ assert unicodedata.ucd.east_asian_width('\u231a') == 'W'
+
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit