Author: Carl Friedrich Bolz-Tereick <[email protected]>
Branch: py3.7
Changeset: r98475:6fc65fdb504c
Date: 2020-01-06 23:10 +0100
http://bitbucket.org/pypy/pypy/changeset/6fc65fdb504c/
Log: switch to unicode version 11
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
@@ -7,7 +7,7 @@
from pypy.interpreter.error import OperationError, oefmt
from pypy.interpreter.typedef import TypeDef, interp_attrproperty
from rpython.rlib.rarithmetic import r_longlong, r_uint
-from rpython.rlib.unicodedata import unicodedb_9_0_0, unicodedb_3_2_0
+from rpython.rlib.unicodedata import unicodedb_11_0_0, unicodedb_3_2_0
from rpython.rlib.rutf8 import Utf8StringBuilder, unichr_as_utf8
@@ -308,8 +308,8 @@
**methods)
ucd_3_2_0 = UCD(unicodedb_3_2_0)
-ucd_9_0_0 = UCD(unicodedb_9_0_0)
-ucd = ucd_9_0_0
+ucd_11_0_0 = UCD(unicodedb_11_0_0)
+ucd = ucd_11_0_0
# This is the default unicodedb used in various places:
# - the unicode type
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
@@ -46,10 +46,10 @@
def test_cjk(self):
import sys
import unicodedata
- assert unicodedata.unidata_version >= "8"
+ assert int(unicodedata.unidata_version.split(".")[0]) >= 8
cases = [
('3400', '4DB5'),
- ('4E00', '9FD5'),
+ ('4E00', '9FEF'),
('20000', '2A6D6'),
('2A700', '2B734'),
('2B740', '2B81D'),
@@ -157,5 +157,8 @@
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'
+ assert unicodedata.east_asian_width('\u231a') == 'W'
+ def test_11_change(self):
+ import unicodedata
+ assert unicodedata.name(chr(0x1f9b9)) == "SUPERVILLAIN"
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit