Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-catkin-pkg for openSUSE:Factory checked in at 2022-03-10 22:45:24 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-catkin-pkg (Old) and /work/SRC/openSUSE:Factory/.python-catkin-pkg.new.2349 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-catkin-pkg" Thu Mar 10 22:45:24 2022 rev:7 rq:960715 version:0.4.24 Changes: -------- --- /work/SRC/openSUSE:Factory/python-catkin-pkg/python-catkin-pkg.changes 2022-01-15 21:45:45.981632090 +0100 +++ /work/SRC/openSUSE:Factory/.python-catkin-pkg.new.2349/python-catkin-pkg.changes 2022-03-11 11:31:43.209947293 +0100 @@ -1,0 +2,8 @@ +Wed Mar 9 11:43:28 UTC 2022 - pgaj...@suse.com + +- do not require mock for build +- added patches + https://github.com/ros-infrastructure/catkin_pkg/commit/b5c6812b40fa31da91ee560dda7c6e470dedcfb8 + + python-catkin-pkg-no-mock.patch + +------------------------------------------------------------------- New: ---- python-catkin-pkg-no-mock.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-catkin-pkg.spec ++++++ --- /var/tmp/diff_new_pack.A9P2sq/_old 2022-03-11 11:31:44.277948546 +0100 +++ /var/tmp/diff_new_pack.A9P2sq/_new 2022-03-11 11:31:44.281948552 +0100 @@ -18,7 +18,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define commands create_pkg find_pkg generate_changelog package_version prepare_release tag_changelog test_changelog - +%define skip_python2 1 Name: python-catkin-pkg Version: 0.4.24 Release: 0 @@ -26,6 +26,8 @@ License: BSD-3-Clause URL: https://wiki.ros.org/catkin_pkg Source: https://github.com/ros-infrastructure/catkin_pkg/archive/%{version}.tar.gz +# https://github.com/ros-infrastructure/catkin_pkg/commit/b5c6812b40fa31da91ee560dda7c6e470dedcfb8.diff +Patch0: python-catkin-pkg-no-mock.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -39,7 +41,6 @@ # SECTION test requirements BuildRequires: %{python_module docutils} BuildRequires: %{python_module flake8} -BuildRequires: %{python_module mock} BuildRequires: %{python_module pyparsing} BuildRequires: %{python_module pytest} BuildRequires: %{python_module python-dateutil} @@ -51,6 +52,7 @@ %prep %setup -q -n catkin_pkg-%{version} +%autopatch -p1 %build %python_build ++++++ python-catkin-pkg-no-mock.patch ++++++ diff --git a/test/test_package.py b/test/test_package.py index 98420c5..1a417b0 100644 --- a/test/test_package.py +++ b/test/test_package.py @@ -20,7 +20,10 @@ Person, ) -from mock import Mock +try: + from unittest.mock import Mock +except ImportError: + from mock import Mock sys.stderr = sys.stdout diff --git a/test/test_package_version.py b/test/test_package_version.py index 6265347..190802b 100644 --- a/test/test_package_version.py +++ b/test/test_package_version.py @@ -9,7 +9,10 @@ from catkin_pkg.package_version import update_changelog_sections from catkin_pkg.package_version import update_versions -import mock +try: + from unittest.mock import Mock +except ImportError: + from mock import Mock from .util import in_temporary_directory @@ -69,7 +72,7 @@ def test_update_changelog_unicode(self, directory=None): temp_file = os.path.join(directory, 'changelog') missing_changelogs_but_forthcoming = {} # Mock the Changelog object from catkin_pkg - mock_changelog = mock.Mock() + mock_changelog = Mock() # Create a changelog entry with a unicode char. mock_changelog.rst = ('^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n' 'Changelog for package fake_pkg\n' diff --git a/test/test_templates.py b/test/test_templates.py index 561ec28..164f1b1 100644 --- a/test/test_templates.py +++ b/test/test_templates.py @@ -8,7 +8,10 @@ create_cmakelists, create_package_files, create_package_xml, PackageTemplate from catkin_pkg.python_setup import generate_distutils_setup -from mock import MagicMock, Mock +try: + from unittest.mock import MagicMock, Mock +except ImportError: + from mock import MagicMock, Mock def u(line): diff --git a/test/test_topological_order.py b/test/test_topological_order.py index 651cb6b..88f44b4 100644 --- a/test/test_topological_order.py +++ b/test/test_topological_order.py @@ -3,7 +3,10 @@ import sys import unittest -from mock import Mock +try: + from mock import Mock +except ImportError: + from unittest.mock import Mock try: from catkin_pkg.topological_order import topological_order_packages, _PackageDecorator, \