]> granicus.if.org Git - python/commitdiff
Merged revisions 77370 via svnmerge from
authorAntoine Pitrou <solipsis@pitrou.net>
Fri, 8 Jan 2010 19:21:34 +0000 (19:21 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Fri, 8 Jan 2010 19:21:34 +0000 (19:21 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r77370 | antoine.pitrou | 2010-01-08 20:20:17 +0100 (ven., 08 janv. 2010) | 5 lines

  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.
........

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

index 55b327eaa9b0572604abc2ac80d6ab2564380671..077941a79b28822bd8c5902e26f2475c927426fc 100644 (file)
@@ -333,7 +333,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 85faf59415bdd576d4df5e22074c06129d38a6a0..00082bc9060305713e0c12eb1f7eb4829bc226d7 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -48,6 +48,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 331fca2f7c2ceb54f48708c5a03848180a8767f1..937329b6acff97420be4f0946b1e666d97bd6aef 100644 (file)
@@ -5854,12 +5854,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;