[Numpy-svn] [numpy/numpy] 4008bb: ENH: core: make unpickling with encoding='bytes' w...
GitHub
noreply at github.com
Tue Jul 22 19:18:16 EDT 2014
Branch: refs/heads/maintenance/1.9.x
Home: https://github.com/numpy/numpy
Commit: 4008bb41414184d875af4f733a3ff3d303b94a4a
https://github.com/numpy/numpy/commit/4008bb41414184d875af4f733a3ff3d303b94a4a
Author: Pauli Virtanen <pav at iki.fi>
Date: 2014-07-22 (Tue, 22 Jul 2014)
Changed paths:
M numpy/core/src/multiarray/descriptor.c
M numpy/core/tests/test_regression.py
Log Message:
-----------
ENH: core: make unpickling with encoding='bytes' work
Make dtype.__setstate__ accept endian either as a byte string or unicode.
Also fix a missing error return introduced in c3551579, apparently
mistake.
Commit: 16f39c80f69ae4695f2f940ccdff8b26db3a2a01
https://github.com/numpy/numpy/commit/16f39c80f69ae4695f2f940ccdff8b26db3a2a01
Author: Pauli Virtanen <pav at iki.fi>
Date: 2014-07-22 (Tue, 22 Jul 2014)
Changed paths:
M numpy/core/src/multiarray/descriptor.c
M numpy/core/tests/test_regression.py
Log Message:
-----------
BUG: core: ensure unpickled dtype fields and names have correct types + coerce on Py3
That 'names' is a tuple and 'fields' a dict (when present) is assumed in
most of the code base, so check them during unpickling.
Also add coercion from bytes using ASCII codec on Python 3. This is
never triggered in the "usual" case of loading Py3-generated pickles on
Py3, but can occur if loading Py2 generated pickles with
pickle.load(f, encoding='bytes'), which sometimes is the only working
option.
The ASCII codec is probably the safest choice and likely covers most use
cases.
Commit: 857c5e2822be9edb4f57df0730640020e1a7fd7a
https://github.com/numpy/numpy/commit/857c5e2822be9edb4f57df0730640020e1a7fd7a
Author: Julian Taylor <jtaylor.debian at googlemail.com>
Date: 2014-07-23 (Wed, 23 Jul 2014)
Changed paths:
M numpy/core/src/multiarray/descriptor.c
M numpy/core/tests/test_regression.py
Log Message:
-----------
Merge pull request #4888 from pv/fix-bytes-encoding-unpickle
ENH: core: make unpickling with encoding='bytes' work
Compare: https://github.com/numpy/numpy/compare/bd0a4f367280...857c5e2822be
More information about the Numpy-svn
mailing list