Skip to content

Commit

Permalink
Merge pull request #1258 from MattBlack85/master
Browse files Browse the repository at this point in the history
Use html.escape for python >= 3.4
  • Loading branch information
mnaberez authored Jul 18, 2019
2 parents 52f5ae8 + 48635d2 commit 02bb425
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ matrix:
- TOXENV=py37
- END_TO_END=1
dist: xenial # required for Python >= 3.7
- python: 3.8-dev
env:
- TOXENV=py38
- END_TO_END=1
dist: xenial # required for Python >= 3.7
- name: "Python: 3.7 on macOS"
language: sh # 'language: python' is not yet supported on Travis CI macOS
os: osx
Expand Down
8 changes: 7 additions & 1 deletion supervisor/medusa/util.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
from cgi import escape
from supervisor.compat import PY2

if PY2:
from cgi import escape
else:
from html import escape


def html_repr (object):
so = escape (repr (object))
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
envlist =
cover,cover3,docs,py27,py34,py35,py36,py37
cover,cover3,docs,py27,py34,py35,py36,py37,py38

[testenv]
deps =
Expand Down

0 comments on commit 02bb425

Please sign in to comment.