diff options
author | Georg Brandl <georg@python.org> | 2008-06-12 18:52:31 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-06-12 18:52:31 (GMT) |
commit | 83e9f4cd77f0cf4e47d505643c00b0dc3debace3 (patch) | |
tree | 5fe0608949044149b11903ad280c6032238e4832 /Lib | |
parent | b1549092ea5346e49eb6f0836857858a6bbd864c (diff) | |
download | cpython-83e9f4cd77f0cf4e47d505643c00b0dc3debace3.zip cpython-83e9f4cd77f0cf4e47d505643c00b0dc3debace3.tar.gz cpython-83e9f4cd77f0cf4e47d505643c00b0dc3debace3.tar.bz2 |
Remove last traces of mimetools.
Diffstat (limited to 'Lib')
-rwxr-xr-x | Lib/pydoc.py | 14 | ||||
-rw-r--r-- | Lib/test/test___all__.py | 2 |
2 files changed, 2 insertions, 14 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py index ae8499e..8e80b37 100755 --- a/Lib/pydoc.py +++ b/Lib/pydoc.py @@ -1903,17 +1903,7 @@ def apropos(key): # --------------------------------------------------- web browser interface def serve(port, callback=None, completer=None): - import http.server, mimetools, select - - # Patch up mimetools.Message so it doesn't break if rfc822 is reloaded. - class Message(mimetools.Message): - def __init__(self, fp, seekable=1): - Message = self.__class__ - Message.__bases__[0].__bases__[0].__init__(self, fp, seekable) - self.encodingheader = self.get('content-transfer-encoding') - self.typeheader = self.get('content-type') - self.parsetype() - self.parseplist() + import http.server, email.message, select class DocHandler(http.server.BaseHTTPRequestHandler): def send_document(self, title, contents): @@ -1981,7 +1971,7 @@ pydoc</strong> by Ka-Ping Yee <ping@lfw.org></font>''' DocServer.base = http.server.HTTPServer DocServer.handler = DocHandler - DocHandler.MessageClass = Message + DocHandler.MessageClass = email.message.Message try: try: DocServer(port, callback).serve_until_quit() diff --git a/Lib/test/test___all__.py b/Lib/test/test___all__.py index 491f159..ec1ba16 100644 --- a/Lib/test/test___all__.py +++ b/Lib/test/test___all__.py @@ -85,7 +85,6 @@ class AllTest(unittest.TestCase): self.check_all("mailbox") self.check_all("mailcap") self.check_all("mhlib") - self.check_all("mimetools") self.check_all("mimetypes") self.check_all("multifile") self.check_all("netrc") @@ -111,7 +110,6 @@ class AllTest(unittest.TestCase): self.check_all("random") self.check_all("re") self.check_all("reprlib") - self.check_all("rfc822") self.check_all("rlcompleter") self.check_all("robotparser") self.check_all("sched") |