]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
rename markupbase to _markupbase
authorFred Drake <fdrake@acm.org>
Fri, 7 Dec 2007 11:10:11 +0000 (11:10 +0000)
committerFred Drake <fdrake@acm.org>
Fri, 7 Dec 2007 11:10:11 +0000 (11:10 +0000)
Lib/HTMLParser.py
Lib/_markupbase.py [moved from Lib/markupbase.py with 99% similarity]
Lib/sgmllib.py

index f0e520ca227f3d6ad20428e5547486acbfa96e11..99791955f31d25af00c45831152221d2d186db61 100644 (file)
@@ -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 @@ class HTMLParseError(Exception):
         return result
 
 
-class HTMLParser(markupbase.ParserBase):
+class HTMLParser(_markupbase.ParserBase):
     """Find tags and other markup and call handler functions.
 
     Usage:
@@ -96,7 +96,7 @@ class HTMLParser(markupbase.ParserBase):
         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.
similarity index 99%
rename from Lib/markupbase.py
rename to Lib/_markupbase.py
index 24808d185beaa1c732c0e3b60292b68467e57b06..b178470944a9297015dc024d97cc0277e12fc815 100644 (file)
@@ -28,7 +28,7 @@ class ParserBase:
     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 ce5807b8d7f4e65359f298372955e22e46f9024f..7eca9de22d69e3dd5592a98d255ea7ff5be9b969 100644 (file)
@@ -9,7 +9,7 @@
 # not supported at all.
 
 
-import markupbase
+import _markupbase
 import re
 
 __all__ = ["SGMLParser", "SGMLParseError"]
@@ -52,7 +52,7 @@ class SGMLParseError(RuntimeError):
 # 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 @@ class SGMLParser(markupbase.ParserBase):
         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.