8000 Update to Unicode 13.0; build wheels for Python 3.8 (#35) · fonttools/unicodedata2@0339410 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0339410

Browse files
authored
Update to Unicode 13.0; build wheels for Python 3.8 (#35)
* Clean up and reduce visual clutter in the makeunicodedata scripts python/cpython#7558 commit faa2948654d15a859bc4317e00730ff213295764 Author: Stefan Behnel <stefan_ml@behnel.de> Date: Sat Jun 1 21:49:03 2019 +0200 Clean up and reduce visual clutter in the makeunicode.py script. (GH-7558) * bpo-37760: Factor out the basic UCD parsing logic of makeunicodedata. (GH-15130) python/cpython#15130 commit ef2af1ad44be0542a47270d5173a0b920c3a450d Author: Greg Price <gnprice@gmail.com> Date: Mon Aug 12 22:20:56 2019 -0700 bpo-37760: Factor out the basic UCD parsing logic of makeunicodedata. (GH-15130) There were 10 copies of this, and almost as many distinct versions of exactly how it was written. They're all implementing the same standard. Pull them out to the top, so the more interesting logic that remains becomes easier to read. ~~~ I removed the type hints from UcdFile class to apply the same patch to both python 2 and 3 * bpo-37760: Constant-fold some old options in makeunicodedata. (GH-15129) python/cpython#15129 commit 99d208efed97e02d813e8166925b998bbd0d3993 (HEAD) Author: Greg Price <gnprice@gmail.com> Date: Mon Aug 12 22:59:30 2019 -0700 bpo-37760: Constant-fold some old options in makeunicodedata. (GH-15129) The `expand` option was introduced in 2000 in commit fad27aee1. It appears to have been always set since it was committed, and what it does is tell the code to do something essential. So, just always do that, and cut the option. Also cut the `linebreakprops` option, which isn't consulted anymore. * bpo-37760: Factor out standard range-expanding logic in makeunicodedata. (GH-15248) python/cpython#15248 commit c03e698c344dfc557555b6b07a3ee2702e45f6ee (HEAD) Author: Greg Price <gnprice@gmail.com> Date: Tue Aug 13 19:28:38 2019 -0700 bpo-37760: Factor out standard range-expanding logic in makeunicodedata. (GH-15248) Much like the lower-level logic in commit ef2af1ad4, we had 4 copies of this logic, written in a couple of different ways. They're all implementing the same standard, so write it just once. * bpo-37760: Avoid cluttering work tree with downloaded Unicode files. (GH-15128) python/cpython#15128 commit 3e4498d35c34aeaf4a9c3d57509b0d3277048ac6 Author: Greg Price <gnprice@gmail.com> Date: Wed Aug 14 18:18:53 2019 -0700 bpo-37760: Avoid cluttering work tree with downloaded Unicode files. (GH-15128) * Convert from length-18 lists to namedtuple, in makeunicodedata. (GH-15265) Adapted from: python/cpython#15265 commit a65678c5c90002c5e40fa82746de07e6217df625 Author: Greg Price <gnprice@gmail.com> Date: Thu Sep 12 02:23:43 2019 -0700 bpo-37760: Convert from length-18 lists to a dataclass, in makeunicodedata. (GH-15265) Now the fields have names! Much easier to keep straight as a reader than the elements of an 18-tuple. Runs about 10-15% slower: from 10.8s to 12.3s, on my laptop. Fortunately that's perfectly fine for this maintenance script. ~~~ The original patch uses dataclasses but I use namedtuple here so that it works on both python 2 and 3. * closes bpo-39926: Update Unicode to 13.0.0. (GH-18910) Fixes #34 Adapted from: python/cpython#18910 commit 051b9d08d1e6a8b1022a2bd9166be51c0b152698 Author: Benjamin Peterson <benjamin@python.org> Date: Tue Mar 10 20:41:34 2020 -0700 closes bpo-39926: Update Unicode to 13.0.0. (GH-18910) * Update some www.unicode.org URLs to use HTTPS. (GH-18912) Adapted from: python/cpython#18912 commit 51796e5d2632e6ada81ca677b4153f4ccd490702 Author: Benjamin Peterson <benjamin@python.org> Date: Tue Mar 10 21:10:59 2020 -0700 Update some www.unicode.org URLs to use HTTPS. (GH-18912) * Update checksum test for Unicode 13; extend test to all of Unicode This commit combines the following two upstream patches: python/cpython#18913 commit c77aa2d60b420747886f4258cf159bdbb7354100 Author: Benjamin Peterson <benjamin@python.org> Date: Tue Mar 10 21:18:33 2020 -0700 bpo-39926: Update unicodedata checksum tests for Unicode 13.0 update. (GH-18913) I forget these tests required the cpu resource. python/cpython#15125 commit 6954be815a16fad11d1d66be576865bbbeb2b97d Author: Greg Price <gnprice@gmail.com> Date: Thu Sep 12 02:25:25 2019 -0700 closes bpo-37758: Extend unicodedata checksum tests to cover all of Unicode. (GH-15125) Unicode has grown since Python first gained support for it, when Unicode itself was still rather new. This pair of test cases was added in commit 6a20ee7de back in 2000, and they haven't needed to change much since then. But do change them to look beyond the Basic Multilingual Plane (range(0x10000)) and cover all 17 planes of Unicode's final form. This adds about 5 seconds to the test suite's runtime. Mark the tests as CPU-using accordingly. * test_unicodedata2: add unichr for 'narrow' python builds * Update multibuild to latest 'devel' branch * Build and run tests on Python 3.8 * .travis.yml: remove implicit job or else is rejected with "Build config did not create any jobs" travis-ci/travis-ci#8536 * test_unicodedata2: do not import test.support.requires_resource import fails for some reason on some older 2.7 versions, see https://travis-ci.org/github/mikekap/unicodedata2/jobs/663493029 It should not make any difference without this.
1 parent 5cc1db9 commit 0339410

18 files changed

+60558
-58416
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,6 @@ docs/_build/
5252

5353
# PyBuilder
5454
target/
55+
56+
# Downloaded unicode files
57+
data/

.travis.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,11 @@ env:
1414
language: python
1515
# The travis Python version is unrelated to the version we build and test
1616
# with. This is set with the MB_PYTHON_VERSION variable.
17-
python: 3.5
18-
sudo: required
19-
dist: trusty
17+
python: 3.7
18+
dist: xenial
2019
services: docker
2120

2221
matrix:
23-
exclude:
24-
# Exclude the default Python 3.5 build
25-
- python: 3.5
2622
include:
2723
- os: linux
2824
env: MB_PYTHON_VERSION=2.7
@@ -57,6 +53,9 @@ matrix:
5753
- os: linux
5854
env:
5955
- MB_PYTHON_VERSION=3.7
56+
- os: linux
57+
env:
58+
- MB_PYTHON_VERSION=3.8
6059
- os: linux
6160
env:
6261
- MB_PYTHON_VERSION=3.7
@@ -77,6 +76,10 @@ matrix:
7776
language: generic
7877
env:
7978
- MB_PYTHON_VERSION=3.7
79+
- os: osx
80+
language: generic
81+
env:
82+
- MB_PYTHON_VERSION=3.8
8083

8184
before_install:
8285
- source multibuild/common_utils.sh
@@ -101,4 +104,4 @@ after_success:
101104
python setup.py --quiet sdist --dist-dir dist
102105
twine upload dist/*.tar.gz
103106
fi
104-
fi
107+
fi

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
## 13.0.0
2+
- Upgrade to Unicode 13.0.0
13

24
## 12.1.0
35
- Upgrade to Unicode 12.1.0

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ unicodedata2
55

66
[unicodedata] backport/updates to Python 3 and Python 2.
77

8-
The versions of this package match Unicode versions, so unicodedata2==12.1.0 is data from Unicode 12.1.0.
8+
The versions of this package match Unicode versions, so unicodedata2==13.0.0 is data from Unicode 13.0.0.
99
Additionally this backports support for named aliases and named sequences to Python 2.
1010

1111
Pre-compiled wheel packages are available on [PyPI] and can be installed via pip.

appveyor.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@ environment:
3333
PYTHON_VERSION: "3.7.x"
3434
PYTHON_ARCH: "64"
3535

36+
- PYTHON: "C:\\Python38"
37+
PYTHON_VERSION: "3.8.x"
38+
PYTHON_ARCH: "32"
39+
40+
- PYTHON: "C:\\Python38-x64"
41+
PYTHON_VERSION: "3.8.x"
42+
PYTHON_ARCH: "64"
43+
3644
matrix:
3745
fast_finish: true
3846

0 commit comments

Comments
 (0)
0