15
0
forked from pool/python-taskw

- Add patch support-pytest-8.patch:

* Support pytest 8.
- Switch to autosetup and pyproject macros.
- No more greedy globs in %files.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-taskw?expand=0&rev=10
This commit is contained in:
2024-08-28 03:51:40 +00:00
committed by Git OBS Bridge
commit deab56680b
6 changed files with 260 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

59
python-taskw.changes Normal file
View File

@@ -0,0 +1,59 @@
-------------------------------------------------------------------
Wed Aug 28 03:47:09 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
- Add patch support-pytest-8.patch:
* Support pytest 8.
- Switch to autosetup and pyproject macros.
- No more greedy globs in %files.
-------------------------------------------------------------------
Tue Sep 13 14:57:40 UTC 2022 - pgajdos@suse.com
- version update to 2.0.0
* This release is functionally identical to 1.3.1, but drops support for
older versions of Python. Before upgrading to this version of Taskw,
make sure you're running Python 3.5 or newer.
* does not require python-six
-------------------------------------------------------------------
Wed Feb 16 20:10:57 UTC 2022 - Dirk Müller <dmueller@suse.com>
- update to 1.3.1:
* Adds support for Taskwarrior 2.6.0
* Fixes changelog syntax
* Add tests for pull requests
- drop taskw-1.3.0-fix-build-with-taskwarrior-2.5.2.patch (upstream)
-------------------------------------------------------------------
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>
- Update to v1.3.0
* Pass taskrc via environment variable to subprocess.
* Adds testing for Python 3.7 and 3.8
* Fix error raised when taskwarrior is not installed.
* Fix bug on deletion of completed task; disable confirmation for
recurring tasks; fix bug in numeric deserialization.
* Fixes bug in which UUIDs were improperly parsed
when creating recurring tasks.
* Fix a bug in which configuration values having an equal
sign in their value would be improperly parsed.
* Switched from nose to pytest.
* Dropped automated testing for Python 3.4.
-------------------------------------------------------------------
Sat Oct 19 13:19:31 UTC 2019 - John Vandenberg <jayvdb@gmail.com>
- Activate test suite
- Use single spec to add Python 3 support and tidy spec
- Update to v1.2.0
-------------------------------------------------------------------
Tue Jan 5 23:45:19 UTC 2016 - sleep_walker@opensuse.org
- Initial spec for v1.1.0

69
python-taskw.spec Normal file
View File

@@ -0,0 +1,69 @@
#
# spec file for package python-taskw
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: python-taskw
Version: 2.0.0
Release: 0
Summary: Python bindings for taskwarrior
License: GPL-3.0-or-later
URL: https://github.com/ralphbean/taskw
Source: https://files.pythonhosted.org/packages/source/t/taskw/taskw-%{version}.tar.gz
# PATCH-FIX-UPSTREAM gh#ralphbean/taskw#169
Patch0: support-pytest-8.patch
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-kitchen
Requires: python-python-dateutil
Requires: python-pytz
Requires: taskwarrior
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module kitchen}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module python-dateutil}
BuildRequires: %{python_module pytz}
BuildRequires: taskwarrior
# /SECTION
%python_subpackages
%description
Python bindings for your taskwarrior database.
%prep
%autosetup -p1 -n taskw-%{version}
%build
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%pytest -k 'not test_filtering_brace'
%files %{python_files}
%doc README.rst
%license LICENSE.txt
%{python_sitelib}/taskw
%{python_sitelib}/taskw-%{version}.dist-info
%changelog

105
support-pytest-8.patch Normal file
View File

@@ -0,0 +1,105 @@
From 6d5af74c29261035c95caec1c18002b2cd6195b7 Mon Sep 17 00:00:00 2001
From: Jochen Sprickerhof <jspricke@debian.org>
Date: Thu, 28 Mar 2024 08:17:39 +0100
Subject: [PATCH] Fix tests with new pytest
Use unittest.TestCase and __test__ to ignore test base class.
---
taskw/test/test_datas.py | 8 ++++++--
taskw/test/test_recursive.py | 5 +++--
taskw/test/test_utils.py | 5 +++--
3 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/taskw/test/test_datas.py b/taskw/test/test_datas.py
index 1a3667c..21b4441 100644
--- a/taskw/test/test_datas.py
+++ b/taskw/test/test_datas.py
@@ -6,6 +6,7 @@
import pytest
+from unittest import TestCase
from taskw import TaskWarriorDirect, TaskWarriorShellout
@@ -16,8 +17,9 @@
'uuid': "c1c431ea-f0dc-4683-9a20-e64fcfa65fd1"}
-class _BaseTestDB(object):
- def setup(self):
+class _BaseTestDB(TestCase):
+ __test__ = False
+ def setUp(self):
# Sometimes the 'task' command line tool is not installed.
if self.should_skip():
@@ -330,6 +332,7 @@ def test_load_tasks_with_one_each(self):
class TestDBDirect(_BaseTestDB):
+ __test__ = True
class_to_test = TaskWarriorDirect
def test_delete_completed(self):
@@ -345,6 +348,7 @@ def should_skip(self):
class TestDBShellout(_BaseTestDB):
+ __test__ = True
class_to_test = TaskWarriorShellout
def should_skip(self):
diff --git a/taskw/test/test_recursive.py b/taskw/test/test_recursive.py
index 1ab99e1..88519b2 100644
--- a/taskw/test/test_recursive.py
+++ b/taskw/test/test_recursive.py
@@ -4,6 +4,7 @@
import pytest
+from unittest import TestCase
from taskw import TaskWarriorShellout
@@ -14,8 +15,8 @@
'uuid': "c1c431ea-f0dc-4683-9a20-e64fcfa65fd1"}
-class TestRecursibe(object):
- def setup(self):
+class TestRecursibe(TestCase):
+ def setUp(self):
if not TaskWarriorShellout.can_use():
# Sometimes the 'task' command line tool is not installed.
pytest.skip("taskwarrior not installed")
diff --git a/taskw/test/test_utils.py b/taskw/test/test_utils.py
index c57dd38..8c6c1df 100644
--- a/taskw/test/test_utils.py
+++ b/taskw/test/test_utils.py
@@ -4,6 +4,7 @@
import dateutil.tz
import pytz
+from unittest import TestCase
from taskw.utils import (
convert_dict_to_override_args,
decode_task,
@@ -31,7 +32,7 @@ def shuffled(l):
return new
-class TestUtils(object):
+class TestUtils(TestCase):
def test_no_side_effects(self):
orig = TASK.copy()
@@ -187,7 +188,7 @@ def test_convert_dict_to_override_args(self):
assert set(actual_overrides) == set(expected_overrides)
-class TestCleanExecArg(object):
+class TestCleanExecArg(TestCase):
def test_clean_null(self):
assert b"" == clean_ctrl_chars(b"\x00")

3
taskw-2.0.0.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1109bdf9bde7a9b32a5007a302c878303ff65188b64225ac74a3289a4c548bdd
size 42577