Skip to content

Commit 0c8ef90

Browse files
meeseeksmachineheohrhshadrach
authored
Backport PR #62832 on branch 2.3.x (BUG: Recognize 2-tuple state without attrs dict) (#63046)
Co-authored-by: HeoHeo <h0h6h2h5@gmail.com> Co-authored-by: richard <rhshadrach@gmail.com>
1 parent 472bae0 commit 0c8ef90

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pandas/_libs/arrays.pyx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ cdef class NDArrayBacked:
100100
if len(state) == 1 and isinstance(state[0], dict):
101101
self.__setstate__(state[0])
102102
return
103+
elif len(state) == 2:
104+
# GH#62820: Handle missing attrs dict during auto-unpickling
105+
self.__setstate__((*state, {}))
106+
return
103107
raise NotImplementedError(state) # pragma: no cover
104108

105109
data, dtype = state[:2]

0 commit comments

Comments
 (0)