You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HDF5 and Stata I/O are broken on some architectures
Fix some issues, warn on use and xfail tests for the remainder
Everything that has a run=False xfail in here should also be in
the run-and-ignore set in debian/tests/numbatests
armhf TestHDF5Store::test*encoding only sometimes crashes
(1.1.3+dfsg-1 passed on build but failed autopkgtest)
HDF5 and Stata are known to fail on big-endian architectures
Stata was previously seen to fail on qemu-ppc64el, but not real ppc64el
Author: Andreas Tille <[email protected]>, Graham Inggs <[email protected]>, Yaroslav Halchenko <[email protected]>, Rebecca N. Palmer <[email protected]>
Bug-Debian: https://bugs.debian.org/877419
Bug: partly pandas-dev/pandas#54396
Forwarded: no
Gbp-Pq: Name xfail_tests_nonintel_io.patch
# pyproject.toml errors on EncodingWarnings in pandas
188
189
# Ignore EncodingWarnings from other libraries
189
190
continue
191
+
if (actual_warning.category==UserWarningand"Non-x86 system detected"instr(actual_warning.message) andnotbool(re.match('i.?86|x86',platform.uname()[4]))) or (actual_warning.category==RuntimeWarningand"invalid value encountered"instr(actual_warning.message) and'mips'inplatform.uname()[4]):
Copy file name to clipboardExpand all lines: pandas/io/pytables.py
+10-1
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,10 @@
24
24
overload,
25
25
)
26
26
importwarnings
27
+
importplatform
28
+
importsys
29
+
frompandas.compatimportis_platform_little_endian
30
+
warn_hdf_platform="Non-x86 system detected, HDF(5) format I/O may give wrong results (particularly on files created with older versions) or crash - https://bugs.debian.org/877419"if (((platform.uname()[4].startswith('arm') orplatform.uname()[4].startswith('aarch')) andsys.maxsize<2**33) ornotis_platform_little_endian()) elseFalse
27
31
28
32
importnumpyasnp
29
33
@@ -560,6 +564,8 @@ def __init__(
560
564
fletcher32: bool=False,
561
565
**kwargs,
562
566
) ->None:
567
+
ifwarn_hdf_platform:
568
+
warnings.warn(warn_hdf_platform)
563
569
if"format"inkwargs:
564
570
raiseValueError("format is not a defined argument for HDFStore")
Copy file name to clipboardExpand all lines: pandas/io/stata.py
+4
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,8 @@
29
29
cast,
30
30
)
31
31
importwarnings
32
+
frompandas.compatimportis_platform_little_endian
33
+
warn_stata_platform="Non-x86 system detected, Stata format I/O may give wrong results (particularly on strings) - https://bugs.debian.org/877419"ifnotis_platform_little_endian() elseFalse
32
34
33
35
importnumpyasnp
34
36
@@ -971,6 +973,8 @@ def __init__(self) -> None:
971
973
# NOTE: the byte type seems to be reserved for categorical variables
972
974
# with a label, but the underlying variable is -127 to 100
Copy file name to clipboardExpand all lines: pandas/tests/io/pytables/test_append.py
+5
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,10 @@
22
22
_maybe_remove,
23
23
ensure_clean_store,
24
24
)
25
+
importplatform
26
+
importre
27
+
importsys
28
+
is_crashing_arch=bool((platform.uname()[4].startswith('arm') orplatform.uname()[4].startswith('aarch')) andsys.maxsize<2**33) # meant for armhf, though this form will also skip on armel - uname = kernel arch
Copy file name to clipboardExpand all lines: pandas/tests/io/pytables/test_file_handling.py
+6
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,10 @@
28
28
ensure_clean_store,
29
29
tables,
30
30
)
31
+
importplatform
32
+
importre
33
+
importsys
34
+
is_crashing_arch=bool((platform.uname()[4].startswith('arm') orplatform.uname()[4].startswith('aarch')) andsys.maxsize<2**33) # meant for armhf, though this form will also skip on armel - uname = kernel arch
Copy file name to clipboardExpand all lines: pandas/tests/io/pytables/test_store.py
+5
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,10 @@
30
30
HDFStore,
31
31
read_hdf,
32
32
)
33
+
importplatform
34
+
importre
35
+
importsys
36
+
is_crashing_arch=bool((platform.uname()[4].startswith('arm') orplatform.uname()[4].startswith('aarch')) andsys.maxsize<2**33) # meant for armhf, though this form will also skip on armel - uname = kernel arch
marks=pytest.mark.xfail(condition=notis_platform_little_endian(),reason="known failure of hdf on non-little endian",strict=False,raises=AttributeError)),
0 commit comments