[issue14545] html module should not be available in Python 3.1

Ezio Melotti report at bugs.python.org
Wed Apr 11 08:01:21 CEST 2012


Ezio Melotti <ezio.melotti at gmail.com> added the comment:

The doc for the html module was added in 5633af590057 (see #2830) and it was previously undocumented even if it was importable.  Moving the versionadded under html.escape sounds good to me.

As a side note, it would be better to do

try:
    # Python 3.2 deprecates cgi.escape() and adds html.escape() as a replacement.
    from html import escape
except ImportError:
    from cgi import escape

rather than importing the whole cgi module as "html" just to use the escape function.

----------
assignee:  -> docs at python
components: +Documentation -None
keywords: +easy
nosy: +docs at python, ezio.melotti
stage:  -> needs patch
versions: +Python 3.2, Python 3.3 -Python 3.1

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14545>
_______________________________________


More information about the Python-bugs-list mailing list