Skip to content

Commit 5f637af

Browse files
willkggsnedders
authored andcommitted
Drop support for Python 2.6 (html5lib#356)
Fixes html5lib#330
1 parent f4a6773 commit 5f637af

File tree

10 files changed

+8
-35
lines changed

10 files changed

+8
-35
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
language: python
22
python:
3-
- "2.6"
43
- "2.7"
54
- "3.3"
65
- "3.4"

README.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ More documentation is available at https://html5lib.readthedocs.io/.
9090
Installation
9191
------------
9292

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

9696
.. code-block:: bash
@@ -128,8 +128,7 @@ Tests
128128
-----
129129

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

134133
Test data are contained in a separate `html5lib-tests
135134
<https://github.com/html5lib/html5lib-tests>`_ repository and included

html5lib/_trie/_base.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ def keys(self, prefix=None):
1313
if prefix is None:
1414
return set(keys)
1515

16-
# Python 2.6: no set comprehensions
17-
return set([x for x in keys if x.startswith(prefix)])
16+
return {x for x in keys if x.startswith(prefix)}
1817

1918
def has_keys_with_prefix(self, prefix):
2019
for key in self.keys():

html5lib/filters/alphabeticalattributes.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22

33
from . import base
44

5-
try:
6-
from collections import OrderedDict
7-
except ImportError:
8-
from ordereddict import OrderedDict
5+
from collections import OrderedDict
96

107

118
def _attr_key(attr):

html5lib/html5parser.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22
from six import with_metaclass, viewkeys, PY3
33

44
import types
5-
6-
try:
7-
from collections import OrderedDict
8-
except ImportError:
9-
from ordereddict import OrderedDict
5+
from collections import OrderedDict
106

117
from . import _inputstream
128
from . import _tokenizer

html5lib/tests/test_alphabeticalattributes.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
from __future__ import absolute_import, division, unicode_literals
22

3-
try:
4-
from collections import OrderedDict
5-
except ImportError:
6-
from ordereddict import OrderedDict
3+
from collections import OrderedDict
74

85
import pytest
96

html5lib/treewalkers/etree.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
from __future__ import absolute_import, division, unicode_literals
22

3-
try:
4-
from collections import OrderedDict
5-
except ImportError:
6-
try:
7-
from ordereddict import OrderedDict
8-
except ImportError:
9-
OrderedDict = dict
10-
3+
from collections import OrderedDict
114
import re
125

136
from six import string_types

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
six>=1.9
22
webencodings
3-
ordereddict ; python_version < '2.7'

setup.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ def default_environment():
6464
'Operating System :: OS Independent',
6565
'Programming Language :: Python',
6666
'Programming Language :: Python :: 2',
67-
'Programming Language :: Python :: 2.6',
6867
'Programming Language :: Python :: 2.7',
6968
'Programming Language :: Python :: 3',
7069
'Programming Language :: Python :: 3.3',
@@ -107,10 +106,6 @@ def default_environment():
107106
'webencodings',
108107
],
109108
extras_require={
110-
# A empty extra that only has a conditional marker will be
111-
# unconditonally installed when the condition matches.
112-
":python_version == '2.6'": ["ordereddict"],
113-
114109
# A conditional extra will only install these items when the extra is
115110
# requested and the condition matches.
116111
"datrie:platform_python_implementation == 'CPython'": ["datrie"],

tox.ini

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = {py26,py27,py33,py34,py35,py36,pypy}-{base,optional}
2+
envlist = {py27,py33,py34,py35,py36,pypy}-{base,optional}
33

44
[testenv]
55
deps =
@@ -9,7 +9,6 @@ deps =
99
mock
1010
base: six
1111
base: webencodings
12-
py26-base: ordereddict
1312
optional: -r{toxinidir}/requirements-optional.txt
1413
doc: Sphinx
1514

0 commit comments

Comments
 (0)
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