Source: partd
Version: 1.4.2-1
Control: block 1141694 by -1

partd fails autopkgtests with pandas 3.0 (in experimental):

https://ci.debian.net/packages/p/partd/unstable/amd64/73190652/

It looks like it's assuming that pandas dtypes are also numpy dtypes, which is not true for pandas' new string dtype.
Upstream release notes: https://pandas.pydata.org/docs/whatsnew/v3.0.0.html

45s =================================== FAILURES =================================== 45s ______________________________ test_PandasColumns ______________________________
 45s
 45s     def test_PandasColumns():
 45s         with PandasColumns() as p:
 45s             assert os.path.exists(p.partd.partd.path)
 45s
 45s >           p.append({'x': df1, 'y': df2})
 45s
 45s test_pandas.py:32:
45s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
 45s /usr/lib/python3/dist-packages/partd/pandas.py:56: in append
 45s     self.partd.append(arrays, **kwargs)
 45s /usr/lib/python3/dist-packages/partd/numpy.py:55: in append
 45s     self.partd.iset(suffix(k, '.dtype'), serialize_dtype(v.dtype))
 45s                                          ^^^^^^^^^^^^^^^^^^^^^^^^
45s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
 45s
 45s dt = <StringDtype(storage='python', na_value=nan)>
 45s
 45s     def serialize_dtype(dt):
 45s         """ Serialize dtype to bytes
 45s
 45s         >>> serialize_dtype(np.dtype('i4'))
 45s         b'<i4'
 45s         >>> serialize_dtype(np.dtype('M8[us]'))
 45s         b'<M8[us]'
 45s         """
 45s >       return dt.str.encode()
 45s                ^^^^^^
 45s E       AttributeError: 'StringDtype' object has no attribute 'str'
 45s
 45s /usr/lib/python3/dist-packages/partd/numpy.py:25: AttributeError
45s ____________________________ test_column_selection _____________________________
 45s
 45s     def test_column_selection():
 45s         with PandasColumns('foo') as p:
 45s >           p.append({'x': df1, 'y': df2})
 45s
 45s test_pandas.py:51:
45s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
 45s /usr/lib/python3/dist-packages/partd/pandas.py:56: in append
 45s     self.partd.append(arrays, **kwargs)
 45s /usr/lib/python3/dist-packages/partd/numpy.py:55: in append
 45s     self.partd.iset(suffix(k, '.dtype'), serialize_dtype(v.dtype))
 45s                                          ^^^^^^^^^^^^^^^^^^^^^^^^
45s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
 45s
 45s dt = <StringDtype(storage='python', na_value=nan)>
 45s
 45s     def serialize_dtype(dt):
 45s         """ Serialize dtype to bytes
 45s
 45s         >>> serialize_dtype(np.dtype('i4'))
 45s         b'<i4'
 45s         >>> serialize_dtype(np.dtype('M8[us]'))
 45s         b'<M8[us]'
 45s         """
 45s >       return dt.str.encode()
 45s                ^^^^^^
 45s E       AttributeError: 'StringDtype' object has no attribute 'str'
 45s
 45s /usr/lib/python3/dist-packages/partd/numpy.py:25: AttributeError

Reply via email to