]> granicus.if.org Git - python/commitdiff
Have mimify raise a DeprecationWarning. The docs and PEP 4 have listed the
authorBrett Cannon <bcannon@gmail.com>
Wed, 30 May 2007 21:48:58 +0000 (21:48 +0000)
committerBrett Cannon <bcannon@gmail.com>
Wed, 30 May 2007 21:48:58 +0000 (21:48 +0000)
module as deprecated for a while.

Lib/mimify.py
Lib/test/test___all__.py
Lib/test/test_sundry.py
Misc/NEWS

index b6f61439d758d4f7d375a9649f6bf3624b886a7a..1c15983d1e2647c13e04422e29f27bb42db1d647 100755 (executable)
@@ -29,6 +29,10 @@ QUOTE = '> '            # string replies are quoted with
 
 import re
 
+import warnings
+warnings.warn("the mimify module is deprecated; use the email package instead",
+                DeprecationWarning, 2)
+
 __all__ = ["mimify","unmimify","mime_encode_header","mime_decode_header"]
 
 qp = re.compile('^content-transfer-encoding:\\s*quoted-printable', re.I)
index 071ed04251f2b0443c31d8d7aa5e863bc58eea2c..26ed012272b00c0ae66f50afb1eb81e47dd90d5a 100644 (file)
@@ -9,6 +9,8 @@ warnings.filterwarnings("ignore", ".*popen2 module is deprecated.*",
                         DeprecationWarning)
 warnings.filterwarnings("ignore", "the MimeWriter module is deprecated.*",
                         DeprecationWarning)
+warnings.filterwarnings("ignore", "the mimify module is deprecated.*",
+                        DeprecationWarning)
 
 class AllTest(unittest.TestCase):
 
index 5711fb216ebe6afe156f4d9adb9d79f7ef8652e1..533aedc5df687a864645646b3892d1cab1f9d5bf 100644 (file)
@@ -6,6 +6,7 @@ import warnings
 with guard_warnings_filter():
     warnings.filterwarnings('ignore', r".*posixfile",
                             DeprecationWarning)
+    warnings.filterwarnings('ignore', r".*mimify", DeprecationWarning)
 
     from test.test_support import verbose
 
index 4ca7fa8da2aaae874657251c7c3170c754f57710..8f4bcebb8c4c402535232d2a2e7d44fc1e5c019e 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -220,6 +220,8 @@ Core and builtins
 Library
 -------
 
+- mimify now raises a DeprecationWarning upon import.
+
 - MimeWriter now raises a DeprecationWarning upon import.
 
 - tarfile.py: Improved unicode support. Unicode input names are now