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

Drop support for Python 2.6#356

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
gsnedders merged 2 commits intohtml5lib:masterfromwillkg:330-drop-python-26
Nov 7, 2017
Merged
Show file tree
Hide file tree
Changes fromall 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
1 change: 0 additions & 1 deletion.travis.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
language: python
python:
- "2.6"
- "2.7"
- "3.3"
- "3.4"
Expand Down
5 changes: 2 additions & 3 deletionsREADME.rst
View file
Open in desktop
Original file line numberDiff line numberDiff 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 DownExpand 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
3 changes: 1 addition & 2 deletionshtml5lib/_trie/_base.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -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():
Expand Down
5 changes: 1 addition & 4 deletionshtml5lib/filters/alphabeticalattributes.py
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletionshtml5lib/html5parser.py
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletionshtml5lib/tests/test_alphabeticalattributes.py
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletionshtml5lib/treewalkers/etree.py
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletionrequirements.txt
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
six>=1.9
webencodings
ordereddict ; python_version < '2.7'
5 changes: 0 additions & 5 deletionssetup.py
View file
Open in desktop
Original file line numberDiff line numberDiff 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 DownExpand 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 deletionstox.ini
View file
Open in desktop
Original file line numberDiff line numberDiff 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

[8]ページ先頭

©2009-2025 Movatter.jp