Compress the IDNA table

This commit is contained in:
Wilfredo Sánchez 2020-03-30 15:42:18 -07:00
parent 83fe2acb71
commit 67f2ef60a3
4 changed files with 6 additions and 2475 deletions

View File

@ -1,8 +1,9 @@
include README.md LICENSE CHANGELOG.md
include tox.ini pytest.ini .coveragerc
exclude TODO.md appveyor.yml
exclude TODO.md
exclude .appveyor.yml
include src/hyperlink/idna-tables-properties.csv
include src/hyperlink/idna-tables-properties.csv.gz
graft docs
prune docs/_build

View File

@ -18,6 +18,7 @@ else:
from typing import (
Callable, Iterable, List, Optional, Sequence, Text, TypeVar, cast
)
from gzip import open as open_gzip
from . import DecodedURL, EncodedURL
@ -60,9 +61,9 @@ else:
# https://www.iana.org/assignments/idna-tables-6.3.0/
# idna-tables-6.3.0.xhtml#idna-tables-properties
dataFileName = join(
dirname(__file__), "idna-tables-properties.csv"
dirname(__file__), "idna-tables-properties.csv.gz"
)
with open(dataFileName) as dataFile:
with open_gzip(dataFileName, "rt") as dataFile:
reader = csv_reader(dataFile, delimiter=",")
next(reader) # Skip header row
for row in reader:

File diff suppressed because it is too large Load Diff

Binary file not shown.