Bug 2040168

Summary: dnf fails to build with Python 3.11: AssertionError: False is not true
Product: [Fedora] Fedora Reporter: Tomáš Hrnčiar <thrnciar>
Component: dnfAssignee: amatej
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: amatej, daniel.mach, jmracek, jrohel, mblaha, mhatina, mhroncok, packaging-team-maint, pkratoch, rpm-software-management, thrnciar, vmukhame
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dnf-4.11.1-1.fc37 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-14 13:09:51 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: 2016048    

Description Tomáš Hrnčiar 2022-01-13 07:19:43 UTC
dnf fails to build with Python 3.11.0a3.

1: ======================================================================
1: FAIL: test_ex_IOError_logs_traceback (tests.test_main.MainTest)
1: Test whether the traceback is logged if an error is raised.
1: ----------------------------------------------------------------------
1: Traceback (most recent call last):
1:   File "/builddir/build/BUILD/dnf-4.10.0/tests/test_main.py", line 45, in test_ex_IOError_logs_traceback
1:     self.assertTracebackIn('OSError: test_ex_IOError_logs_traceback\n',
1:     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1:   File "/builddir/build/BUILD/dnf-4.10.0/tests/support.py", line 609, in assertTracebackIn
1:     self.assertTrue(any(trace.endswith(end) for trace in traces))
1:     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1: AssertionError: False is not true
1: 
1: ======================================================================
1: FAIL: test_logs_traceback (tests.test_plugin.PluginNonExistentTest)
1: Test whether the traceback is logged if a plugin cannot be imported.
1: ----------------------------------------------------------------------
1: Traceback (most recent call last):
1:   File "/builddir/build/BUILD/dnf-4.10.0/tests/test_plugin.py", line 108, in test_logs_traceback
1:     self.assertTracebackIn(end, stream.getvalue())
1:     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1:   File "/builddir/build/BUILD/dnf-4.10.0/tests/support.py", line 609, in assertTracebackIn
1:     self.assertTrue(any(trace.endswith(end) for trace in traces))
1:     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1: AssertionError: False is not true
1: 
1: ----------------------------------------------------------------------
1: Ran 796 tests in 2.842s
1: 
1: FAILED (failures=2, skipped=1)
1/1 Test #1: test .............................***Failed    3.49 sec


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

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.11/fedora-rawhide-x86_64/03141893-dnf/

For all our attempts to build dnf with Python 3.11, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.11/package/dnf/

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.11:
https://copr.fedorainfracloud.org/coprs/g/python/python3.11/

Let us know here if you have any questions.

Python 3.11 is planned to be included in Fedora 37. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.11.
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 2 Ben Cotton 2022-02-08 21:12:16 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 36 development cycle.
Changing version to 36.

Comment 3 Fedora Update System 2022-03-14 13:07:27 UTC
FEDORA-2022-e119fcc7d5 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-e119fcc7d5

Comment 4 Fedora Update System 2022-03-14 13:09:51 UTC
FEDORA-2022-e119fcc7d5 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.