closes bpo-39926: Update Unicode to 13.0.0. (GH-18910)

This commit is contained in:
Benjamin Peterson 2020-03-10 20:41:34 -07:00 committed by GitHub
parent 76d5877b72
commit 051b9d08d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 30363 additions and 29328 deletions

View File

@ -352,7 +352,7 @@ Notes:
The numeric literals accepted include the digits ``0`` to ``9`` or any The numeric literals accepted include the digits ``0`` to ``9`` or any
Unicode equivalent (code points with the ``Nd`` property). Unicode equivalent (code points with the ``Nd`` property).
See http://www.unicode.org/Public/12.1.0/ucd/extracted/DerivedNumericType.txt See http://www.unicode.org/Public/13.0.0/ucd/extracted/DerivedNumericType.txt
for a complete list of code points with the ``Nd`` property. for a complete list of code points with the ``Nd`` property.

View File

@ -17,8 +17,8 @@
This module provides access to the Unicode Character Database (UCD) which This module provides access to the Unicode Character Database (UCD) which
defines character properties for all Unicode characters. The data contained in defines character properties for all Unicode characters. The data contained in
this database is compiled from the `UCD version 12.1.0 this database is compiled from the `UCD version 13.0.0
<http://www.unicode.org/Public/12.1.0/ucd>`_. <http://www.unicode.org/Public/13.0.0/ucd>`_.
The module uses the same names and symbols as defined by Unicode The module uses the same names and symbols as defined by Unicode
Standard Annex #44, `"Unicode Character Database" Standard Annex #44, `"Unicode Character Database"
@ -175,6 +175,6 @@ Examples:
.. rubric:: Footnotes .. rubric:: Footnotes
.. [#] http://www.unicode.org/Public/12.1.0/ucd/NameAliases.txt .. [#] http://www.unicode.org/Public/13.0.0/ucd/NameAliases.txt
.. [#] http://www.unicode.org/Public/12.1.0/ucd/NamedSequences.txt .. [#] http://www.unicode.org/Public/13.0.0/ucd/NamedSequences.txt

View File

@ -316,7 +316,7 @@ The Unicode category codes mentioned above stand for:
* *Nd* - decimal numbers * *Nd* - decimal numbers
* *Pc* - connector punctuations * *Pc* - connector punctuations
* *Other_ID_Start* - explicit list of characters in `PropList.txt * *Other_ID_Start* - explicit list of characters in `PropList.txt
<http://www.unicode.org/Public/12.1.0/ucd/PropList.txt>`_ to support backwards <http://www.unicode.org/Public/13.0.0/ucd/PropList.txt>`_ to support backwards
compatibility compatibility
* *Other_ID_Continue* - likewise * *Other_ID_Continue* - likewise

View File

@ -372,6 +372,11 @@ types with context-specific metadata and new ``include_extras`` parameter to
:func:`typing.get_type_hints` to access the metadata at runtime. (Contributed :func:`typing.get_type_hints` to access the metadata at runtime. (Contributed
by Till Varoquaux and Konstantin Kashin.) by Till Varoquaux and Konstantin Kashin.)
unicodedata
-----------
The Unicode database has been updated to version 13.0.0. (:issue:`39926`).
venv venv
---- ----

View File

@ -99,6 +99,7 @@ class UnicodeNamesTest(unittest.TestCase):
self.checkletter("CJK UNIFIED IDEOGRAPH-2B734", "\U0002B734") self.checkletter("CJK UNIFIED IDEOGRAPH-2B734", "\U0002B734")
self.checkletter("CJK UNIFIED IDEOGRAPH-2B740", "\U0002B740") self.checkletter("CJK UNIFIED IDEOGRAPH-2B740", "\U0002B740")
self.checkletter("CJK UNIFIED IDEOGRAPH-2B81D", "\U0002B81D") self.checkletter("CJK UNIFIED IDEOGRAPH-2B81D", "\U0002B81D")
self.checkletter("CJK UNIFIED IDEOGRAPH-3134A", "\U0003134A")
def test_bmp_characters(self): def test_bmp_characters(self):
for code in range(0x10000): for code in range(0x10000):

View File

@ -0,0 +1 @@
Update Unicode database to Unicode version 13.0.0.

View File

@ -1031,13 +1031,14 @@ static int
is_unified_ideograph(Py_UCS4 code) is_unified_ideograph(Py_UCS4 code)
{ {
return return
(0x3400 <= code && code <= 0x4DB5) || /* CJK Ideograph Extension A */ (0x3400 <= code && code <= 0x4DBF) || /* CJK Ideograph Extension A */
(0x4E00 <= code && code <= 0x9FEF) || /* CJK Ideograph */ (0x4E00 <= code && code <= 0x9FFC) || /* CJK Ideograph */
(0x20000 <= code && code <= 0x2A6D6) || /* CJK Ideograph Extension B */ (0x20000 <= code && code <= 0x2A6DD) || /* CJK Ideograph Extension B */
(0x2A700 <= code && code <= 0x2B734) || /* CJK Ideograph Extension C */ (0x2A700 <= code && code <= 0x2B734) || /* CJK Ideograph Extension C */
(0x2B740 <= code && code <= 0x2B81D) || /* CJK Ideograph Extension D */ (0x2B740 <= code && code <= 0x2B81D) || /* CJK Ideograph Extension D */
(0x2B820 <= code && code <= 0x2CEA1) || /* CJK Ideograph Extension E */ (0x2B820 <= code && code <= 0x2CEA1) || /* CJK Ideograph Extension E */
(0x2CEB0 <= code && code <= 0x2EBEF); /* CJK Ideograph Extension F */ (0x2CEB0 <= code && code <= 0x2EBE0) || /* CJK Ideograph Extension F */
(0x30000 <= code && code <= 0x3134A); /* CJK Ideograph Extension G */
} }
/* macros used to determine if the given code point is in the PUA range that /* macros used to determine if the given code point is in the PUA range that

5117
Modules/unicodedata_db.h generated

File diff suppressed because it is too large Load Diff

52962
Modules/unicodename_db.h generated

File diff suppressed because it is too large Load Diff

1575
Objects/unicodetype_db.h generated

File diff suppressed because it is too large Load Diff

View File

@ -44,7 +44,7 @@ VERSION = "3.3"
# * Doc/library/stdtypes.rst, and # * Doc/library/stdtypes.rst, and
# * Doc/library/unicodedata.rst # * Doc/library/unicodedata.rst
# * Doc/reference/lexical_analysis.rst (two occurrences) # * Doc/reference/lexical_analysis.rst (two occurrences)
UNIDATA_VERSION = "12.1.0" UNIDATA_VERSION = "13.0.0"
UNICODE_DATA = "UnicodeData%s.txt" UNICODE_DATA = "UnicodeData%s.txt"
COMPOSITION_EXCLUSIONS = "CompositionExclusions%s.txt" COMPOSITION_EXCLUSIONS = "CompositionExclusions%s.txt"
EASTASIAN_WIDTH = "EastAsianWidth%s.txt" EASTASIAN_WIDTH = "EastAsianWidth%s.txt"
@ -100,13 +100,14 @@ EXTENDED_CASE_MASK = 0x4000
# these ranges need to match unicodedata.c:is_unified_ideograph # these ranges need to match unicodedata.c:is_unified_ideograph
cjk_ranges = [ cjk_ranges = [
('3400', '4DB5'), ('3400', '4DBF'),
('4E00', '9FEF'), ('4E00', '9FFC'),
('20000', '2A6D6'), ('20000', '2A6DD'),
('2A700', '2B734'), ('2A700', '2B734'),
('2B740', '2B81D'), ('2B740', '2B81D'),
('2B820', '2CEA1'), ('2B820', '2CEA1'),
('2CEB0', '2EBE0'), ('2CEB0', '2EBE0'),
('30000', '3134A'),
] ]