Use html.escape instead of cgi.escape

cgi.escape is gone as of Python 3.8.
This commit is contained in:
Kodi Arfer 2019-04-09 16:12:25 -04:00
parent 63ba27b36d
commit 7b3ef423c1

View File

@ -2,7 +2,7 @@
# #
# This file is execfile()d with the current directory set to its containing dir. # This file is execfile()d with the current directory set to its containing dir.
import re, os, sys, time, cgi import re, os, sys, time, html
sys.path.append(os.path.abspath("..")) sys.path.append(os.path.abspath(".."))
extensions = ['sphinx.ext.intersphinx'] extensions = ['sphinx.ext.intersphinx']
@ -28,7 +28,7 @@ copyright = u'%s the authors' % time.strftime('%Y')
version = ".".join(hy_version.split(".")[:-1]) version = ".".join(hy_version.split(".")[:-1])
# The full version, including alpha/beta/rc tags. # The full version, including alpha/beta/rc tags.
release = hy_version release = hy_version
hy_descriptive_version = cgi.escape(hy_version) hy_descriptive_version = html.escape(hy_version)
if "+" in hy_version: if "+" in hy_version:
hy_descriptive_version += " <strong style='color: red;'>(unstable)</strong>" hy_descriptive_version += " <strong style='color: red;'>(unstable)</strong>"