aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/py33compat.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2019-10-26 16:36:07 -0400
committerJason R. Coombs <jaraco@jaraco.com>2019-10-26 16:36:07 -0400
commitc11270aa6bffd8913c6e074f09b9d920c8f19002 (patch)
tree5c97e2e05dcabb9b13e954528fa6783740f68fb6 /setuptools/py33compat.py
parent6a3674a18d22dbea4d6b513b8e8a7ac28ada5eba (diff)
parent297f2adceda3af402fc08311e42505c8cdc9c54b (diff)
downloadexternal_python_setuptools-c11270aa6bffd8913c6e074f09b9d920c8f19002.tar.gz
external_python_setuptools-c11270aa6bffd8913c6e074f09b9d920c8f19002.tar.bz2
external_python_setuptools-c11270aa6bffd8913c6e074f09b9d920c8f19002.zip
Merge branch 'master' into fix/1700
Diffstat (limited to 'setuptools/py33compat.py')
-rw-r--r--setuptools/py33compat.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/setuptools/py33compat.py b/setuptools/py33compat.py
index 87cf5398..cb694436 100644
--- a/setuptools/py33compat.py
+++ b/setuptools/py33compat.py
@@ -52,4 +52,8 @@ class Bytecode_compat:
Bytecode = getattr(dis, 'Bytecode', Bytecode_compat)
-unescape = getattr(html, 'unescape', html_parser.HTMLParser().unescape)
+unescape = getattr(html, 'unescape', None)
+if unescape is None:
+ # HTMLParser.unescape is deprecated since Python 3.4, and will be removed
+ # from 3.9.
+ unescape = html_parser.HTMLParser().unescape