diff options
author | Benjamin Peterson <benjamin@python.org> | 2008-06-12 22:33:06 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2008-06-12 22:33:06 (GMT) |
commit | 26305a03e3d501f9338af3f1373f8ec7da88838f (patch) | |
tree | c69a1822ec0f2412e726257a5fec4ab310c0e6b2 /Lib | |
parent | 6fd3321d6c2d374f4d46534e630b822e7da4310e (diff) | |
download | cpython-26305a03e3d501f9338af3f1373f8ec7da88838f.zip cpython-26305a03e3d501f9338af3f1373f8ec7da88838f.tar.gz cpython-26305a03e3d501f9338af3f1373f8ec7da88838f.tar.bz2 |
add py3k warnings to rfc822
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/rfc822.py | 3 | ||||
-rw-r--r-- | Lib/test/test_py3kwarn.py | 2 | ||||
-rw-r--r-- | Lib/test/test_rfc822.py | 3 |
3 files changed, 6 insertions, 2 deletions
diff --git a/Lib/rfc822.py b/Lib/rfc822.py index 14cc729..4382a51 100644 --- a/Lib/rfc822.py +++ b/Lib/rfc822.py @@ -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() diff --git a/Lib/test/test_py3kwarn.py b/Lib/test/test_py3kwarn.py index b2dc8cd..a289cc7 100644 --- a/Lib/test/test_py3kwarn.py +++ b/Lib/test/test_py3kwarn.py @@ -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', diff --git a/Lib/test/test_rfc822.py b/Lib/test/test_rfc822.py index 197887d..afbc984 100644 --- a/Lib/test/test_rfc822.py +++ b/Lib/test/test_rfc822.py @@ -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: |