mirror of https://github.com/python/cpython
Have mimify raise a DeprecationWarning. The docs and PEP 4 have listed the
module as deprecated for a while.
This commit is contained in:
parent
90134c9a05
commit
c249bdab92
|
@ -29,6 +29,10 @@ QUOTE = '> ' # string replies are quoted with
|
||||||
|
|
||||||
import re
|
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"]
|
__all__ = ["mimify","unmimify","mime_encode_header","mime_decode_header"]
|
||||||
|
|
||||||
qp = re.compile('^content-transfer-encoding:\\s*quoted-printable', re.I)
|
qp = re.compile('^content-transfer-encoding:\\s*quoted-printable', re.I)
|
||||||
|
|
|
@ -9,6 +9,8 @@ warnings.filterwarnings("ignore", ".*popen2 module is deprecated.*",
|
||||||
DeprecationWarning)
|
DeprecationWarning)
|
||||||
warnings.filterwarnings("ignore", "the MimeWriter module is deprecated.*",
|
warnings.filterwarnings("ignore", "the MimeWriter module is deprecated.*",
|
||||||
DeprecationWarning)
|
DeprecationWarning)
|
||||||
|
warnings.filterwarnings("ignore", "the mimify module is deprecated.*",
|
||||||
|
DeprecationWarning)
|
||||||
|
|
||||||
class AllTest(unittest.TestCase):
|
class AllTest(unittest.TestCase):
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@ import warnings
|
||||||
with guard_warnings_filter():
|
with guard_warnings_filter():
|
||||||
warnings.filterwarnings('ignore', r".*posixfile",
|
warnings.filterwarnings('ignore', r".*posixfile",
|
||||||
DeprecationWarning)
|
DeprecationWarning)
|
||||||
|
warnings.filterwarnings('ignore', r".*mimify", DeprecationWarning)
|
||||||
|
|
||||||
from test.test_support import verbose
|
from test.test_support import verbose
|
||||||
|
|
||||||
|
|
|
@ -220,6 +220,8 @@ Core and builtins
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- mimify now raises a DeprecationWarning upon import.
|
||||||
|
|
||||||
- MimeWriter now raises a DeprecationWarning upon import.
|
- MimeWriter now raises a DeprecationWarning upon import.
|
||||||
|
|
||||||
- tarfile.py: Improved unicode support. Unicode input names are now
|
- tarfile.py: Improved unicode support. Unicode input names are now
|
||||||
|
|
Loading…
Reference in New Issue