Remove python3-mock dependency and use unittest.mock instead
Commit Message
Hello,
As explained in
https://fedoraproject.org/wiki/Changes/RemovePythonMockUsage,
python-mock is now deprecated. We ought to use mock from the python
standard library instead.
Maxwell G submitted a patch to libabigail's Fedora package in Rawhide
at https://src.fedoraproject.org/fork/gotmax23/rpms/libabigail/c/405c5046d84fc6977c75cd42a381f7eb30b3efa7.
I am applying this patch inspired from his work here.
* configure.ac: Do not require python-mock anymore.
* tests/mockfedabipkgdiff.in: Use unittest.mock, not mock from
python-mock.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
---
configure.ac | 2 +-
tests/mockfedabipkgdiff.in | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
@@ -764,7 +764,7 @@ if test x$CHECK_DEPS_FOR_FEDABIPKGDIFF = xyes; then
REQUIRED_PYTHON_MODULES_FOR_FEDABIPKGDIFF="\
argparse logging os re subprocess sys $URLPARSE_MODULE \
- xdg koji mock rpm $IMPORT_MODULE tempfile mimetypes shutil six"
+ xdg koji rpm $IMPORT_MODULE tempfile mimetypes shutil six"
AX_CHECK_PYTHON_MODULES([$REQUIRED_PYTHON_MODULES_FOR_FEDABIPKGDIFF],
[$PYTHON],
@@ -42,7 +42,7 @@ import tempfile
import six
try:
- from mock import patch
+ from unittest.mock import patch
except ImportError:
import sys
six.print_('mock is required to run tests. Please install before running'