Skip to content

Commit

Permalink
Upgrade to Unicode 12.1.0 (#30)
Browse files Browse the repository at this point in the history
* Make unicodedata const

* Upgrade to Unicode 12.1.0

* Update multibuild

* Fix AppVeyor command

* Drop support for Python 3.4

Python 3.4 is past its end-of-life and is no longer supported by multibuild.
  • Loading branch information
Harmon758 authored and anthrotype committed Oct 17, 2019
1 parent 466b12c commit 4f5b7d6
Show file tree
Hide file tree
Showing 17 changed files with 30,789 additions and 30,796 deletions.
11 changes: 0 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,6 @@ matrix:
- MB_PYTHON_VERSION=2.7
- PLAT=i686
- UNICODE_WIDTH=16
- os: linux
env:
- MB_PYTHON_VERSION=3.4
- os: linux
env:
- MB_PYTHON_VERSION=3.4
- PLAT=i686
- os: linux
env:
- MB_PYTHON_VERSION=3.5
Expand All @@ -72,10 +65,6 @@ matrix:
language: generic
env:
- MB_PYTHON_VERSION=2.7
- os: osx
language: generic
env:
- MB_PYTHON_VERSION=3.4
- os: osx
language: generic
env:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@

## 12.1.0
- Upgrade to unicode 12.1.0
- Remove Python 3.4 support as multibuild no longer supports Python 3.4.

## 12.0.0
- Upgrade to unicode 12.0.0

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ unicodedata2

unicodedata backport/updates to python 3 and python 2.

The versions of this package match unicode versions, so unicodedata2==12.0.0 is data from unicode 12.0.0.
The versions of this package match unicode versions, so unicodedata2==12.1.0 is data from unicode 12.1.0.
Additionally this backports support for named aliases and named sequences to python2.
10 changes: 1 addition & 9 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,6 @@ environment:
PYTHON_VERSION: "2.7.x"
PYTHON_ARCH: "64"

- PYTHON: "C:\\Python34"
PYTHON_VERSION: "3.4.x"
PYTHON_ARCH: "32"

- PYTHON: "C:\\Python34-x64"
PYTHON_VERSION: "3.4.x"
PYTHON_ARCH: "64"

- PYTHON: "C:\\Python35"
PYTHON_VERSION: "3.5.x"
PYTHON_ARCH: "32"
Expand Down Expand Up @@ -60,7 +52,7 @@ install:
- "python -m pip install --disable-pip-version-check --user --upgrade pip"

# Upgrade setuptools, wheel and virtualenv
- "pip install --upgrade setuptools wheel virtualenv"
- "python -m pip install --upgrade setuptools wheel virtualenv"

# Create new virtual environment and activate it
- "python -m virtualenv venv"
Expand Down
4 changes: 2 additions & 2 deletions makeunicodedata.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
VERSION = "3.3"

# The Unicode Database
UNIDATA_VERSION = "12.0.0"
UNIDATA_VERSION = "12.1.0"
UNICODE_DATA = "UnicodeData%s.txt"
COMPOSITION_EXCLUSIONS = "CompositionExclusions%s.txt"
EASTASIAN_WIDTH = "EastAsianWidth%s.txt"
Expand Down Expand Up @@ -1248,7 +1248,7 @@ def dump(self, file, trace=0):
size = getsize(self.data)
if trace:
print(self.name+":", size*len(self.data), "bytes", file=sys.stderr)
file.write("static ")
file.write("static const ")
if size == 1:
file.write("unsigned char")
elif size == 2:
Expand Down
4 changes: 2 additions & 2 deletions makeunicodedata3.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
# * Doc/library/stdtypes.rst, and
# * Doc/library/unicodedata.rst
# * Doc/reference/lexical_analysis.rst (two occurrences)
UNIDATA_VERSION = "12.0.0"
UNIDATA_VERSION = "12.1.0"
UNICODE_DATA = "UnicodeData%s.txt"
COMPOSITION_EXCLUSIONS = "CompositionExclusions%s.txt"
EASTASIAN_WIDTH = "EastAsianWidth%s.txt"
Expand Down Expand Up @@ -1249,7 +1249,7 @@ def dump(self, file, trace=0):
size = getsize(self.data)
if trace:
print(self.name+":", size*len(self.data), "bytes", file=sys.stderr)
file.write("static ")
file.write("static const ")
if size == 1:
file.write("unsigned char")
elif size == 2:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
)

setup (name = "unicodedata2",
version = "12.0.0",
version = "12.1.0",
description = "Unicodedata backport for python 2/3 updated to the latest unicode version.",
ext_modules = [module1],
author="Mike Kaplinskiy",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_unicodedata2.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class UnicodeFunctionsTest(UnicodeDatabaseTest):

# Update this if the database changes. Make sure to do a full rebuild
# (e.g. 'make distclean && make') to get the correct checksum.
expectedchecksum = '4cb02a243aed7c251067386dd738189146fddf94'
expectedchecksum = 'c44a49ca7c5cb6441640fe174ede604b45028652'
def test_function_checksum(self):
data = []
h = hashlib.sha1()
Expand Down
2 changes: 1 addition & 1 deletion unicodedata2/py2/unicodedata.c
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,7 @@ _getucname(PyObject *self, Py_UCS4 code, char* buffer, int buflen,
int offset;
int i;
int word;
unsigned char* w;
const unsigned char* w;

if (code >= 0x110000)
return 0;
Expand Down
2,082 changes: 1,041 additions & 1,041 deletions unicodedata2/py2/unicodedata_db.h

Large diffs are not rendered by default.

28,682 changes: 14,343 additions & 14,339 deletions unicodedata2/py2/unicodename_db.h

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions unicodedata2/py2/unicodetype_db.h
Original file line number Diff line number Diff line change
Expand Up @@ -1750,7 +1750,7 @@ static const Py_UCS4 _PyUnicode_ExtendedCase[] = {

/* type indexes */
#define SHIFT 7
static unsigned short index1[] = {
static const unsigned short index1[] = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 34, 35, 36, 37,
38, 39, 34, 34, 34, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
Expand Down Expand Up @@ -2359,7 +2359,7 @@ static unsigned short index1[] = {
126, 126, 126, 126, 126, 126, 126, 269,
};

static unsigned short index2[] = {
static const unsigned short index2[] = {
1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 3, 3, 3, 2, 4, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 5, 5, 5, 6, 5,
7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 6, 5, 5, 5, 5, 5, 5, 17, 17, 17, 17,
Expand Down Expand Up @@ -2925,7 +2925,7 @@ static unsigned short index2[] = {
5, 5, 5, 5, 5, 5, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
27, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 55, 55, 55, 55, 55,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 55, 55, 55, 55, 55,
388, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
Expand Down
2 changes: 1 addition & 1 deletion unicodedata2/py3/unicodedata.c
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,7 @@ _getucname(PyObject *self, Py_UCS4 code, char* buffer, int buflen,
int offset;
int i;
int word;
unsigned char* w;
const unsigned char* w;

if (code >= 0x110000)
return 0;
Expand Down
Loading

0 comments on commit 4f5b7d6

Please sign in to comment.