]> granicus.if.org Git - python/commitdiff
Issue #7092: Remove py3k warning when importing cPickle. 2to3 handles
authorAntoine Pitrou <solipsis@pitrou.net>
Fri, 8 Jan 2010 19:20:17 +0000 (19:20 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Fri, 8 Jan 2010 19:20:17 +0000 (19:20 +0000)
renaming of `cPickle` to `pickle`.  The warning was annoying since there's
no alternative to cPickle if you care about performance.  Patch by Florent
Xicluna.

Lib/test/test_py3kwarn.py
Misc/NEWS
Modules/cPickle.c

index d754faa75e29aef48c04e8d47e1d4018fe0a7853..8cb0be96696de86d0549e3ab913a1af77a2ad38e 100644 (file)
@@ -336,7 +336,7 @@ class TestStdlibRemovals(unittest.TestCase):
                            'sunos5' : ('sunaudiodev', 'SUNAUDIODEV'),
                           }
     optional_modules = ('bsddb185', 'Canvas', 'dl', 'linuxaudiodev', 'imageop',
-                        'sv', 'cPickle', 'bsddb', 'dbhash')
+                        'sv', 'bsddb', 'dbhash')
 
     def check_removal(self, module_name, optional=False):
         """Make sure the specified module, when imported, raises a
index b5151e7e95f489c15920e82fd89d75f99831431e..97720bc581baf8b72c523983e29da683ed2519a3 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -65,6 +65,11 @@ Core and Builtins
 Library
 -------
 
+- Issue #7092: Remove py3k warning when importing cPickle.  2to3 handles
+  renaming of `cPickle` to `pickle`.  The warning was annoying since there's
+  no alternative to cPickle if you care about performance.  Patch by Florent
+  Xicluna.
+
 - Issue #7455: Fix possible crash in cPickle on invalid input.  Patch by
   Victor Stinner.
 
index 7fa7f703d72c8e3d0da64f79d6f8bac39e6ef451..d89e8109e87504ea1be4d70d904aac90fd37f978 100644 (file)
@@ -5973,12 +5973,6 @@ initcPickle(void)
        PyObject *format_version;
        PyObject *compatible_formats;
 
-       /* XXX: Should mention that the pickle module will include the C
-          XXX: optimized implementation automatically. */
-       if (PyErr_WarnPy3k("the cPickle module has been removed in "
-                          "Python 3.0", 2) < 0)
-               return;
-
        Py_TYPE(&Picklertype) = &PyType_Type;
        Py_TYPE(&Unpicklertype) = &PyType_Type;
        Py_TYPE(&PdataType) = &PyType_Type;