summaryrefslogtreecommitdiffstats
path: root/Lib/pydoc.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-06-12 18:52:31 (GMT)
committerGeorg Brandl <georg@python.org>2008-06-12 18:52:31 (GMT)
commit83e9f4cd77f0cf4e47d505643c00b0dc3debace3 (patch)
tree5fe0608949044149b11903ad280c6032238e4832 /Lib/pydoc.py
parentb1549092ea5346e49eb6f0836857858a6bbd864c (diff)
downloadcpython-83e9f4cd77f0cf4e47d505643c00b0dc3debace3.zip
cpython-83e9f4cd77f0cf4e47d505643c00b0dc3debace3.tar.gz
cpython-83e9f4cd77f0cf4e47d505643c00b0dc3debace3.tar.bz2
Remove last traces of mimetools.
Diffstat (limited to 'Lib/pydoc.py')
-rwxr-xr-xLib/pydoc.py14
1 files changed, 2 insertions, 12 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 &lt;ping@lfw.org&gt;</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()