Bug 2245852 - python-iniparse fails to build with Python 3.13: AttributeError: module 'unittest' has no attribute 'makeSuite'
Summary: python-iniparse fails to build with Python 3.13: AttributeError: module 'unit...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-iniparse
Version: 40
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ali Erdinc Koroglu
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.13
TreeView+ depends on / blocked
 
Reported: 2023-10-24 11:18 UTC by Karolina Surma
Modified: 2024-09-27 12:54 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-09-27 12:54:41 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Karolina Surma 2023-10-24 11:18:04 UTC
python-iniparse fails to build with Python 3.13.0a1.

+ /usr/bin/python3 ./runtests.py
/builddir/build/BUILD/python-iniparse-0.5/tests/test_ini.py:29: SyntaxWarning: invalid escape sequence '\c'
  ('[se\ct%[ion\t]',     ('se\ct%[ion\t', None, None, -1)),
/builddir/build/BUILD/python-iniparse-0.5/tests/test_ini.py:29: SyntaxWarning: invalid escape sequence '\c'
  ('[se\ct%[ion\t]',     ('se\ct%[ion\t', None, None, -1)),
/builddir/build/BUILD/python-iniparse-0.5/tests/test_fuzz.py:58: SyntaxWarning: invalid escape sequence '\['
  name = re.sub(':|=| |\[', '', name)
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-iniparse-0.5/./runtests.py", line 12, in <module>
    unittest.main(defaultTest='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()
  File "/usr/lib64/python3.13/unittest/main.py", line 153, in createTests
    self.test = self.testLoader.loadTestsFromNames(self.testNames,
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  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/BUILD/python-iniparse-0.5/tests/__init__.py", line 19, in __init__
    test_ini.Suite(),
    ^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/python-iniparse-0.5/tests/test_ini.py", line 411, in __init__
    unittest.makeSuite(TestSectionLine, 'test'),
    ^^^^^^^^^^^^^^^^^^
  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()

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

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

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.

Comment 1 Aoife Moloney 2024-02-15 23:01:17 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 40 development cycle.
Changing version to 40.


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