Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
language: python
python:
- "2.6"
- "2.7"
- "3.3"
- "3.4"
Expand Down
5 changes: 2 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ More documentation is available at https://html5lib.readthedocs.io/.
Installation
------------

html5lib works on CPython 2.6+, CPython 3.3+ and PyPy. To install it,
html5lib works on CPython 2.7+, CPython 3.3+ and PyPy. To install it,
use:

.. code-block:: bash
Expand Down Expand Up @@ -128,8 +128,7 @@ Tests
-----

Unit tests require the ``pytest`` and ``mock`` libraries and can be
run using the ``py.test`` command in the root directory;
``ordereddict`` is required under Python 2.6. All should pass.
run using the ``py.test`` command in the root directory.

Test data are contained in a separate `html5lib-tests
<https://github.com/html5lib/html5lib-tests>`_ repository and included
Expand Down
1 change: 0 additions & 1 deletion html5lib/_trie/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ def keys(self, prefix=None):
if prefix is None:
return set(keys)

# Python 2.6: no set comprehensions
return set([x for x in keys if x.startswith(prefix)])
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops--meant to convert this to set comprehension syntax. Will do now.


def has_keys_with_prefix(self, prefix):
Expand Down
5 changes: 1 addition & 4 deletions html5lib/filters/alphabeticalattributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@

from . import base

try:
from collections import OrderedDict
except ImportError:
from ordereddict import OrderedDict
from collections import OrderedDict


def _attr_key(attr):
Expand Down
6 changes: 1 addition & 5 deletions html5lib/html5parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
from six import with_metaclass, viewkeys, PY3

import types

try:
from collections import OrderedDict
except ImportError:
from ordereddict import OrderedDict
from collections import OrderedDict

from . import _inputstream
from . import _tokenizer
Expand Down
5 changes: 1 addition & 4 deletions html5lib/tests/test_alphabeticalattributes.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
from __future__ import absolute_import, division, unicode_literals

try:
from collections import OrderedDict
except ImportError:
from ordereddict import OrderedDict
from collections import OrderedDict

import pytest

Expand Down
9 changes: 1 addition & 8 deletions html5lib/treewalkers/etree.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
from __future__ import absolute_import, division, unicode_literals

try:
from collections import OrderedDict
except ImportError:
try:
from ordereddict import OrderedDict
except ImportError:
OrderedDict = dict

from collections import OrderedDict
import re

from six import string_types
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
six>=1.9
webencodings
ordereddict ; python_version < '2.7'
5 changes: 0 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ def default_environment():
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
Expand Down Expand Up @@ -107,10 +106,6 @@ def default_environment():
'webencodings',
],
extras_require={
# A empty extra that only has a conditional marker will be
# unconditonally installed when the condition matches.
":python_version == '2.6'": ["ordereddict"],

# A conditional extra will only install these items when the extra is
# requested and the condition matches.
"datrie:platform_python_implementation == 'CPython'": ["datrie"],
Expand Down
3 changes: 1 addition & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = {py26,py27,py33,py34,py35,py36,pypy}-{base,optional}
envlist = {py27,py33,py34,py35,py36,pypy}-{base,optional}

[testenv]
deps =
Expand All @@ -9,7 +9,6 @@ deps =
mock
base: six
base: webencodings
py26-base: ordereddict
optional: -r{toxinidir}/requirements-optional.txt
doc: Sphinx

Expand Down