diff --git a/python-taskw.changes b/python-taskw.changes index f4d4c4d..27a2f33 100644 --- a/python-taskw.changes +++ b/python-taskw.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Aug 20 07:58:12 UTC 2021 - Fusion Future + +- Add taskw-1.3.0-fix-build-with-taskwarrior-2.5.2.patch to fix + build error with taskwarrior >= 2.5.2. + ------------------------------------------------------------------- Tue Dec 8 11:22:08 UTC 2020 - John Vandenberg diff --git a/python-taskw.spec b/python-taskw.spec index aa8acf5..2ab442e 100644 --- a/python-taskw.spec +++ b/python-taskw.spec @@ -1,7 +1,7 @@ # # spec file for package python-taskw # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -25,6 +25,8 @@ License: GPL-3.0-or-later Group: Development/Languages/Python URL: https://github.com/ralphbean/taskw Source: https://files.pythonhosted.org/packages/source/t/taskw/taskw-%{version}.tar.gz +# PATCH-FIX-UPSTREAM taskw-1.3.0-fix-build-with-taskwarrior-2.5.2.patch https://github.com/ralphbean/taskw/compare/81f703bac941be74149d0297ea102afba11efdc8...0fa72d2656a5d220a105aad5d880ab7fb57a49cd.diff +Patch0: taskw-1.3.0-fix-build-with-taskwarrior-2.5.2.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -49,6 +51,7 @@ Python bindings for your taskwarrior database. %prep %setup -q -n taskw-%{version} +%patch0 -p1 %build %python_build diff --git a/taskw-1.3.0-fix-build-with-taskwarrior-2.5.2.patch b/taskw-1.3.0-fix-build-with-taskwarrior-2.5.2.patch new file mode 100644 index 0000000..cea545c --- /dev/null +++ b/taskw-1.3.0-fix-build-with-taskwarrior-2.5.2.patch @@ -0,0 +1,55 @@ +--- a/taskw/test/test_datas.py ++++ b/taskw/test/test_datas.py +@@ -383,7 +383,7 @@ class TestDBShellout(_BaseTestDB): + self.tw.task_add("foobar2") + self.tw.task_add("foobar+") + tasks = self.tw.filter_tasks({ +- 'description.contains': 'foobar+', ++ 'description.contains': '"foobar+"', + }) + assert len(tasks) == 1 + assert tasks[0]['id'] == 3 +@@ -393,7 +393,7 @@ class TestDBShellout(_BaseTestDB): + self.tw.task_add("foobar2") + self.tw.task_add("foobar-") + tasks = self.tw.filter_tasks({ +- 'description.contains': 'foobar-', ++ 'description.contains': '"foobar-"', + }) + assert len(tasks) == 1 + assert tasks[0]['id'] == 3 +@@ -451,7 +451,7 @@ class TestDBShellout(_BaseTestDB): + self.tw.task_add("foobar2") + self.tw.task_add("foo/bar") + tasks = self.tw.filter_tasks({ +- 'description.contains': 'foo/bar', ++ 'description.contains': '"foo/bar"', + }) + assert len(tasks) == 1 + assert tasks[0]['id'] == 3 +--- a/taskw/warrior.py ++++ b/taskw/warrior.py +@@ -412,10 +412,13 @@ class TaskWarriorShellout(TaskWarriorBas + and https://github.com/ralphbean/taskw/issues/30 for more. + """ + DEFAULT_CONFIG_OVERRIDES = { ++ # 'verbose' must be the first param. Otherwise due to ++ # https://github.com/GothenburgBitFactory/taskwarrior/issues/1953 ++ # adding tasks will not work in taskwarrior 2.5.3. ++ 'verbose': 'nothing', + 'json': { + 'array': 'TRUE' + }, +- 'verbose': 'nothing', + 'confirmation': 'no', + 'dependency': { + 'confirmation': 'no', +@@ -773,6 +776,8 @@ class TaskWarriorShellout(TaskWarriorBas + + task_to_modify.pop('uuid', None) + task_to_modify.pop('id', None) ++ # Urgency field is auto-generated and cannot be modified. ++ task_to_modify.pop('urgency', None) + + # Only handle annotation differences if this is an old-style + # task, or if the task itself says annotations have changed.