Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
6 changes: 5 additions & 1 deletion html5lib/_tokenizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

from six import unichr as chr

from collections import deque, OrderedDict
from collections import deque
try:
from collections.abc import OrderedDict
except ImportError:
from collections import OrderedDict
from sys import version_info

from .constants import spaceCharacters
Expand Down
5 changes: 4 additions & 1 deletion html5lib/filters/alphabeticalattributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

from . import base

from collections import OrderedDict
try:
from collections.abc import OrderedDict
except ImportError:
from collections import OrderedDict


def _attr_key(attr):
Expand Down
5 changes: 4 additions & 1 deletion html5lib/tests/test_alphabeticalattributes.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
from __future__ import absolute_import, division, unicode_literals

from collections import OrderedDict
try:
from collections.abc import OrderedDict
except ImportError:
from collections import OrderedDict

import pytest

Expand Down
5 changes: 4 additions & 1 deletion html5lib/treewalkers/etree.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
from __future__ import absolute_import, division, unicode_literals

from collections import OrderedDict
try:
from collections.abc import OrderedDict
except ImportError:
from collections import OrderedDict
import re

from six import string_types
Expand Down