This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Use of deprecated cgi.escape
Type: behavior Stage: resolved
Components: Demos and Tools Versions: Python 3.4, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: python-dev, rhettinger, serhiy.storchaka
Priority: normal Keywords: easy, patch

Created on 2014-11-23 10:06 by serhiy.storchaka, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
cgi2html.diff rhettinger, 2014-11-27 06:00 Switch from deprecated module name review
cgi2html2.diff serhiy.storchaka, 2014-11-27 14:00 review
Messages (4)
msg231552 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2014-11-23 10:06
Deprecated cgi.escape() is used in Tools/scripts/gprof2html.py and Tools/scripts/highlight.py. It should be replaced by html.escape(). Unfortunately the html module clashes with the html parameter in highlight.py so I left this issue for Reymond.
msg231750 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2014-11-27 06:00
If this looks right to you, please go ahead an apply.
msg231762 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2014-11-27 14:00
highlight.py contains a code to support Python 2:

try:
    import builtins
except ImportError:
    import __builtin__ as builtins

If Python 2 should be supported, there is no the html module in Python 2. Otherwise this workaround can be dropped.
msg231914 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-12-01 08:54
New changeset f5eb62bdcb1a by Serhiy Storchaka in branch '3.4':
Issue #22924: Scripts gprof2html.py and highlight.py now use html.escape()
https://hg.python.org/cpython/rev/f5eb62bdcb1a

New changeset 8c1d1e861081 by Serhiy Storchaka in branch 'default':
Issue #22924: Scripts gprof2html.py and highlight.py now use html.escape()
https://hg.python.org/cpython/rev/8c1d1e861081
History
Date User Action Args
2022-04-11 14:58:10adminsetgithub: 67113
2014-12-01 08:55:16serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: needs patch -> resolved
2014-12-01 08:54:02python-devsetnosy: + python-dev
messages: + msg231914
2014-11-27 14:00:06serhiy.storchakasetfiles: + cgi2html2.diff

messages: + msg231762
2014-11-27 06:00:27rhettingersetfiles: + cgi2html.diff
assignee: rhettinger -> serhiy.storchaka
messages: + msg231750

keywords: + patch
2014-11-23 10:06:15serhiy.storchakacreate