summaryrefslogtreecommitdiff
path: root/setuptools/py33compat.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2018-03-17 11:53:22 -0400
committerJason R. Coombs <jaraco@jaraco.com>2018-03-17 12:16:10 -0400
commit6fba91c17b264beec674bb25019e3888fe5ba305 (patch)
tree2bb0ef3b043a509d74fb0c8a8a006dd1f78291db /setuptools/py33compat.py
parente141c08edc47834b04eb0fd7c1510ee04b682921 (diff)
downloadpython-setuptools-git-6fba91c17b264beec674bb25019e3888fe5ba305.tar.gz
Rely on stdlib to decode entities.
Diffstat (limited to 'setuptools/py33compat.py')
-rw-r--r--setuptools/py33compat.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/setuptools/py33compat.py b/setuptools/py33compat.py
index af64d5d1..2a73ebb3 100644
--- a/setuptools/py33compat.py
+++ b/setuptools/py33compat.py
@@ -2,7 +2,13 @@ import dis
import array
import collections
+try:
+ import html
+except ImportError:
+ html = None
+
from setuptools.extern import six
+from setuptools.extern.six.moves import html_parser
OpArg = collections.namedtuple('OpArg', 'opcode arg')
@@ -43,3 +49,6 @@ class Bytecode_compat(object):
Bytecode = getattr(dis, 'Bytecode', Bytecode_compat)
+
+
+unescape = getattr(html, 'unescape', html_parser.HTMLParser().unescape)