mirror of https://github.com/python/cpython
add py3k warnings to rfc822
This commit is contained in:
parent
6fd3321d6c
commit
26305a03e3
|
@ -9,7 +9,8 @@
|
|||
|
||||
.. deprecated:: 2.3
|
||||
The :mod:`email` package should be used in preference to the :mod:`rfc822`
|
||||
module. This module is present only to maintain backward compatibility.
|
||||
module. This module is present only to maintain backward compatibility, and
|
||||
has been removed in 3.0.
|
||||
|
||||
This module defines a class, :class:`Message`, which represents an "email
|
||||
message" as defined by the Internet standard :rfc:`2822`. [#]_ Such messages
|
||||
|
|
|
@ -73,6 +73,9 @@ There are also some utility functions here.
|
|||
|
||||
import time
|
||||
|
||||
from warnings import warnpy3k
|
||||
warnpy3k("in 3.x, rfc822 has been removed in favor of the email package")
|
||||
|
||||
__all__ = ["Message","AddressList","parsedate","parsedate_tz","mktime_tz"]
|
||||
|
||||
_blanklines = ('\r\n', '\n') # Optimization for islast()
|
||||
|
|
|
@ -198,7 +198,7 @@ class TestStdlibRemovals(unittest.TestCase):
|
|||
# import side-effect.
|
||||
all_platforms = ('audiodev', 'imputil', 'mutex', 'user', 'new', 'rexec',
|
||||
'Bastion', 'compiler', 'dircache', 'mimetools', 'fpformat',
|
||||
'ihooks', 'mhlib', 'statvfs', 'htmllib', 'sgmllib')
|
||||
'ihooks', 'mhlib', 'statvfs', 'htmllib', 'sgmllib', 'rfc822')
|
||||
inclusive_platforms = {'irix' : ('pure', 'AL', 'al', 'CD', 'cd', 'cddb',
|
||||
'cdplayer', 'CL', 'cl', 'DEVICE', 'GL',
|
||||
'gl', 'ERRNO', 'FILE', 'FL', 'flp', 'fl',
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import rfc822
|
||||
import unittest
|
||||
from test import test_support
|
||||
|
||||
rfc822 = test_support.import_module("rfc822", deprecated=True)
|
||||
|
||||
try:
|
||||
from cStringIO import StringIO
|
||||
except ImportError:
|
||||
|
|
Loading…
Reference in New Issue