]> granicus.if.org Git - python/commitdiff
deprecated mimetools
authorBenjamin Peterson <benjamin@python.org>
Thu, 12 Jun 2008 14:23:49 +0000 (14:23 +0000)
committerBenjamin Peterson <benjamin@python.org>
Thu, 12 Jun 2008 14:23:49 +0000 (14:23 +0000)
Doc/library/mimetools.rst
Lib/mimetools.py
Lib/test/test_mimetools.py
Lib/test/test_py3kwarn.py
Misc/NEWS

index 781386747681da7fff183b7b2063bb2557328247..da34173fe3b22a47e1c219599e7e76a45229c739 100644 (file)
@@ -9,7 +9,8 @@
 
 .. deprecated:: 2.3
    The :mod:`email` package should be used in preference to the :mod:`mimetools`
-   module.  This module is present only to maintain backward compatibility.
+   module.  This module is present only to maintain backward compatibility, and
+   it has been removed in 3.x.
 
 .. index:: module: rfc822
 
index 8c1cc199031cf0e5a86520e9549b8dc88e0f1179..5dd5396203ec65ce4735528565f6c90c78ce1b53 100644 (file)
@@ -5,6 +5,9 @@ import os
 import rfc822
 import tempfile
 
+from warnings import warnpy3k
+warnpy3k("in 3.x, mimetools has been removed in favor of the email package")
+
 __all__ = ["Message","choose_boundary","encode","decode","copyliteral",
            "copybinary"]
 
index b0b5b01be54fcf7ecc64219c5c3b571e54e51e92..ed01ede893b72382fd11223a811b21daa26c9c01 100644 (file)
@@ -1,7 +1,10 @@
 import unittest
 from test import test_support
 
-import string, StringIO, mimetools
+import string
+import StringIO
+
+mimetools = test_support.import_module("mimetools", deprecated=True)
 
 msgtext1 = mimetools.Message(StringIO.StringIO(
 """Content-Type: text/plain; charset=iso-8859-1; format=flowed
index 768be285f9707a0f13f62e0be6ed30f0bd011cb5..b2dc8cd9b35f6203c9b874cff05be6bcb95803ef 100644 (file)
@@ -197,7 +197,7 @@ class TestStdlibRemovals(unittest.TestCase):
     # test.testall not tested as it executes all unit tests as an
     # import side-effect.
     all_platforms = ('audiodev', 'imputil', 'mutex', 'user', 'new', 'rexec',
-                        'Bastion', 'compiler', 'dircache', 'fpformat',
+                        'Bastion', 'compiler', 'dircache', 'mimetools', 'fpformat',
                         'ihooks', 'mhlib', 'statvfs', 'htmllib', 'sgmllib')
     inclusive_platforms = {'irix' : ('pure', 'AL', 'al', 'CD', 'cd', 'cddb',
                                      'cdplayer', 'CL', 'cl', 'DEVICE', 'GL',
index 77eebef5cf3063f667c6141fb3883737125c43a5..4a93ba7b5e34a5fdcfabf40b21759ead0d5595f4 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -84,6 +84,8 @@ Extension Modules
 Library
 -------
 
+- The mimetools module has been deprecated for removal in 3.0.
+
 - The ctypes.byref function now takes an optional second parameter
   which allows to specify an offset in bytes for the constructed
   pointer-like object.