aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/py33compat.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2020-02-11 22:15:31 -0500
committerJason R. Coombs <jaraco@jaraco.com>2020-02-11 22:15:31 -0500
commitce8e3ee174ed9dee84aa08a461fb174ac1e53535 (patch)
treeda78c024b4491210e61b73e9e2f755d46c8bc1ff /setuptools/py33compat.py
parent53b8523fdfa19173d2e6b11d6b4d175f54b9dfea (diff)
parenta5dec2f14e3414e4ee5dd146bff9c289d573de9a (diff)
downloadexternal_python_setuptools-ce8e3ee174ed9dee84aa08a461fb174ac1e53535.tar.gz
external_python_setuptools-ce8e3ee174ed9dee84aa08a461fb174ac1e53535.tar.bz2
external_python_setuptools-ce8e3ee174ed9dee84aa08a461fb174ac1e53535.zip
Merge branch 'master' into fix/1557
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