Bug 2480162

Summary: python-bugzilla fails to build with Python 3.15: 10 tests fail because of the changed pprint output
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-bugzillaAssignee: Cole Robinson <crobinso>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: crobinso, jskarvad, ksurma, mhroncok
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2026-05-25 12:24: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: 2412434    

Description Karolina Surma 2026-05-20 13:57:01 UTC
python-bugzilla fails to build with Python 3.15.0b1.

10 tests fail because of a changed pprint output defaults.
Example failure:
__________________________________ test_query __________________________________
Traceback (most recent call last):
  File "/usr/lib/python3.15/site-packages/_pytest/runner.py", line 353, in from_call
    result: TResult | None = func()
                             ~~~~^^
  File "/usr/lib/python3.15/site-packages/_pytest/runner.py", line 245, in <lambda>
    lambda: runtest_hook(item=item, **kwds),
            ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.15/site-packages/pluggy/_hooks.py", line 512, in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
           ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.15/site-packages/pluggy/_manager.py", line 120, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
           ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.15/site-packages/pluggy/_callers.py", line 167, in _multicall
    raise exception
  File "/usr/lib/python3.15/site-packages/pluggy/_callers.py", line 139, in _multicall
    teardown.throw(exception)
    ~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/usr/lib/python3.15/site-packages/_pytest/logging.py", line 850, in pytest_runtest_call
    yield
  File "/usr/lib/python3.15/site-packages/pluggy/_callers.py", line 139, in _multicall
    teardown.throw(exception)
    ~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/usr/lib/python3.15/site-packages/_pytest/capture.py", line 900, in pytest_runtest_call
    return (yield)
            ^^^^^
  File "/usr/lib/python3.15/site-packages/pluggy/_callers.py", line 139, in _multicall
    teardown.throw(exception)
    ~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/usr/lib/python3.15/site-packages/_pytest/skipping.py", line 268, in pytest_runtest_call
    return (yield)
            ^^^^^
  File "/usr/lib/python3.15/site-packages/pluggy/_callers.py", line 121, in _multicall
    res = hook_impl.function(*args)
  File "/usr/lib/python3.15/site-packages/_pytest/runner.py", line 179, in pytest_runtest_call
    item.runtest()
    ~~~~~~~~~~~~^^
  File "/usr/lib/python3.15/site-packages/_pytest/python.py", line 1720, in runtest
    self.ihook.pytest_pyfunc_call(pyfuncitem=self)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.15/site-packages/pluggy/_hooks.py", line 512, in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
           ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.15/site-packages/pluggy/_manager.py", line 120, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
           ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.15/site-packages/pluggy/_callers.py", line 167, in _multicall
    raise exception
  File "/usr/lib/python3.15/site-packages/pluggy/_callers.py", line 121, in _multicall
    res = hook_impl.function(*args)
  File "/usr/lib/python3.15/site-packages/_pytest/python.py", line 166, in pytest_pyfunc_call
    result = testfunction(**testargs)
  File "/builddir/build/BUILD/python-bugzilla-3.3.0-build/python-bugzilla-3.3.0/tests/test_cli_query.py", line 36, in test_query
    out = run_cli(cmd, fakebz)
  File "/builddir/build/BUILD/python-bugzilla-3.3.0-build/python-bugzilla-3.3.0/tests/conftest.py", line 118, in _do_run
    return tests.utils.do_run_cli(capsys, monkeypatch, *args, **kwargs)
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/python-bugzilla-3.3.0-build/python-bugzilla-3.3.0/tests/utils.py", line 108, in do_run_cli
    bugzilla._cli.main(unittest_bz_instance=bzinstance)
    ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/python-bugzilla-3.3.0-build/python-bugzilla-3.3.0/bugzilla/_cli.py", line 1310, in main
    return _main(unittest_bz_instance)
  File "/builddir/build/BUILD/python-bugzilla-3.3.0-build/python-bugzilla-3.3.0/bugzilla/_cli.py", line 1283, in _main
    buglist = _do_query(bz, opt, parser)
  File "/builddir/build/BUILD/python-bugzilla-3.3.0-build/python-bugzilla-3.3.0/bugzilla/_cli.py", line 631, in _do_query
    return bz.query(q)
           ~~~~~~~~^^^
  File "/builddir/build/BUILD/python-bugzilla-3.3.0-build/python-bugzilla-3.3.0/bugzilla/base.py", line 1356, in query
    bugs, dummy = self.query_return_extra(query)
                  ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^
  File "/builddir/build/BUILD/python-bugzilla-3.3.0-build/python-bugzilla-3.3.0/bugzilla/base.py", line 1328, in query_return_extra
    r = self._backend.bug_search(query)
  File "/builddir/build/BUILD/python-bugzilla-3.3.0-build/python-bugzilla-3.3.0/tests/mockbackend.py", line 76, in bug_search
    return self.__helper(args)
           ~~~~~~~~~~~~~^^^^^^
  File "/builddir/build/BUILD/python-bugzilla-3.3.0-build/python-bugzilla-3.3.0/tests/mockbackend.py", line 48, in __helper
    tests.utils.diff_compare(args, filename, expect_out)
    ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/python-bugzilla-3.3.0-build/python-bugzilla-3.3.0/tests/utils.py", line 86, in diff_compare
    raise AssertionError("Conversion outputs did not match.\n%s" % diff)
AssertionError: Conversion outputs did not match.
--- /builddir/build/BUILD/python-bugzilla-3.3.0-build/python-bugzilla-3.3.0/tests/data/mockargs/test_query1.txt
+++ Generated Output
@@ -1,4 +1,6 @@
-{'component': ['foo', 'bar'],
- 'id': ['1234', '2480'],
- 'include_fields': ['assigned_to', 'id', 'status', 'summary'],
- 'product': ['foo']}
+{
+    'component': ['foo', 'bar'],
+    'id': ['1234', '2480'],
+    'include_fields': ['assigned_to', 'id', 'status', 'summary'],
+    'product': ['foo'],
+}

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

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.15-b1/fedora-rawhide-x86_64/10487674-python-bugzilla/

For all our attempts to build python-bugzilla with Python 3.15, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.15-b1/package/python-bugzilla/

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

Let us know here if you have any questions.

Python 3.15 is planned to be included in Fedora 45.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.15.
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 Karolina Surma 2026-05-25 08:16:57 UTC
This will be reverted in beta2: https://github.com/python/cpython/pull/150249 - I'll close the issue once verified.