Bug 2266586

Summary: python-tables fails to build with Python 3.13: AttributeError: module 'unittest' has no attribute 'makeSuite'
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-tablesAssignee: Zbigniew Jędrzejewski-Szmek <zbyszek>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jonathan, ksurma, mhroncok, python-packagers-sig, thibault, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-tables-3.9.2-8.fc41 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-06-10 10:40:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2244836    

Description Karolina Surma 2024-02-28 12:30:08 UTC
python-tables fails to build with Python 3.13.0a4.

+ /usr/bin/python3 -m tables.tests.test_all -v
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
PyTables version:    3.9.2
HDF5 version:        1.12.1
NumPy version:       1.26.4
Numexpr version:     2.8.5 (not using Intel's VML/MKL)
Zlib version:        1.3.0.zlib-ng (in Python interpreter)
LZO version:         2.10 (Mar 01 2017)
BZIP2 version:       1.0.8 (13-Jul-2019)
Blosc version:       1.21.5 (2023-05-16)
Blosc compressors:   blosclz (2.5.1), lz4 (1.9.4), lz4hc (1.9.4), snappy (unknown), zlib (1.3.0.zlib-ng), zstd (1.5.5)
Blosc filters:       shuffle, bitshuffle
Blosc2 version:      2.13.2 (2023-02-07)
Blosc2 compressors:  blosclz (2.5.3), lz4 (1.9.4), lz4hc (1.9.4), zlib (2.1.6), zstd (1.5.5)
Blosc2 filters:      shuffle, bitshuffle
Cython version:      3.0.8
Python version:      3.13.0a4 (main, Feb 21 2024, 00:00:00) [GCC 14.0.1 20240217 (Red Hat 14.0.1-0)]
Platform:            Linux-6.5.6-300.fc39.x86_64-x86_64-with-glibc2.39.9000
Byte-ordering:       little
Detected cores:      4
Default encoding:    utf-8
Default FS encoding: utf-8
Default locale:      (C, UTF-8)
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/builddir/build/BUILDROOT/python-tables-3.9.2-4.fc41.x86_64/usr/lib64/python3.13/site-packages/tables/tests/test_all.py", line 49, in <module>
    common.unittest.main(defaultTest='tb.tests.suite')
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.13/unittest/main.py", line 103, in __init__
    self.parseArgs(argv)
    ~~~~~~~~~~~~~~^^^^^^
  File "/usr/lib64/python3.13/unittest/main.py", line 142, in parseArgs
    self.createTests()
    ~~~~~~~~~~~~~~~~^^
Performing only a light (yet comprehensive) subset of the test suite.
If you want a more complete test, try passing the --heavy flag to this script
(or set the 'heavy' parameter in case you are using tables.test() call).
The whole suite will take more than 4 hours to complete on a relatively
modern CPU and around 512 MB of main memory.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  File "/usr/lib64/python3.13/unittest/main.py", line 153, in createTests
    self.test = self.testLoader.loadTestsFromNames(self.testNames,
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
                                                   self.module)
                                                   ^^^^^^^^^^^^
  File "/usr/lib64/python3.13/unittest/loader.py", line 207, in loadTestsFromNames
    suites = [self.loadTestsFromName(name, module) for name in names]
              ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
  File "/usr/lib64/python3.13/unittest/loader.py", line 192, in loadTestsFromName
    test = obj()
           ~~~^^
  File "/builddir/build/BUILDROOT/python-tables-3.9.2-4.fc41.x86_64/usr/lib64/python3.13/site-packages/tables/tests/test_suite.py", line 59, in suite
    alltests.addTest(test_suite())
                     ~~~~~~~~~~^^
  File "/builddir/build/BUILDROOT/python-tables-3.9.2-4.fc41.x86_64/usr/lib64/python3.13/site-packages/tables/tests/test_attributes.py", line 1858, in suite
    theSuite.addTest(common.unittest.makeSuite(NotCloseCreate))
                     ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.13/unittest/__init__.py", line 80, in __getattr__
    raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
AttributeError: module 'unittest' has no attribute 'makeSuite'

According to https://docs.python.org/3.13/whatsnew/3.13.html:

Removed the following unittest functions, deprecated in Python 3.11:
- unittest.findTestCases()
- unittest.makeSuite()
- unittest.getTestCaseNames()


https://docs.python.org/3.13/whatsnew/3.13.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.13/fedora-rawhide-x86_64/07068267-python-tables/

For all our attempts to build python-tables with Python 3.13, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.13/package/python-tables/

Testing and mass rebuild of packages is happening in copr.
You can follow these instructions to test locally in mock if your package builds with Python 3.13:
https://copr.fedorainfracloud.org/coprs/g/python/python3.13/

Let us know here if you have any questions.

Python 3.13 is planned to be included in Fedora 41.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.13.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires),
so if this package is required a lot, it's important for us to get it fixed soon.

We'd appreciate help from the people who know this package best,
but if you don't want to work on this now, let us know so we can try to work around it on our side.