Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-flower for openSUSE:Factory checked in at 2022-05-17 17:24:54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-flower (Old) and /work/SRC/openSUSE:Factory/.python-flower.new.1538 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-flower" Tue May 17 17:24:54 2022 rev:7 rq:977777 version:1.0.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-flower/python-flower.changes 2022-01-11 23:42:39.778963369 +0100 +++ /work/SRC/openSUSE:Factory/.python-flower.new.1538/python-flower.changes 2022-05-17 17:25:16.387216639 +0200 @@ -1,0 +2,14 @@ +Tue May 17 12:28:23 UTC 2022 - [email protected] + +- version update to 1.0.0 + * no upstream changelog file found + * Remove flower as individual command. +- modified patches + % backport_run_in_executor.patch (refreshed) +- deleted patches + - pr_1021.patch (upstreamed) +- added patches + fix https://github.com/mher/flower/commit/70b1ae40b467a3febab9abef3ef52dea56ca6f12 + + python-flower-new-humanize.patch + +------------------------------------------------------------------- Old: ---- flower-0.9.7.tar.gz pr_1021.patch New: ---- flower-1.0.0.tar.gz python-flower-new-humanize.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-flower.spec ++++++ --- /var/tmp/diff_new_pack.sQlWQS/_old 2022-05-17 17:25:16.863217070 +0200 +++ /var/tmp/diff_new_pack.sQlWQS/_new 2022-05-17 17:25:16.867217074 +0200 @@ -18,7 +18,7 @@ %bcond_without python2 Name: python-flower -Version: 0.9.7 +Version: 1.0.0 Release: 0 Summary: A web frontend for monitoring and administrating Celery clusters License: BSD-3-Clause @@ -27,7 +27,8 @@ Source: https://files.pythonhosted.org/packages/source/f/flower/flower-%{version}.tar.gz # Tornado 5+ update blocked by salt, so backport the missing piece Patch0: backport_run_in_executor.patch -Patch1: pr_1021.patch +# https://github.com/mher/flower/commit/70b1ae40b467a3febab9abef3ef52dea56ca6f12 +Patch1: python-flower-new-humanize.patch BuildRequires: %{python_module Babel >= 1.0} BuildRequires: %{python_module celery >= 5.0.0} BuildRequires: %{python_module certifi} @@ -63,31 +64,21 @@ Flower is a web based tool for monitoring and administrating Celery clusters. %prep -%setup -q -n flower-%{version} -%patch0 -p1 -%patch1 -p1 +%autosetup -p1 -n flower-%{version} %build %python_build %install %python_install -%python_clone -a %{buildroot}%{_bindir}/flower %python_expand %fdupes %{buildroot}%{$python_sitelib} -%post -%python_install_alternative flower - -%postun -%python_uninstall_alternative flower - %check %pytest %files %{python_files} %license LICENSE -%doc CHANGES README.rst +%doc README.rst %{python_sitelib}/* -%python_alternative %{_bindir}/flower %changelog ++++++ backport_run_in_executor.patch ++++++ --- /var/tmp/diff_new_pack.sQlWQS/_old 2022-05-17 17:25:16.891217095 +0200 +++ /var/tmp/diff_new_pack.sQlWQS/_new 2022-05-17 17:25:16.895217100 +0200 @@ -7,11 +7,11 @@ flower/api/tasks.py | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) -diff --git a/flower/api/tasks.py b/flower/api/tasks.py -index 1f172422..f0395dea 100644 ---- a/flower/api/tasks.py -+++ b/flower/api/tasks.py -@@ -78,6 +78,24 @@ def safe_result(self, result): +Index: flower-1.0.0/flower/api/tasks.py +=================================================================== +--- flower-1.0.0.orig/flower/api/tasks.py ++++ flower-1.0.0/flower/api/tasks.py +@@ -83,6 +83,24 @@ class BaseTaskHandler(BaseHandler): return result @@ -36,7 +36,7 @@ class TaskApply(BaseTaskHandler): @web.authenticated @gen.coroutine -@@ -138,8 +156,7 @@ def post(self, taskname): +@@ -143,8 +161,7 @@ Execute a task by name and wait results result = task.apply_async(args=args, kwargs=kwargs, **options) response = {'task-id': result.task_id} ++++++ flower-0.9.7.tar.gz -> flower-1.0.0.tar.gz ++++++ ++++ 2141 lines of diff (skipped) ++++++ python-flower-new-humanize.patch ++++++ diff --git a/flower/utils/__init__.py b/flower/utils/__init__.py index 45289d51..29486ac9 100644 --- a/flower/utils/__init__.py +++ b/flower/utils/__init__.py @@ -20,11 +20,11 @@ def bugreport(app=None): return 'flower -> flower:%s tornado:%s humanize:%s%s' % ( __version__, tornado.version, - humanize.VERSION, + humanize.__version__, app.bugreport() ) - except (ImportError, AttributeError): - return 'Unknown Celery version' + except (ImportError, AttributeError) as e: + return f"Error when generating bug report: {e}. Have you installed correct versions of Flower's dependencies?" def abs_path(path): diff --git a/requirements/default.txt b/requirements/default.txt index 93c831ef..9ffa2f89 100644 --- a/requirements/default.txt +++ b/requirements/default.txt @@ -1,5 +1,5 @@ celery>=5.0.5 tornado>=5.0.0,<7.0.0 prometheus_client>=0.8.0 -humanize +humanize==3.12.0 pytz diff --git a/tests/unit/utils/test_utils.py b/tests/unit/utils/test_utils.py index a0032619..4e4fada4 100644 --- a/tests/unit/utils/test_utils.py +++ b/tests/unit/utils/test_utils.py @@ -1,4 +1,5 @@ import unittest +from unittest.mock import Mock from flower.utils import bugreport from celery import Celery @@ -7,7 +8,7 @@ class BugreportTests(unittest.TestCase): def test_default(self): report = bugreport() - self.assertFalse('Unknown Celery version' in report) + self.assertFalse('Error when generating bug report' in report) self.assertTrue('tornado' in report) self.assertTrue('humanize' in report) self.assertTrue('celery' in report) @@ -15,7 +16,15 @@ def test_default(self): def test_with_app(self): app = Celery() report = bugreport(app) - self.assertFalse('Unknown Celery version' in report) + self.assertFalse('Error when generating bug report' in report) self.assertTrue('tornado' in report) self.assertTrue('humanize' in report) self.assertTrue('celery' in report) + + def test_when_unable_to_generate_report(self): + fake_app = Mock() + fake_app.bugreport.side_effect = ImportError('import error message') + report = bugreport(fake_app) + self.assertTrue('Error when generating bug report' in report) + self.assertTrue('import error message' in report) + self.assertTrue("Have you installed correct versions of Flower's dependencies?" in report)
