forked from pool/python-taskw
Accepting request 913279 from home:fusionfuture:branches:devel:languages:python
- Add taskw-1.3.0-fix-build-with-taskwarrior-2.5.2.patch to fix build error with taskwarrior >= 2.5.2. OBS-URL: https://build.opensuse.org/request/show/913279 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-taskw?expand=0&rev=5
This commit is contained in:
committed by
Git OBS Bridge
parent
6be092cc8f
commit
2b5300f17b
@@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 20 07:58:12 UTC 2021 - Fusion Future <qydwhotmail@gmail.com>
|
||||
|
||||
- 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 <jayvdb@gmail.com>
|
||||
|
||||
|
@@ -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
|
||||
|
55
taskw-1.3.0-fix-build-with-taskwarrior-2.5.2.patch
Normal file
55
taskw-1.3.0-fix-build-with-taskwarrior-2.5.2.patch
Normal file
@@ -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.
|
Reference in New Issue
Block a user