diff --git a/.travis.yml b/.travis.yml index a6f17c3b..07fdff6f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ language: python python: - - "2.6" - "2.7" - "3.3" - "3.4" diff --git a/README.rst b/README.rst index 2ad46090..8c151328 100644 --- a/README.rst +++ b/README.rst @@ -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 @@ -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 `_ repository and included diff --git a/html5lib/_trie/_base.py b/html5lib/_trie/_base.py index 25eece46..a1158bbb 100644 --- a/html5lib/_trie/_base.py +++ b/html5lib/_trie/_base.py @@ -13,8 +13,7 @@ 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)]) + return {x for x in keys if x.startswith(prefix)} def has_keys_with_prefix(self, prefix): for key in self.keys(): diff --git a/html5lib/filters/alphabeticalattributes.py b/html5lib/filters/alphabeticalattributes.py index f938ba1a..5fea9f69 100644 --- a/html5lib/filters/alphabeticalattributes.py +++ b/html5lib/filters/alphabeticalattributes.py @@ -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): diff --git a/html5lib/html5parser.py b/html5lib/html5parser.py index 2abd63e4..f8309e14 100644 --- a/html5lib/html5parser.py +++ b/html5lib/html5parser.py @@ -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 diff --git a/html5lib/tests/test_alphabeticalattributes.py b/html5lib/tests/test_alphabeticalattributes.py index 9e560a1e..7d5b8e0f 100644 --- a/html5lib/tests/test_alphabeticalattributes.py +++ b/html5lib/tests/test_alphabeticalattributes.py @@ -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 diff --git a/html5lib/treewalkers/etree.py b/html5lib/treewalkers/etree.py index 8f30f078..d15a7eeb 100644 --- a/html5lib/treewalkers/etree.py +++ b/html5lib/treewalkers/etree.py @@ -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 diff --git a/requirements.txt b/requirements.txt index 3884556f..ae7ec3d0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,2 @@ six>=1.9 webencodings -ordereddict ; python_version < '2.7' diff --git a/setup.py b/setup.py index cdb63fd3..3e413f2a 100644 --- a/setup.py +++ b/setup.py @@ -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', @@ -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"], diff --git a/tox.ini b/tox.ini index 5b78570c..0ec9805d 100644 --- a/tox.ini +++ b/tox.ini @@ -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 = @@ -9,7 +9,6 @@ deps = mock base: six base: webencodings - py26-base: ordereddict optional: -r{toxinidir}/requirements-optional.txt doc: Sphinx pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy