Skip to content

Commit a4fc6a2

Browse files
author
brett.cannon
committed
Have mimify raise a DeprecationWarning. The docs and PEP 4 have listed the
module as deprecated for a while. git-svn-id: http://svn.python.org/projects/python/trunk@55690 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent 478f72e commit a4fc6a2

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed

Lib/mimify.py

+4
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@
2929

3030
import re
3131

32+
import warnings
33+
warnings.warn("the mimify module is deprecated; use the email package instead",
34+
DeprecationWarning, 2)
35+
3236
__all__ = ["mimify","unmimify","mime_encode_header","mime_decode_header"]
3337

3438
qp = re.compile('^content-transfer-encoding:\\s*quoted-printable', re.I)

Lib/test/test___all__.py

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
DeprecationWarning)
1010
warnings.filterwarnings("ignore", "the MimeWriter module is deprecated.*",
1111
DeprecationWarning)
12+
warnings.filterwarnings("ignore", "the mimify module is deprecated.*",
13+
DeprecationWarning)
1214

1315
class AllTest(unittest.TestCase):
1416

Lib/test/test_sundry.py

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
with guard_warnings_filter():
77
warnings.filterwarnings('ignore', r".*posixfile",
88
DeprecationWarning)
9+
warnings.filterwarnings('ignore', r".*mimify", DeprecationWarning)
910

1011
from test.test_support import verbose
1112

Misc/NEWS

+2
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,8 @@ Core and builtins
220220
Library
221221
-------
222222

223+
- mimify now raises a DeprecationWarning upon import.
224+
223225
- MimeWriter now raises a DeprecationWarning upon import.
224226

225227
- tarfile.py: Improved unicode support. Unicode input names are now

0 commit comments

Comments
 (0)