Skip to content

Commit

Permalink
Drop datrie support (#455)
Browse files Browse the repository at this point in the history
  • Loading branch information
gsnedders committed May 28, 2020
1 parent 2ea55c7 commit 5cd73ef
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 67 deletions.
17 changes: 17 additions & 0 deletions CHANGES.rst
@@ -1,6 +1,23 @@
Change Log
----------

1.1
~~~

UNRELEASED

Breaking changes:

* Drop support for Python 3.3. (#358)
* Drop support for Python 3.4. (#421)

Other changes:

* Try to import from `collections.abc` to remove DeprecationWarning and ensure
`html5lib` keeps working in future Python versions. (#403)
* Drop optional `datrie` dependency. (#442)


1.0.1
~~~~~

Expand Down
3 changes: 0 additions & 3 deletions README.rst
Expand Up @@ -107,9 +107,6 @@ Optional Dependencies
The following third-party libraries may be used for additional
functionality:

- ``datrie`` can be used under CPython to improve parsing performance
(though in almost all cases the improvement is marginal);

- ``lxml`` is supported as a tree format (for both building and
walking) under CPython (but *not* PyPy where it is known to cause
segfaults);
Expand Down
2 changes: 1 addition & 1 deletion debug-info.py
Expand Up @@ -12,7 +12,7 @@
"maxsize": sys.maxsize
}

search_modules = ["chardet", "datrie", "genshi", "html5lib", "lxml", "six"]
search_modules = ["chardet", "genshi", "html5lib", "lxml", "six"]
found_modules = []

for m in search_modules:
Expand Down
13 changes: 2 additions & 11 deletions html5lib/_trie/__init__.py
@@ -1,14 +1,5 @@
from __future__ import absolute_import, division, unicode_literals

from .py import Trie as PyTrie
from .py import Trie

Trie = PyTrie

# pylint:disable=wrong-import-position
try:
from .datrie import Trie as DATrie
except ImportError:
pass
else:
Trie = DATrie
# pylint:enable=wrong-import-position
__all__ = ["Trie"]
44 changes: 0 additions & 44 deletions html5lib/_trie/datrie.py

This file was deleted.

6 changes: 0 additions & 6 deletions requirements-optional.txt
Expand Up @@ -11,9 +11,3 @@ chardet>=2.2
# lxml is supported with its own treebuilder ("lxml") and otherwise
# uses the standard ElementTree support
lxml ; platform_python_implementation == 'CPython'

# DATrie can be used in place of our Python trie implementation for
# slightly better parsing performance.
# https://github.com/pytries/datrie/issues/52 although closed is not
# yet released to https://pypi.org/project/datrie
datrie ; platform_python_implementation == 'CPython' and python_version < '3.7'
3 changes: 1 addition & 2 deletions setup.py
Expand Up @@ -111,7 +111,6 @@ def default_environment():
extras_require={
# A conditional extra will only install these items when the extra is
# requested and the condition matches.
"datrie:platform_python_implementation == 'CPython'": ["datrie"],
"lxml:platform_python_implementation == 'CPython'": ["lxml"],

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

0 comments on commit 5cd73ef

Please sign in to comment.