Bug#1061235: pandas: Unittest fail with PyTables 3.9.2

Antonio Valentino antonio.valentino at tiscali.it
Sun Jan 21 08:53:50 GMT 2024


Source: pandas
Version: 1.5.3+dfsg-10
Severity: normal
Tags: ftbfs
X-Debbugs-Cc: antonio.valentino at tiscali.it

Dear Maintainer,

after the update of PyTables to v3.9.2 we observe a test failure in 
Pandas 1.5.3
that prevents the migration of PyTables to testing.

It is just one single test failing. Please find below the relevant part 
of the test loh:

1008s =================================== FAILURES 
===================================
1008s ________________________________ test_complibs 
_________________________________
1008s 1008s setup_path = 'tmp.__c4b81039-45a4-414b-a25e-574aafd8d539__.h5'
1008s 1008s     def test_complibs(setup_path):
1008s         # GH14478
1008s         df = tm.makeDataFrame()
1008s     1008s         # Building list of all complibs and complevels 
tuples
1008s         all_complibs = tables.filters.all_complibs
1008s         # Remove lzo if its not available on this platform
1008s         if not tables.which_lib_version("lzo"):
1008s             all_complibs.remove("lzo")
1008s         # Remove bzip2 if its not available on this platform
1008s         if not tables.which_lib_version("bzip2"):
1008s             all_complibs.remove("bzip2")
1008s     1008s         all_levels = range(0, 10)
1008s         all_tests = [(lib, lvl) for lib in all_complibs for lvl in 
all_levels]
1008s     1008s         for (lib, lvl) in all_tests:
1008s             with ensure_clean_path(setup_path) as tmpfile:
1008s                 gname = "foo"
1008s     1008s                 # Write and read file to see if data is 
consistent
1008s                 df.to_hdf(tmpfile, gname, complib=lib, complevel=lvl)
1008s                 result = read_hdf(tmpfile, gname)
1008s                 tm.assert_frame_equal(result, df)
1008s     1008s                 # Open file and check metadata
1008s                 # for correct amount of compression
1008s                 h5table = tables.open_file(tmpfile, mode="r")
1008s                 for node in h5table.walk_nodes(where="/" + gname, 
classname="Leaf"):
1008s                     assert node.filters.complevel == lvl
1008s                     if lvl == 0:
1008s                         assert node.filters.complib is None
1008s                     else:
1008s >                       assert node.filters.complib == lib
1008s E                       AssertionError: assert 'blosc2:blosclz' == 
'blosc2'
1008s E                         - blosc2
1008s E                         + blosc2:blosclz
1008s 1008s 
/usr/lib/python3/dist-packages/pandas/tests/io/pytables/test_file_handling.py:266: 
AssertionError
1008s =============================== warnings summary 
===============================

[CUT]

1008s -- Docs: 
https://docs.pytest.org/en/stable/how-to/capture-warnings.html
1008s =========================== short test summary info 
============================
1008s FAILED 
../../../../usr/lib/python3/dist-packages/pandas/tests/io/pytables/test_file_handling.py::test_complibs
1008s = 1 failed, 10375 passed, 2570 skipped, 129 xfailed, 3 xpassed, 
116 warnings in 206.35s (0:03:26) =


The probles seems more related to an issue in the test code rather then 
a real bug in PyTables or Pandas.
Indeed the SW correctly report both the main compressor type, "blosc2" 
and also the specific compression
filter by blosc2, "blosclz" in this case.

kind regards
antonio


-- System Information:
Debian Release: trixie/sid
   APT prefers unstable
   APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 6.5.0-14-generic (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: unable to detect



More information about the debian-science-maintainers mailing list