Added Python 3.8 support. Fixes #5179

1) Upgraded passlib==1.7.1 to passlib==1.7.2
2) Replace unmaintained Flask-Security with maintained Flask-Security-Too package, which is also compatible with python 3.8
3) Other compatibility code changes.
This commit is contained in:
Aditya Toshniwal
2020-02-18 12:10:38 +05:30
committed by Akshay Joshi
parent 1964e824c8
commit 915b09255c
13 changed files with 178 additions and 168 deletions

View File

@@ -9,9 +9,13 @@
"""Utilities for HTML"""
import cgi
from pgadmin.utils import IS_PY2
if IS_PY2:
from cgi import escape as html_escape
else:
from html import escape as html_escape
def safe_str(x):
try:
@@ -32,4 +36,4 @@ def safe_str(x):
x = x.decode('utf-8')
except Exception:
pass
return cgi.escape(x)
return html_escape(x, False)