
python-checkins at python
Jun 12, 2008, 3:33 PM
Post #1 of 1
(31 views)
Permalink
|
|
r64206 - in python/trunk: Doc/library/rfc822.rst Lib/rfc822.py Lib/test/test_py3kwarn.py Lib/test/test_rfc822.py Misc/NEWS
|
|
Author: benjamin.peterson Date: Fri Jun 13 00:33:06 2008 New Revision: 64206 Log: add py3k warnings to rfc822 Modified: python/trunk/Doc/library/rfc822.rst python/trunk/Lib/rfc822.py python/trunk/Lib/test/test_py3kwarn.py python/trunk/Lib/test/test_rfc822.py python/trunk/Misc/NEWS Modified: python/trunk/Doc/library/rfc822.rst ============================================================================== --- python/trunk/Doc/library/rfc822.rst (original) +++ python/trunk/Doc/library/rfc822.rst Fri Jun 13 00:33:06 2008 @@ -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 Modified: python/trunk/Lib/rfc822.py ============================================================================== --- python/trunk/Lib/rfc822.py (original) +++ python/trunk/Lib/rfc822.py Fri Jun 13 00:33:06 2008 @@ -73,6 +73,9 @@ 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() Modified: python/trunk/Lib/test/test_py3kwarn.py ============================================================================== --- python/trunk/Lib/test/test_py3kwarn.py (original) +++ python/trunk/Lib/test/test_py3kwarn.py Fri Jun 13 00:33:06 2008 @@ -198,7 +198,7 @@ # 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', Modified: python/trunk/Lib/test/test_rfc822.py ============================================================================== --- python/trunk/Lib/test/test_rfc822.py (original) +++ python/trunk/Lib/test/test_rfc822.py Fri Jun 13 00:33:06 2008 @@ -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: Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Fri Jun 13 00:33:06 2008 @@ -84,6 +84,8 @@ Library ------- +- The rfc822 module has been deprecated for removal in 3.0. + - The mimetools module has been deprecated for removal in 3.0. - The ctypes.byref function now takes an optional second parameter _______________________________________________ Python-checkins mailing list Python-checkins[at]python.org http://mail.python.org/mailman/listinfo/python-checkins
|