Skip to content

Commit 48635d2

Browse files
committed
Use html.escape instead of cgi.escape on python 3
1 parent 52f5ae8 commit 48635d2

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ matrix:
3535
- TOXENV=py37
3636
- END_TO_END=1
3737
dist: xenial # required for Python >= 3.7
38+
- python: 3.8-dev
39+
env:
40+
- TOXENV=py38
41+
- END_TO_END=1
42+
dist: xenial # required for Python >= 3.7
3843
- name: "Python: 3.7 on macOS"
3944
language: sh # 'language: python' is not yet supported on Travis CI macOS
4045
os: osx

supervisor/medusa/util.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
from cgi import escape
1+
from supervisor.compat import PY2
2+
3+
if PY2:
4+
from cgi import escape
5+
else:
6+
from html import escape
7+
28

39
def html_repr (object):
410
so = escape (repr (object))

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
envlist =
3-
cover,cover3,docs,py27,py34,py35,py36,py37
3+
cover,cover3,docs,py27,py34,py35,py36,py37,py38
44

55
[testenv]
66
deps =

0 commit comments

Comments
 (0)