Bug 2266586 - python-tables fails to build with Python 3.13: AttributeError: module 'unittest' has no attribute 'makeSuite'
Summary: python-tables fails to build with Python 3.13: AttributeError: module 'unitte...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-tables
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Zbigniew Jędrzejewski-Szmek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.13
TreeView+ depends on / blocked
 
Reported: 2024-02-28 12:30 UTC by Karolina Surma
Modified: 2024-06-10 10:40 UTC (History)
6 users (show)

Fixed In Version: python-tables-3.9.2-8.fc41
Clone Of:
Environment:
Last Closed: 2024-06-10 10:40:27 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github PyTables PyTables issues 1166 0 None open Python 3.13.0b1: test run fails, because: AttributeError: module 'unittest' has no attribute 'makeSuite' 2024-05-15 13:42:26 UTC

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.


Note You need to log in before you can comment on or make changes to this bug.