mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Make BadPickleGet a class. Fixes #609164.
This commit is contained in:
parent
258cba8442
commit
658009afdb
2 changed files with 6 additions and 3 deletions
|
@ -274,6 +274,8 @@ Core and builtins
|
|||
|
||||
Extension modules
|
||||
|
||||
- cPickle.BadPickleGet is now a class.
|
||||
|
||||
- The time stamps in os.stat_result are floating point numbers now.
|
||||
|
||||
- If the size passed to mmap.mmap() is larger than the length of the
|
||||
|
|
|
@ -4760,6 +4760,10 @@ init_stuff(PyObject *module_dict)
|
|||
PickleError, NULL)))
|
||||
return -1;
|
||||
|
||||
if (!( BadPickleGet = PyErr_NewException("cPickle.BadPickleGet",
|
||||
UnpicklingError, NULL)))
|
||||
return -1;
|
||||
|
||||
if (PyDict_SetItemString(module_dict, "PickleError",
|
||||
PickleError) < 0)
|
||||
return -1;
|
||||
|
@ -4776,9 +4780,6 @@ init_stuff(PyObject *module_dict)
|
|||
UnpickleableError) < 0)
|
||||
return -1;
|
||||
|
||||
if (!( BadPickleGet = PyString_FromString("cPickle.BadPickleGet")))
|
||||
return -1;
|
||||
|
||||
if (PyDict_SetItemString(module_dict, "BadPickleGet",
|
||||
BadPickleGet) < 0)
|
||||
return -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue