Browse Source

Update html5lib 1.1-dev (e9ef538) → 1.1-dev (4f92357)

pull/1200/head
JackDandy 7 years ago
parent
commit
293a4dfd65
  1. 1
      CHANGES.md
  2. 12
      lib/html5lib/_inputstream.py
  3. 5
      lib/html5lib/_trie/_base.py
  4. 5
      lib/html5lib/treebuilders/dom.py

1
CHANGES.md

@ -3,6 +3,7 @@
* Update CacheControl library 0.12.5 (cd91309) to 0.12.5 (0fedbba)
* Update Certifi 2018.08.24 (8be9f89) to 2018.10.15 (a462d21)
* Update dateutil 2.7.2 (49690ee) to 2.7.5 (e954819)
* Update html5lib 1.1-dev (e9ef538) to 1.1-dev (4f92357)
* Update Requests library 2.19.1 (2c6a842) to 2.20.1 (57d7284)
* Update Six compatibility library 1.11.0 (68112f3) to 1.11.0 (0b4265e)
* Update urllib3 release 1.23 (7c216f4) to 1.24.1 (a6ec68a)

12
lib/html5lib/_inputstream.py

@ -1,10 +1,11 @@
from __future__ import absolute_import, division, unicode_literals
from six import text_type, binary_type
from six import text_type
from six.moves import http_client, urllib
import codecs
import re
from io import BytesIO, StringIO
import webencodings
@ -12,13 +13,6 @@ from .constants import EOF, spaceCharacters, asciiLetters, asciiUppercase
from .constants import _ReparseException
from . import _utils
from io import StringIO
try:
from io import BytesIO
except ImportError:
BytesIO = StringIO
# Non-unicode versions of constants for use in the pre-parser
spaceCharactersBytes = frozenset([item.encode("ascii") for item in spaceCharacters])
asciiLettersBytes = frozenset([item.encode("ascii") for item in asciiLetters])
@ -908,7 +902,7 @@ class ContentAttrParser(object):
def lookupEncoding(encoding):
"""Return the python codec name corresponding to an encoding or None if the
string doesn't correspond to a valid encoding."""
if isinstance(encoding, binary_type):
if isinstance(encoding, bytes):
try:
encoding = encoding.decode("ascii")
except UnicodeDecodeError:

5
lib/html5lib/_trie/_base.py

@ -1,6 +1,9 @@
from __future__ import absolute_import, division, unicode_literals
from collections import Mapping
try:
from collections.abc import Mapping
except ImportError: # Python 2.7
from collections import Mapping
class Trie(Mapping):

5
lib/html5lib/treebuilders/dom.py

@ -1,7 +1,10 @@
from __future__ import absolute_import, division, unicode_literals
from collections import MutableMapping
try:
from collections.abc import MutableMapping
except ImportError: # Python 2.7
from collections import MutableMapping
from xml.dom import minidom, Node
import weakref

Loading…
Cancel
Save