Commit 09d3496
committed
ARROW-4260: [Python] NumPy buffer protocol failure
The following error only occurred when both numpy=1.16 and pickle5 was installed.
It's a numpy issue numpy/numpy#12745, so skipping the test until it's resolved.
```
====================================================== FAILURES =======================================================
__________________________________________ test_serialize_deserialize_pandas __________________________________________
ValueError: cannot include dtype 'M' in a buffer
The above exception was the direct cause of the following exception:
def test_serialize_deserialize_pandas():
# ARROW-1784, serialize and deserialize DataFrame by decomposing
# BlockManager
df = _fully_loaded_dataframe_example()
> _check_serialize_components_roundtrip(df)
pyarrow/tests/test_convert_pandas.py:2278:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pyarrow/tests/test_convert_pandas.py:2268: in _check_serialize_components_roundtrip
components = ctx.serialize(df).to_components()
pyarrow/serialization.pxi:198: in pyarrow.lib.SerializationContext.serialize
return serialize(obj, context=self)
pyarrow/serialization.pxi:345: in pyarrow.lib.serialize
check_status(SerializeObject(context, wrapped_value, &serialized.data))
pyarrow/serialization.pxi:153: in pyarrow.lib.SerializationContext._serialize_callback
serialized_obj = {"data": self.custom_serializers[type_id](obj)}
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x = MultiIndex(levels=[[2000-01-01 00:00:00, 2000-01-02 00:00:00, 2000-01-03 00:00:00, 2000-01-04 00:00:00, 2000-01-05 00:00:00], ['bar', 'foo']],
labels=[[0, 0, 1, 1, 2, 2, 3, 3, 4, 4], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0]])
def _pickle_to_buffer(x):
> pickled = builtin_pickle.dumps(x, protocol=builtin_pickle.HIGHEST_PROTOCOL)
E SystemError: <built-in function __import__> returned a result with an error set
```
Author: Krisztián Szűcs <szucs.krisztian@gmail.com>
Closes apache#3403 from kszucs/travis_numpy_version and squashes the following commits:
e3162a8 <Krisztián Szűcs> pin to minor
77e9b64 <Krisztián Szűcs> reason
301226d <Krisztián Szűcs> skip serialize test
39a7161 <Krisztián Szűcs> appveyor
ae1f16d <Krisztián Szűcs> pin numpy to 1.141 parent 87ac6fd commit 09d3496
4 files changed
Lines changed: 14 additions & 12 deletions
File tree
- ci
- python/pyarrow/tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
| 99 | + | |
99 | 100 | | |
100 | | - | |
101 | | - | |
102 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
| |||
109 | 110 | | |
110 | 111 | | |
111 | 112 | | |
112 | | - | |
113 | | - | |
114 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
115 | 116 | | |
116 | 117 | | |
117 | 118 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
| 127 | + | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
2224 | 2225 | | |
2225 | 2226 | | |
2226 | 2227 | | |
2227 | | - | |
2228 | | - | |
2229 | 2228 | | |
2230 | 2229 | | |
2231 | 2230 | | |
| |||
2271 | 2270 | | |
2272 | 2271 | | |
2273 | 2272 | | |
| 2273 | + | |
| 2274 | + | |
2274 | 2275 | | |
2275 | 2276 | | |
2276 | 2277 | | |
| |||
0 commit comments