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
187
188
# Ignore EncodingWarnings from other libraries
188
189
continue
190
+
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
@@ -559,6 +563,8 @@ def __init__(
559
563
fletcher32: bool=False,
560
564
**kwargs,
561
565
) ->None:
566
+
ifwarn_hdf_platform:
567
+
warnings.warn(warn_hdf_platform)
562
568
if"format"inkwargs:
563
569
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
@@ -30,6 +30,8 @@
30
30
cast,
31
31
)
32
32
importwarnings
33
+
frompandas.compatimportis_platform_little_endian
34
+
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
33
35
34
36
importnumpyasnp
35
37
@@ -976,6 +978,8 @@ def __init__(self) -> None:
976
978
# NOTE: the byte type seems to be reserved for categorical variables
977
979
# 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
@@ -21,6 +21,10 @@
21
21
_maybe_remove,
22
22
ensure_clean_store,
23
23
)
24
+
importplatform
25
+
importre
26
+
importsys
27
+
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
@@ -26,6 +26,10 @@
26
26
ensure_clean_store,
27
27
tables,
28
28
)
29
+
importplatform
30
+
importre
31
+
importsys
32
+
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
@@ -29,6 +29,10 @@
29
29
HDFStore,
30
30
read_hdf,
31
31
)
32
+
importplatform
33
+
importre
34
+
importsys
35
+
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