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

Commitd0f1027

Browse files
committed
fixup! Preserve attribute order when parsing
Make sure 2.6 support works
1 parent29dbf97 commitd0f1027

File tree

4 files changed

+6
-9
lines changed

4 files changed

+6
-9
lines changed

‎README.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,6 @@ functionality:
117117
be determined; ``chardet``, from which it was forked, can also be used
118118
on Python 2.
119119

120-
- ``ordereddict`` can be used under Python 2.6
121-
(``collections.OrderedDict`` is used instead on later versions) to
122-
serialize attributes in alphabetical order.
123-
124120

125121
Bugs
126122
----

‎html5lib/html5parser.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
fromsiximportwith_metaclass,viewkeys
33

44
importtypes
5-
fromcollectionsimportOrderedDict
5+
6+
try:
7+
fromcollectionsimportOrderedDict
8+
exceptImportError:
9+
fromordereddictimportOrderedDict
610

711
from .importinputstream
812
from .importtokenizer

‎requirements-optional.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,3 @@ lxml ; platform_python_implementation == 'CPython'
1515
# DATrie can be used in place of our Python trie implementation for
1616
# slightly better parsing performance.
1717
datrie ; platform_python_implementation == 'CPython'
18-
19-
# Can be used to force attributes to be serialized in alphabetical
20-
# order.
21-
ordereddict ; python_version < '2.7'

‎requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
six
22
webencodings
3+
ordereddict ;python_version<'2.7'

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp