[Python-checkins] r63145 - in python/trunk: Lib/multifile.py Lib/test/test_multifile.py Misc/NEWS
brett.cannon
python-checkins at python.org
Mon May 12 05:19:20 CEST 2008
Author: brett.cannon
Date: Mon May 12 05:19:20 2008
New Revision: 63145
Log:
Deprecate the multifile module as per PEP 4.
Modified:
python/trunk/Lib/multifile.py
python/trunk/Lib/test/test_multifile.py
python/trunk/Misc/NEWS
Modified: python/trunk/Lib/multifile.py
==============================================================================
--- python/trunk/Lib/multifile.py (original)
+++ python/trunk/Lib/multifile.py Mon May 12 05:19:20 2008
@@ -26,6 +26,10 @@
current file part. This may be useful when using MultiFile with a non-
seekable stream object.
"""
+from warnings import warn
+warn("the multifile module has been deprecated since Python 2.5",
+ DeprecationWarning, stacklevel=2)
+del warn
__all__ = ["MultiFile","Error"]
Modified: python/trunk/Lib/test/test_multifile.py
==============================================================================
--- python/trunk/Lib/test/test_multifile.py (original)
+++ python/trunk/Lib/test/test_multifile.py Mon May 12 05:19:20 2008
@@ -1,5 +1,6 @@
+from test import test_support
import mimetools
-import multifile
+multifile = test_support.import_module('multifile', deprecated=True)
import cStringIO
msg = """Mime-Version: 1.0
Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS (original)
+++ python/trunk/Misc/NEWS Mon May 12 05:19:20 2008
@@ -26,6 +26,8 @@
Library
-------
+- The multifile module has been deprecated as per PEP 4.
+
- The SocketServer module has been renamed 'socketserver'. The old
name is now deprecated.
More information about the Python-checkins
mailing list