Description of problem: python-mock has been deprated in fedora. https://fedoraproject.org/wiki/Changes/DeprecatePythonMock fedpkg still uses it in it's test suite. Version-Release number of selected component (if applicable): fedpkg-1.42-5.fc37 (And every stable version before it) How reproducible: 100% Steps to Reproduce: 1. Comment out "BuildRequires: python3-mock" 2. Create a new srpm 3. Try to build that srpm in Koji, Copr, or mock Actual results: Fails with + /usr/bin/pytest ============================= test session starts ============================== platform linux -- Python 3.10.6, pytest-6.2.5, py-1.11.0, pluggy-1.0.0 rootdir: /builddir/build/BUILD/fedpkg-1.42, configfile: setup.cfg, testpaths: test collected 0 items / 5 errors ==================================== ERRORS ==================================== ____________________ ERROR collecting test/test_bugzilla.py ____________________ ImportError while importing test module '/builddir/build/BUILD/fedpkg-1.42/test/test_bugzilla.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: /usr/lib64/python3.10/importlib/__init__.py:126: in import_module return _bootstrap._gcd_import(name[level:], package, level) test/test_bugzilla.py:14: in <module> from mock import Mock, patch E ModuleNotFoundError: No module named 'mock' ______________________ ERROR collecting test/test_cli.py _______________________ ImportError while importing test module '/builddir/build/BUILD/fedpkg-1.42/test/test_cli.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: /usr/lib64/python3.10/importlib/__init__.py:126: in import_module return _bootstrap._gcd_import(name[level:], package, level) test/test_cli.py:25: in <module> from mock import Mock, PropertyMock, call, patch E ModuleNotFoundError: No module named 'mock' ____________________ ERROR collecting test/test_commands.py ____________________ ImportError while importing test module '/builddir/build/BUILD/fedpkg-1.42/test/test_commands.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: /usr/lib64/python3.10/importlib/__init__.py:126: in import_module return _bootstrap._gcd_import(name[level:], package, level) test/test_commands.py:13: in <module> from mock import Mock, PropertyMock, call, mock_open, patch E ModuleNotFoundError: No module named 'mock' _____________________ ERROR collecting test/test_retire.py _____________________ ImportError while importing test module '/builddir/build/BUILD/fedpkg-1.42/test/test_retire.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: /usr/lib64/python3.10/importlib/__init__.py:126: in import_module return _bootstrap._gcd_import(name[level:], package, level) test/test_retire.py:8: in <module> import mock E ModuleNotFoundError: No module named 'mock' _____________________ ERROR collecting test/test_utils.py ______________________ ImportError while importing test module '/builddir/build/BUILD/fedpkg-1.42/test/test_utils.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: /usr/lib64/python3.10/importlib/__init__.py:126: in import_module return _bootstrap._gcd_import(name[level:], package, level) test/test_utils.py:16: in <module> from mock import Mock, patch E ModuleNotFoundError: No module named 'mock' =========================== short test summary info ============================ ERROR test/test_bugzilla.py ERROR test/test_cli.py ERROR test/test_commands.py ERROR test/test_retire.py ERROR test/test_utils.py !!!!!!!!!!!!!!!!!!! Interrupted: 5 errors during collection !!!!!!!!!!!!!!!!!!!! ============================== 5 errors in 0.23s =============================== Expected results: Tests should pass without python3-mock. Additional info:
This should hopefully be fixed in this upstream commit: https://pagure.io/fedpkg/c/308ac3138c2739feaf1587a598e4d77b7068c936?branch=master
Yes. It is fixed and it allowed us to build fedpkg in epel9 without python3-mock. Thank You