]> granicus.if.org Git - python/commitdiff
Deprecate the multifile module as per PEP 4.
authorBrett Cannon <bcannon@gmail.com>
Mon, 12 May 2008 03:19:20 +0000 (03:19 +0000)
committerBrett Cannon <bcannon@gmail.com>
Mon, 12 May 2008 03:19:20 +0000 (03:19 +0000)
Lib/multifile.py
Lib/test/test_multifile.py
Misc/NEWS

index e82a3fdeafbb64699cfaa4c0dd46782744d9d924..35b0200c248adc9988588afa3747582fb4c285e7 100644 (file)
@@ -26,6 +26,10 @@ it normally attempts in order to make seeks relative to the beginning of the
 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"]
 
index 437c394e1e16c8dba0455d5b596e40f5d0939e04..daf7ddefd8c260f9b4738329e7e1fd8adf55d94a 100644 (file)
@@ -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
index a15ebb48350a9acbe19672495a27643b361548e2..f6a334d4b9bbf8a6fab8b3173e99ddb9a67f8707 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -26,6 +26,8 @@ Extension Modules
 Library
 -------
 
+- The multifile module has been deprecated as per PEP 4.
+
 - The SocketServer module has been renamed 'socketserver'.  The old
   name is now deprecated.