Index: Misc/NEWS =================================================================== --- Misc/NEWS (revision 63318) +++ Misc/NEWS (working copy) @@ -32,6 +32,9 @@ Library ------- +- The markupbase module has been renamed '_markupbase'. The old + name is now deprecated. + - The WAIT module from IRIX has been deprecated for removal in Python 3.0. - The torgb module from IRIX has been deprecated for removal in Python 3.0. Index: Lib/sgmllib.py =================================================================== --- Lib/sgmllib.py (revision 63318) +++ Lib/sgmllib.py (working copy) @@ -9,7 +9,7 @@ # not supported at all. -import markupbase +import _markupbase import re __all__ = ["SGMLParser", "SGMLParseError"] @@ -52,7 +52,7 @@ # chunks). Entity references are passed by calling # self.handle_entityref() with the entity reference as argument. -class SGMLParser(markupbase.ParserBase): +class SGMLParser(_markupbase.ParserBase): # Definition of entities -- derived classes may override entity_or_charref = re.compile('&(?:' '([a-zA-Z][-.a-zA-Z0-9]*)|#([0-9]+)' @@ -71,7 +71,7 @@ self.lasttag = '???' self.nomoretags = 0 self.literal = 0 - markupbase.ParserBase.reset(self) + _markupbase.ParserBase.reset(self) def setnomoretags(self): """Enter literal mode (CDATA) till EOF. Index: Lib/lib-old/markupbase.py =================================================================== --- Lib/lib-old/markupbase.py (revision 0) +++ Lib/lib-old/markupbase.py (revision 0) @@ -0,0 +1,8 @@ +import sys +from warnings import warnpy3k + +warnpy3k("the markupbase module has been renamed " + "to '_markupbase' in Python 3.0", stacklevel=2) + +import markupbase +sys.modules[__name__] = markupbase Index: Lib/_markupbase.py =================================================================== --- Lib/_markupbase.py (revision 63318) +++ Lib/_markupbase.py (working copy) @@ -28,7 +28,7 @@ def __init__(self): if self.__class__ is ParserBase: raise RuntimeError( - "markupbase.ParserBase must be subclassed") + "_markupbase.ParserBase must be subclassed") def error(self, message): raise NotImplementedError( Index: Lib/test/test_py3kwarn.py =================================================================== --- Lib/test/test_py3kwarn.py (revision 63318) +++ Lib/test/test_py3kwarn.py (working copy) @@ -208,7 +208,8 @@ renames = {'copy_reg': 'copyreg', 'Queue': 'queue', 'SocketServer': 'socketserver', - 'ConfigParser': 'configparser'} + 'ConfigParser': 'configparser', + 'markupbase': '_markupbase',} def check_rename(self, module_name, new_module_name): """Make sure that: Index: Lib/HTMLParser.py =================================================================== --- Lib/HTMLParser.py (revision 63318) +++ Lib/HTMLParser.py (working copy) @@ -8,7 +8,7 @@ # and CDATA (character data -- only end tags are special). -import markupbase +import _markupbase import re # Regular expressions used for parsing @@ -64,7 +64,7 @@ return result -class HTMLParser(markupbase.ParserBase): +class HTMLParser(_markupbase.ParserBase): """Find tags and other markup and call handler functions. Usage: @@ -96,7 +96,7 @@ self.rawdata = '' self.lasttag = '???' self.interesting = interesting_normal - markupbase.ParserBase.reset(self) + _markupbase.ParserBase.reset(self) def feed(self, data): """Feed data to the parser.