[Python-checkins] r55690 - in python/trunk: Lib/mimify.py Lib/test/test___all__.py Lib/test/test_sundry.py Misc/NEWS

brett.cannon python-checkins at python.org
Wed May 30 23:49:02 CEST 2007


Author: brett.cannon
Date: Wed May 30 23:48:58 2007
New Revision: 55690

Modified:
   python/trunk/Lib/mimify.py
   python/trunk/Lib/test/test___all__.py
   python/trunk/Lib/test/test_sundry.py
   python/trunk/Misc/NEWS
Log:
Have mimify raise a DeprecationWarning.  The docs and PEP 4 have listed the
module as deprecated for a while.


Modified: python/trunk/Lib/mimify.py
==============================================================================
--- python/trunk/Lib/mimify.py	(original)
+++ python/trunk/Lib/mimify.py	Wed May 30 23:48:58 2007
@@ -29,6 +29,10 @@
 
 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)

Modified: python/trunk/Lib/test/test___all__.py
==============================================================================
--- python/trunk/Lib/test/test___all__.py	(original)
+++ python/trunk/Lib/test/test___all__.py	Wed May 30 23:48:58 2007
@@ -9,6 +9,8 @@
                         DeprecationWarning)
 warnings.filterwarnings("ignore", "the MimeWriter module is deprecated.*",
                         DeprecationWarning)
+warnings.filterwarnings("ignore", "the mimify module is deprecated.*",
+                        DeprecationWarning)
 
 class AllTest(unittest.TestCase):
 

Modified: python/trunk/Lib/test/test_sundry.py
==============================================================================
--- python/trunk/Lib/test/test_sundry.py	(original)
+++ python/trunk/Lib/test/test_sundry.py	Wed May 30 23:48:58 2007
@@ -6,6 +6,7 @@
 with guard_warnings_filter():
     warnings.filterwarnings('ignore', r".*posixfile",
                             DeprecationWarning)
+    warnings.filterwarnings('ignore', r".*mimify", DeprecationWarning)
 
     from test.test_support import verbose
 

Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS	(original)
+++ python/trunk/Misc/NEWS	Wed May 30 23:48:58 2007
@@ -220,6 +220,8 @@
 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


More information about the Python-checkins mailing list