Kaydet (Commit) a03722f2 authored tarafından Benjamin Peterson's avatar Benjamin Peterson

deprecated mimetools

üst ffae3067
...@@ -9,7 +9,8 @@ ...@@ -9,7 +9,8 @@
.. deprecated:: 2.3 .. deprecated:: 2.3
The :mod:`email` package should be used in preference to the :mod:`mimetools` 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:: module: rfc822
......
...@@ -5,6 +5,9 @@ import os ...@@ -5,6 +5,9 @@ import os
import rfc822 import rfc822
import tempfile 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", __all__ = ["Message","choose_boundary","encode","decode","copyliteral",
"copybinary"] "copybinary"]
......
import unittest import unittest
from test import test_support 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( msgtext1 = mimetools.Message(StringIO.StringIO(
"""Content-Type: text/plain; charset=iso-8859-1; format=flowed """Content-Type: text/plain; charset=iso-8859-1; format=flowed
......
...@@ -197,7 +197,7 @@ class TestStdlibRemovals(unittest.TestCase): ...@@ -197,7 +197,7 @@ class TestStdlibRemovals(unittest.TestCase):
# test.testall not tested as it executes all unit tests as an # test.testall not tested as it executes all unit tests as an
# import side-effect. # import side-effect.
all_platforms = ('audiodev', 'imputil', 'mutex', 'user', 'new', 'rexec', all_platforms = ('audiodev', 'imputil', 'mutex', 'user', 'new', 'rexec',
'Bastion', 'compiler', 'dircache', 'fpformat', 'Bastion', 'compiler', 'dircache', 'mimetools', 'fpformat',
'ihooks', 'mhlib', 'statvfs', 'htmllib', 'sgmllib') 'ihooks', 'mhlib', 'statvfs', 'htmllib', 'sgmllib')
inclusive_platforms = {'irix' : ('pure', 'AL', 'al', 'CD', 'cd', 'cddb', inclusive_platforms = {'irix' : ('pure', 'AL', 'al', 'CD', 'cd', 'cddb',
'cdplayer', 'CL', 'cl', 'DEVICE', 'GL', 'cdplayer', 'CL', 'cl', 'DEVICE', 'GL',
......
...@@ -84,6 +84,8 @@ Extension Modules ...@@ -84,6 +84,8 @@ Extension Modules
Library Library
------- -------
- The mimetools module has been deprecated for removal in 3.0.
- The ctypes.byref function now takes an optional second parameter - The ctypes.byref function now takes an optional second parameter
which allows to specify an offset in bytes for the constructed which allows to specify an offset in bytes for the constructed
pointer-like object. pointer-like object.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment