zopefoundation / transaction

Generic transaction implementation for Python.
Other
70 stars 31 forks source link

Fails to build on python 3.13: AttributeError: module 'unittest' has no attribute 'makeSuite' #120

Closed ondrejj closed 1 month ago

ondrejj commented 1 year ago

BUG/PROBLEM REPORT / FEATURE REQUEST

What I did:

python-transaction fails to build on Fedora's python 3.13. Fedora report: https://bugzilla.redhat.com/show_bug.cgi?id=2245866

What actually happened:

python-transaction fails to build with Python 3.13.0a1.

__________________________________ test_suite __________________________________

    def test_suite():
>       return unittest.makeSuite(WeakSetTests)

src/transaction/tests/test_weakset.py:140: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

name = 'makeSuite'

    def __getattr__(name):
        if name == 'IsolatedAsyncioTestCase':
            global IsolatedAsyncioTestCase
            from .async_case import IsolatedAsyncioTestCase
            return IsolatedAsyncioTestCase
>       raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
E       AttributeError: module 'unittest' has no attribute 'makeSuite'

/usr/lib64/python3.13/unittest/__init__.py:80: AttributeError

=========================== short test summary info ============================
FAILED src/transaction/tests/test_weakset.py::test_suite - AttributeError: mo...
================== 1 failed, 176 passed, 2 warnings in 0.28s ===================

What version of Python and Zope/Addons I am using:

Fedora rawhide (Fedora 41), Python 3.13.0a1.

dataflake commented 1 month ago

I believe this issue is obsolete, there is no occurrence of makeSuite in the test code anymore and the tests for Python 3.13 run fine.