Bug 2319643

Summary: python-cliff fails to build with setuptools 74+
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: python-cliffAssignee: kkula
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: apevec, infra-sig, jcapitao, kevin, kkula, michel, openstack-sig
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-cliff-4.7.0-2.fc42 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-11-16 23:20:33 UTC Type: ---
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: 2300528, 2322407, 2319387    

Description Miro Hrončok 2024-10-18 10:09:17 UTC
Dear package maintainer,

this bugzilla is automated becasue the number of impacted packages it too high to go trough manually.

It appears that your package failed to build with setuptools 74.1.3 and wheel 0.44 in

  https://copr.fedorainfracloud.org/coprs/churchyard/setuptools-74/package/python-cliff/

While it succeeded with setuptools 69.2.0 and wheel 0.43 in

  https://copr.fedorainfracloud.org/coprs/churchyard/setuptools-control/package/python-cliff/

This usually means this package fails to build with setuptools 74+

We plan to update setuptools to version 74 or newer in Fedora 42. This is an approved Fedora 42 Change:

  https://fedoraproject.org/wiki/Changes/Setuptools_74+



Please analyze the failure and fix it in rawhide. Thanks.


You can use the builds from the churchyard/setuptools-74 copr for local testing.

  mock -r fedora-rawhide-x86_64 --addrepo 'https://download.copr.fedorainfracloud.org/results/churchyard/setuptools-74/fedora-rawhide-$basearch/'


One of the most common problems is that the setup.py test command cannot be used. If that is the case here, run the tests in %check differently, e.g. via %pytest, %tox, %{python3} -m unittest, etc.


If you need help, reach out to me in this bugzilla.

Comment 1 Miro Hrončok 2024-10-29 10:58:39 UTC
I plan to update setuptools to 74.x in rawhide this week.

At that point, this package will fail to build from source if not fixed.

Comment 2 Kevin Fenzi 2024-11-10 00:59:13 UTC
So, I took a look... it's the tests that are not happy with new setuptools. 

I tried switching to pytest, but that gets:

=========================== short test summary info ============================
FAILED cliff/tests/test_commandmanager.py::TestLookupAndFind::test - Failed: ...
FAILED cliff/tests/test_commandmanager.py::TestLookupWithRemainder::test - Fa...
FAILED cliff/tests/test_commandmanager.py::TestFindInvalidCommand::test - Fai...
FAILED cliff/tests/test_commandmanager.py::TestLookupAndFindPartialName::test
================== 4 failed, 201 passed, 13 warnings in 0.69s ==================

tox works great if you let it use stestr... but thats undesired due to the circular dependency. 

Totals                                                                                          
======                                                                                          
Ran: 212 tests in 0.1661 sec.                                                                   
 - Passed: 212                                                                                  
 - Skipped: 0                                                                                   
 - Expected Fail: 0                                                                             
 - Unexpected Success: 0                        
 - Failed: 0                                                                                    
Sum of execute time for each test: 0.7714 sec.

Comment 3 Michel Lind 2024-11-11 15:06:41 UTC
I had a package with similar pytest failures, and switching to just unittest works. Worth a try?

Comment 4 Kevin Fenzi 2024-11-15 00:33:15 UTC
Doesn't seem to help here... it uses tox, we just want to not test the way it's setup to test. 
I guess we could make our own tox env, but I am not sure what it would look like.

Comment 5 Miro Hrončok 2024-11-15 10:31:51 UTC
 %check
 # stestr depends on cliff which introduces cyclic dep so i'm avoiding stestr.
-PYTHON=python3 python3 setup.py test
+%{python3} -m unittest



+ /usr/bin/python3 -m unittest
....................................................................................................................................................................................................................
----------------------------------------------------------------------
Ran 212 tests in 0.205s

OK

Comment 6 Kevin Fenzi 2024-11-16 22:43:48 UTC
Ah ha. Stupidly I was doing: 
%{python3} -m unittest test/test-*.py
for some reason. ;( 

That seems to work. Will push that fix. Thank you.

Comment 7 Fedora Update System 2024-11-16 23:17:15 UTC
FEDORA-2024-dfa81e2f10 (python-cliff-4.7.0-2.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-dfa81e2f10

Comment 8 Fedora Update System 2024-11-16 23:20:33 UTC
FEDORA-2024-dfa81e2f10 (python-cliff-4.7.0-2.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.