Skip to content

Drop datrie support #455

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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"],
},
)