Skip to content

Commit 5cd73ef

Browse files
authored
Drop datrie support (html5lib#455)
1 parent 2ea55c7 commit 5cd73ef

File tree

7 files changed

+21
-67
lines changed

7 files changed

+21
-67
lines changed

CHANGES.rst

+17
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
11
Change Log
22
----------
33

4+
1.1
5+
~~~
6+
7+
UNRELEASED
8+
9+
Breaking changes:
10+
11+
* Drop support for Python 3.3. (#358)
12+
* Drop support for Python 3.4. (#421)
13+
14+
Other changes:
15+
16+
* Try to import from `collections.abc` to remove DeprecationWarning and ensure
17+
`html5lib` keeps working in future Python versions. (#403)
18+
* Drop optional `datrie` dependency. (#442)
19+
20+
421
1.0.1
522
~~~~~
623

README.rst

-3
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,6 @@ Optional Dependencies
107107
The following third-party libraries may be used for additional
108108
functionality:
109109

110-
- ``datrie`` can be used under CPython to improve parsing performance
111-
(though in almost all cases the improvement is marginal);
112-
113110
- ``lxml`` is supported as a tree format (for both building and
114111
walking) under CPython (but *not* PyPy where it is known to cause
115112
segfaults);

debug-info.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"maxsize": sys.maxsize
1313
}
1414

15-
search_modules = ["chardet", "datrie", "genshi", "html5lib", "lxml", "six"]
15+
search_modules = ["chardet", "genshi", "html5lib", "lxml", "six"]
1616
found_modules = []
1717

1818
for m in search_modules:

html5lib/_trie/__init__.py

+2-11
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
from __future__ import absolute_import, division, unicode_literals
22

3-
from .py import Trie as PyTrie
3+
from .py import Trie
44

5-
Trie = PyTrie
6-
7-
# pylint:disable=wrong-import-position
8-
try:
9-
from .datrie import Trie as DATrie
10-
except ImportError:
11-
pass
12-
else:
13-
Trie = DATrie
14-
# pylint:enable=wrong-import-position
5+
__all__ = ["Trie"]

html5lib/_trie/datrie.py

-44
This file was deleted.

requirements-optional.txt

-6
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,3 @@ chardet>=2.2
1111
# lxml is supported with its own treebuilder ("lxml") and otherwise
1212
# uses the standard ElementTree support
1313
lxml ; platform_python_implementation == 'CPython'
14-
15-
# DATrie can be used in place of our Python trie implementation for
16-
# slightly better parsing performance.
17-
# https://github.com/pytries/datrie/issues/52 although closed is not
18-
# yet released to https://pypi.org/project/datrie
19-
datrie ; platform_python_implementation == 'CPython' and python_version < '3.7'

setup.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ def default_environment():
111111
extras_require={
112112
# A conditional extra will only install these items when the extra is
113113
# requested and the condition matches.
114-
"datrie:platform_python_implementation == 'CPython'": ["datrie"],
115114
"lxml:platform_python_implementation == 'CPython'": ["lxml"],
116115

117116
# Standard extras, will be installed when the extra is requested.
@@ -123,6 +122,6 @@ def default_environment():
123122
# extra that will be installed whenever the condition matches and the
124123
# all extra is requested.
125124
"all": ["genshi", "chardet>=2.2"],
126-
"all:platform_python_implementation == 'CPython'": ["datrie", "lxml"],
125+
"all:platform_python_implementation == 'CPython'": ["lxml"],
127126
},
128127
)

0 commit comments

Comments
 (0)