Skip to content

Commit 4f3a483

Browse files
authored
Merge pull request #196 from bkemper24/main
update references to deprecated cgi package
2 parents e1b91aa + 522c8f1 commit 4f3a483

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

swat/dataframe.py

100644100755
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -788,10 +788,7 @@ def to_html(self, apply_formats=None, **kwargs):
788788

789789
def _post_process_html(self, html):
790790
''' Add SAS-isms to generated HTML table '''
791-
try:
792-
from html import escape
793-
except ImportError:
794-
from cgi import escape
791+
from html import escape
795792

796793
# Add table label
797794
if self.label:

swat/notebook/zeppelin.py

100644100755
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
from __future__ import print_function, division, absolute_import, unicode_literals
2525

2626
import base64
27-
import cgi
27+
import html
2828
import pandas as pd
2929
import pprint
3030
import six
@@ -77,7 +77,7 @@ def show(obj, **kwargs):
7777
show_svg(obj, **kwargs)
7878

7979
else:
80-
print('%%html <pre>%s</pre>' % cgi.escape(pprint.pformat(obj)))
80+
print('%%html <pre>%s</pre>' % html.escape(pprint.pformat(obj)))
8181

8282

8383
def show_image(img, fmt='png', width='auto', height='auto'):

0 commit comments

Comments
 (0)