revert creation of the html.entities and html.parser modules
(http://bugs.python.org/issue2882)
diff --git a/Doc/library/html.entities.rst b/Doc/library/html.entities.rst
deleted file mode 100644
index 601e181..0000000
--- a/Doc/library/html.entities.rst
+++ /dev/null
@@ -1,42 +0,0 @@
-:mod:`html.entities` --- Definitions of HTML general entities
-=============================================================
-
-.. module:: htmlentitydefs
- :synopsis: Old name for the html.entities module.
-
-.. module:: html.entities
- :synopsis: Definitions of HTML general entities.
-.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
-
-.. note::
- The :mod:`htmlentitydefs` module has been renamed to :mod:`html.entities` in
- Python 3.0. It is importable under both names in Python 2.6 and the rest of
- the 2.x series.
-
-
-This module defines three dictionaries, ``name2codepoint``, ``codepoint2name``,
-and ``entitydefs``. ``entitydefs`` is used by the :mod:`htmllib` module to
-provide the :attr:`entitydefs` member of the :class:`HTMLParser` class. The
-definition provided here contains all the entities defined by XHTML 1.0 that
-can be handled using simple textual substitution in the Latin-1 character set
-(ISO-8859-1).
-
-
-.. data:: entitydefs
-
- A dictionary mapping XHTML 1.0 entity definitions to their replacement text in
- ISO Latin-1.
-
-
-.. data:: name2codepoint
-
- A dictionary that maps HTML entity names to the Unicode codepoints.
-
- .. versionadded:: 2.3
-
-
-.. data:: codepoint2name
-
- A dictionary that maps Unicode codepoints to HTML entity names.
-
- .. versionadded:: 2.3
diff --git a/Doc/library/htmllib.rst b/Doc/library/htmllib.rst
index 953a4e4..16c1b35 100644
--- a/Doc/library/htmllib.rst
+++ b/Doc/library/htmllib.rst
@@ -77,12 +77,12 @@
Interface definition for transforming an abstract flow of formatting events into
specific output events on writer objects.
- Module :mod:`html.parser`
+ Module :mod:`HTMLParser`
Alternate HTML parser that offers a slightly lower-level view of the input, but
is designed to work with XHTML, and does not implement some of the SGML syntax
not used in "HTML as deployed" and which isn't legal for XHTML.
- Module :mod:`html.entities`
+ Module :mod:`htmlentitydefs`
Definition of replacement text for XHTML 1.0 entities.
Module :mod:`sgmllib`
@@ -147,3 +147,44 @@
call to :meth:`save_bgn`. If the :attr:`nofill` flag is false, whitespace is
collapsed to single spaces. A call to this method without a preceding call to
:meth:`save_bgn` will raise a :exc:`TypeError` exception.
+
+
+:mod:`htmlentitydefs` --- Definitions of HTML general entities
+==============================================================
+
+.. module:: htmlentitydefs
+ :synopsis: Definitions of HTML general entities.
+.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
+
+.. note::
+ The :mod:`htmlentitydefs` module has been renamed to :mod:`html.entities` in
+ Python 3.0.
+
+
+This module defines three dictionaries, ``name2codepoint``, ``codepoint2name``,
+and ``entitydefs``. ``entitydefs`` is used by the :mod:`htmllib` module to
+provide the :attr:`entitydefs` member of the :class:`HTMLParser` class. The
+definition provided here contains all the entities defined by XHTML 1.0 that
+can be handled using simple textual substitution in the Latin-1 character set
+(ISO-8859-1).
+
+
+.. data:: entitydefs
+
+ A dictionary mapping XHTML 1.0 entity definitions to their replacement text in
+ ISO Latin-1.
+
+
+.. data:: name2codepoint
+
+ A dictionary that maps HTML entity names to the Unicode codepoints.
+
+ .. versionadded:: 2.3
+
+
+.. data:: codepoint2name
+
+ A dictionary that maps Unicode codepoints to HTML entity names.
+
+ .. versionadded:: 2.3
+
diff --git a/Doc/library/html.parser.rst b/Doc/library/htmlparser.rst
similarity index 92%
rename from Doc/library/html.parser.rst
rename to Doc/library/htmlparser.rst
index 5fa5a70..3019eb4 100644
--- a/Doc/library/html.parser.rst
+++ b/Doc/library/htmlparser.rst
@@ -1,16 +1,13 @@
-:mod:`html.parser` --- Simple HTML and XHTML parser
-===================================================
+
+:mod:`HTMLParser` --- Simple HTML and XHTML parser
+==================================================
.. module:: HTMLParser
- :synopsis: Old name for the html.parser module.
-
-.. module:: html.parser
:synopsis: A simple parser that can handle HTML and XHTML.
.. note::
- The :mod:`HTMLParser` module has been renamed to :mod:`html.parser` in Python
- 3.0. It is importable under both names in Python 2.6 and the rest of the 2.x
- series.
+ The :mod:`HTMLParser` module has been renamed to
+ :mod:`html.parser` in Python 3.0.
.. versionadded:: 2.2
@@ -99,8 +96,8 @@
``handle_starttag('a', [('href', 'http://www.cwi.nl/')])``.
.. versionchanged:: 2.6
- All entity references from :mod:`html.entities` are now replaced in the
- attribute values.
+ All entity references from :mod:`htmlentitydefs` are now replaced in the attribute
+ values.
.. method:: HTMLParser.handle_startendtag(tag, attrs)
@@ -178,7 +175,7 @@
As a basic example, below is a very basic HTML parser that uses the
:class:`HTMLParser` class to print out tags as they are encountered::
- from html.parser import HTMLParser
+ from HTMLParser import HTMLParser
class MyHTMLParser(HTMLParser):
diff --git a/Doc/library/markup.rst b/Doc/library/markup.rst
index e08f953..dd0dd8f 100644
--- a/Doc/library/markup.rst
+++ b/Doc/library/markup.rst
@@ -23,8 +23,7 @@
.. toctree::
- html.parser.rst
- html.entities.rst
+ htmlparser.rst
sgmllib.rst
htmllib.rst
pyexpat.rst