Skip to content

Commit

Permalink
Import escape from html instead of cgi
Browse files Browse the repository at this point in the history
cgi.escape was deprecated in Python 3.2 and removed from Python 3.8. Keep using cgi for anything below 3.0 of Python.
  • Loading branch information
macfreek authored and infininight committed May 28, 2020
1 parent 008a996 commit 2e6fe8b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 6 additions & 1 deletion Support/bin/pycheckmate.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@
import re
import sys
import traceback
from cgi import escape

if sys.version_info[0] < 3:
from cgi import escape
else:
from html import escape

from select import select

__version__ = "1.2"
Expand Down
6 changes: 5 additions & 1 deletion Support/sitecustomize.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@

from os import environ, path, fdopen, popen
from traceback import extract_tb
from cgi import escape

if sys.version_info[0] < 3:
from cgi import escape
else:
from html import escape

try:
from urllib import quote
Expand Down

0 comments on commit 2e6fe8b

Please sign in to comment.