Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5f637af

Browse files
willkggsnedders
authored andcommitted
Drop support for Python 2.6 (html5lib#356)
Fixeshtml5lib#330
1 parentf4a6773 commit5f637af

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
ifprefixisNone:
1414
returnset(keys)
1515

16-
# Python 2.6: no set comprehensions
17-
returnset([xforxinkeysifx.startswith(prefix)])
16+
return {xforxinkeysifx.startswith(prefix)}
1817

1918
defhas_keys_with_prefix(self,prefix):
2019
forkeyinself.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 .importbase
44

5-
try:
6-
fromcollectionsimportOrderedDict
7-
exceptImportError:
8-
fromordereddictimportOrderedDict
5+
fromcollectionsimportOrderedDict
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
fromsiximportwith_metaclass,viewkeys,PY3
33

44
importtypes
5-
6-
try:
7-
fromcollectionsimportOrderedDict
8-
exceptImportError:
9-
fromordereddictimportOrderedDict
5+
fromcollectionsimportOrderedDict
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__importabsolute_import,division,unicode_literals
22

3-
try:
4-
fromcollectionsimportOrderedDict
5-
exceptImportError:
6-
fromordereddictimportOrderedDict
3+
fromcollectionsimportOrderedDict
74

85
importpytest
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__importabsolute_import,division,unicode_literals
22

3-
try:
4-
fromcollectionsimportOrderedDict
5-
exceptImportError:
6-
try:
7-
fromordereddictimportOrderedDict
8-
exceptImportError:
9-
OrderedDict=dict
10-
3+
fromcollectionsimportOrderedDict
114
importre
125

136
fromsiximportstring_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)

[8]ページ先頭

©2009-2025 Movatter.jp