Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-tasklib for openSUSE:Factory 
checked in at 2022-02-02 22:41:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-tasklib (Old)
 and      /work/SRC/openSUSE:Factory/.python-tasklib.new.1898 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-tasklib"

Wed Feb  2 22:41:42 2022 rev:4 rq:950640 version:2.4.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-tasklib/python-tasklib.changes    
2021-04-10 15:28:59.098491925 +0200
+++ /work/SRC/openSUSE:Factory/.python-tasklib.new.1898/python-tasklib.changes  
2022-02-02 22:42:38.667031328 +0100
@@ -1,0 +2,9 @@
+Wed Feb  2 06:24:49 UTC 2022 - Steve Kowalik <[email protected]>
+
+- Update to 2.4.3:
+  * Support for Taskwarrior 2.6
+  * Support for tzlocal>=3.0
+  * Official support for Python 3.9 in the test matrix 
+- Rewrite disable-windows-test.patch to be suitable for upstream
+
+-------------------------------------------------------------------

Old:
----
  tasklib-2.3.0.tar.gz

New:
----
  tasklib-2.4.3.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-tasklib.spec ++++++
--- /var/tmp/diff_new_pack.EuHTWf/_old  2022-02-02 22:42:39.219027586 +0100
+++ /var/tmp/diff_new_pack.EuHTWf/_new  2022-02-02 22:42:39.223027559 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-tasklib
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %define skip_python2 1
 Name:           python-tasklib
-Version:        2.3.0
+Version:        2.4.3
 Release:        0
 Summary:        Python Task Warrior library
 License:        BSD-3-Clause
@@ -32,11 +32,11 @@
 BuildRequires:  %{python_module tzlocal}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
-BuildRequires:  taskwarrior >= 2.1.0
+BuildRequires:  taskwarrior >= 2.4.0
 Requires:       python-pytz
 Requires:       python-six >= 1.4
 Requires:       python-tzlocal
-Requires:       taskwarrior >= 2.1.0
+Requires:       taskwarrior >= 2.4.0
 BuildArch:      noarch
 %python_subpackages
 

++++++ disable-windows-test.patch ++++++
--- /var/tmp/diff_new_pack.EuHTWf/_old  2022-02-02 22:42:39.247027397 +0100
+++ /var/tmp/diff_new_pack.EuHTWf/_new  2022-02-02 22:42:39.251027369 +0100
@@ -1,25 +1,13 @@
-Index: tasklib-1.3.0/tasklib/tests.py
+Index: tasklib-2.4.3/tasklib/tests.py
 ===================================================================
---- tasklib-1.3.0.orig/tasklib/tests.py
-+++ tasklib-1.3.0/tasklib/tests.py
-@@ -64,19 +64,6 @@ class TasklibTest(unittest.TestCase):
-         shutil.rmtree(self.tmp)
+--- tasklib-2.4.3.orig/tasklib/tests.py
++++ tasklib-2.4.3/tasklib/tests.py
+@@ -66,6 +66,7 @@ class TasklibTest(unittest.TestCase):
  
+ class TaskWarriorTest(TasklibTest):
  
--class TaskWarriorTest(TasklibTest):
--
--    def test_custom_command(self):
--        # ensure that a custom command which contains multiple parts
--        # is properly split up
--        tw = self.get_taskwarrior(
--            task_command='wsl task',
--            # prevent `_get_version` from running as `wsl` may not exist
--            version_override=os.getenv('TASK_VERSION'),
--        )
--        self.assertEqual(tw._get_task_command(), ['wsl', 'task'])
--
--
- class TaskFilterTest(TasklibTest):
- 
-     def test_all_empty(self):
++    @unittest.skipUnless(sys.platform.startswith("win"), "requires Windows")
+     def test_custom_command(self):
+         # ensure that a custom command which contains multiple parts
+         # is properly split up
 

++++++ tasklib-2.3.0.tar.gz -> tasklib-2.4.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tasklib-2.3.0/PKG-INFO new/tasklib-2.4.3/PKG-INFO
--- old/tasklib-2.3.0/PKG-INFO  2021-01-03 10:20:58.796053200 +0100
+++ new/tasklib-2.4.3/PKG-INFO  2021-10-10 16:34:21.336986800 +0200
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: tasklib
-Version: 2.3.0
-Summary: Python Task Warrior library
-Home-page: https://github.com/robgolding/tasklib
-Author: Rob Golding
-Author-email: [email protected]
+Version: 2.4.3
+Summary: Official Taskwarrior library for Python
+Home-page: https://github.com/GothenburgBitFactory/tasklib
+Author: GothenburgBitFactory
+Author-email: [email protected]
 License: BSD
-Download-URL: https://github.com/robgolding/tasklib/downloads
+Download-URL: https://github.com/GothenburgBitFactory/tasklib/downloads
 Description: tasklib
         =======
         
@@ -23,7 +23,7 @@
         ------------
         
         * Python 3.5 or above
-        * taskwarrior_ v2.1.x or above.
+        * taskwarrior_ v2.4.x or above.
         
         Older versions of taskwarrior are untested and may not work.
         
@@ -62,13 +62,18 @@
         .. _documentation: http://tasklib.readthedocs.org/en/latest/
         
 Platform: UNKNOWN
-Classifier: Development Status :: 4 - Beta
+Classifier: Development Status :: 6 - Mature
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 3
 Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
 Classifier: Programming Language :: Python :: 3.7
 Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: 3.9
+Classifier: Programming Language :: Python :: 3.10
 Classifier: License :: OSI Approved :: BSD License
 Classifier: Topic :: Software Development :: Libraries :: Python Modules
 Classifier: Intended Audience :: Developers
+Classifier: Intended Audience :: Information Technology
+Classifier: Intended Audience :: System Administrators
+Classifier: Operating System :: OS Independent
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tasklib-2.3.0/README.rst new/tasklib-2.4.3/README.rst
--- old/tasklib-2.3.0/README.rst        2021-01-03 10:18:26.000000000 +0100
+++ new/tasklib-2.4.3/README.rst        2021-10-10 16:34:03.000000000 +0200
@@ -14,7 +14,7 @@
 ------------
 
 * Python 3.5 or above
-* taskwarrior_ v2.1.x or above.
+* taskwarrior_ v2.4.x or above.
 
 Older versions of taskwarrior are untested and may not work.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tasklib-2.3.0/setup.py new/tasklib-2.4.3/setup.py
--- old/tasklib-2.3.0/setup.py  2021-01-03 10:18:26.000000000 +0100
+++ new/tasklib-2.4.3/setup.py  2021-10-10 16:34:09.000000000 +0200
@@ -2,7 +2,7 @@
 
 install_requirements = ['pytz', 'tzlocal']
 
-version = '2.3.0'
+version = '2.4.3'
 
 try:
     import importlib
@@ -12,27 +12,32 @@
 setup(
     name='tasklib',
     version=version,
-    description='Python Task Warrior library',
+    description='Official Taskwarrior library for Python',
     long_description=open('README.rst').read(),
-    author='Rob Golding',
-    author_email='[email protected]',
+    author='GothenburgBitFactory',
+    author_email='[email protected]',
     license='BSD',
-    url='https://github.com/robgolding/tasklib',
-    download_url='https://github.com/robgolding/tasklib/downloads',
+    url='https://github.com/GothenburgBitFactory/tasklib',
+    download_url='https://github.com/GothenburgBitFactory/tasklib/downloads',
     packages=find_packages(),
     include_package_data=True,
     test_suite='tasklib.tests',
     install_requires=install_requirements,
     classifiers=[
-        'Development Status :: 4 - Beta',
+        'Development Status :: 6 - Mature',
         'Programming Language :: Python',
         "Programming Language :: Python :: 3",
         "Programming Language :: Python :: 3.5",
         "Programming Language :: Python :: 3.6",
         "Programming Language :: Python :: 3.7",
         "Programming Language :: Python :: 3.8",
+        "Programming Language :: Python :: 3.9",
+        "Programming Language :: Python :: 3.10",
         'License :: OSI Approved :: BSD License',
         'Topic :: Software Development :: Libraries :: Python Modules',
         'Intended Audience :: Developers',
+        'Intended Audience :: Information Technology',
+        'Intended Audience :: System Administrators',
+        'Operating System :: OS Independent'
     ],
 )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tasklib-2.3.0/tasklib/__init__.py 
new/tasklib-2.4.3/tasklib/__init__.py
--- old/tasklib-2.3.0/tasklib/__init__.py       2021-01-03 10:18:26.000000000 
+0100
+++ new/tasklib-2.4.3/tasklib/__init__.py       2021-10-10 16:34:09.000000000 
+0200
@@ -2,4 +2,4 @@
 from .task import Task
 from .serializing import local_zone
 
-__version__ = '2.3.0'
+__version__ = '2.4.3'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tasklib-2.3.0/tasklib/backends.py 
new/tasklib-2.4.3/tasklib/backends.py
--- old/tasklib-2.3.0/tasklib/backends.py       2020-09-10 21:38:17.000000000 
+0200
+++ new/tasklib-2.4.3/tasklib/backends.py       2021-10-10 16:34:03.000000000 
+0200
@@ -84,9 +84,6 @@
 
 class TaskWarrior(Backend):
 
-    VERSION_2_1_0 = '2.1.0'
-    VERSION_2_2_0 = '2.2.0'
-    VERSION_2_3_0 = '2.3.0'
     VERSION_2_4_0 = '2.4.0'
     VERSION_2_4_1 = '2.4.1'
     VERSION_2_4_2 = '2.4.2'
@@ -218,31 +215,17 @@
         )
 
     def format_description(self, task):
-        # Task version older than 2.4.0 ignores first word of the
-        # task description if description: prefix is used
-        if self.version < self.VERSION_2_4_0:
-            return task._data['description']
-        else:
-            return "description:'{0}'".format(
-                task._data['description'] or '',
-            )
+        return "description:'{0}'".format(
+            task._data['description'] or '',
+        )
 
     def convert_datetime_string(self, value):
-
-        if self.version >= self.VERSION_2_4_0:
-            # For strings, use 'calc' to evaluate the string to datetime
-            # available since TW 2.4.0
-            args = value.split()
-            result = self.execute_command(['calc'] + args)
-            naive = datetime.datetime.strptime(result[0], DATE_FORMAT_CALC)
-            localized = local_zone.localize(naive)
-        else:
-            raise ValueError(
-                'Provided value could not be converted to '
-                'datetime, its type is not supported: {}'
-                .format(type(value)),
-            )
-
+        # For strings, use 'calc' to evaluate the string to datetime
+        # available since TW 2.4.0
+        args = value.split()
+        result = self.execute_command(['calc'] + args)
+        naive = datetime.datetime.strptime(result[0], DATE_FORMAT_CALC)
+        localized = local_zone.localize(naive)
         return localized
 
     @property
@@ -329,7 +312,7 @@
 
     def filter_tasks(self, filter_obj):
         self.enforce_recurrence()
-        args = ['export'] + filter_obj.get_filter_params()
+        args = filter_obj.get_filter_params() + ["export"]
         tasks = []
         for line in self.execute_command(args):
             if line:
@@ -347,7 +330,10 @@
 
         args = [task['uuid'], 'modify'] if task.saved else ['add']
         args.extend(self._get_modified_task_fields_as_args(task))
-        output = self.execute_command(args)
+        output = self.execute_command(
+            args,
+            config_override={'verbose': 'new-uuid'}
+        )
 
         # Parse out the new ID, if the task is being added for the first time
         if not task.saved:
@@ -355,8 +341,8 @@
 
             # Complain loudly if it seems that more tasks were created
             # Should not happen.
-            # Expected output: Created task 1.
-            #                  Created task 1 (recurrence template).
+            # Expected output: Created task 
bd23f69a-a078-48a4-ac11-afba0643eca9.
+            #                  Created task 
bd23f69a-a078-48a4-ac11-afba0643eca9 (recurrence template).
             if len(id_lines) != 1 or len(id_lines[0].split(' ')) not in (3, 5):
                 raise TaskWarriorException(
                     'Unexpected output when creating '
@@ -366,11 +352,8 @@
             # Circumvent the ID storage, since ID is considered read-only
             identifier = id_lines[0].split(' ')[2].rstrip('.')
 
-            # Identifier can be either ID or UUID for completed tasks
-            try:
-                task._data['id'] = int(identifier)
-            except ValueError:
-                task._data['uuid'] = identifier
+            # Identifier is UUID, because we used new-uuid verbosity override
+            task._data['uuid'] = identifier
 
         # Refreshing is very important here, as not only modification time
         # is updated, but arbitrary attribute may have changed due hooks
@@ -387,10 +370,6 @@
         self.execute_command([task['uuid'], 'stop'])
 
     def complete_task(self, task):
-        # Older versions of TW do not stop active task at completion
-        if self.version < self.VERSION_2_4_0 and task.active:
-            task.stop()
-
         self.execute_command([task['uuid'], 'done'])
 
     def annotate_task(self, task, annotation):
@@ -406,7 +385,11 @@
         # of newly saved tasks. Any other place in the code is fine
         # with using UUID only.
         args = [task['uuid'] or task['id'], 'export']
-        output = self.execute_command(args)
+        output = self.execute_command(
+            args,
+            # Supress GC, which can change ID numbers (undesirable for refresh)
+            config_override={'gc': '0'}
+        )
 
         def valid(output):
             return len(output) == 1 and output[0].startswith('{')
@@ -427,8 +410,7 @@
             for key, value in data.items():
                 taskfilter.add_filter_param(key, value)
 
-            output = self.execute_command(['export'] +
-                                          taskfilter.get_filter_params())
+            output = self.execute_command(taskfilter.get_filter_params() + 
['export'])
 
         # If more than 1 task has been matched still, raise an exception
         if not valid(output):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tasklib-2.3.0/tasklib/serializing.py 
new/tasklib-2.4.3/tasklib/serializing.py
--- old/tasklib-2.3.0/tasklib/serializing.py    2020-09-10 21:38:17.000000000 
+0200
+++ new/tasklib-2.4.3/tasklib/serializing.py    2021-10-10 16:34:03.000000000 
+0200
@@ -8,7 +8,7 @@
 from .lazy import LazyUUIDTaskSet, LazyUUIDTask
 
 DATE_FORMAT = '%Y%m%dT%H%M%SZ'
-local_zone = tzlocal.get_localzone()
+local_zone = pytz.timezone(str(tzlocal.get_localzone()))
 
 
 class SerializingObject(object):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tasklib-2.3.0/tasklib/task.py 
new/tasklib-2.4.3/tasklib/task.py
--- old/tasklib-2.3.0/tasklib/task.py   2020-09-10 21:38:17.000000000 +0200
+++ new/tasklib-2.4.3/tasklib/task.py   2021-10-10 16:34:09.000000000 +0200
@@ -1,12 +1,13 @@
 from __future__ import print_function
 import copy
+import datetime
 import importlib
 import json
 import logging
 import os
 import sys
 
-from .serializing import SerializingObject
+from .serializing import SerializingObject, local_zone
 
 DATE_FORMAT = '%Y%m%dT%H%M%SZ'
 REPR_OUTPUT_SIZE = 10
@@ -295,7 +296,10 @@
 
     @property
     def waiting(self):
-        return self['status'] == 'waiting'
+        if not self['wait']:
+            return False
+
+        return self['wait'] > local_zone.localize(datetime.datetime.now())
 
     @property
     def pending(self):
@@ -523,7 +527,7 @@
         return self.filter(status=DELETED)
 
     def waiting(self):
-        return self.filter(status=WAITING)
+        return self.filter(wait__after='now')
 
     def recurring(self):
         return self.filter(status=RECURRING)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tasklib-2.3.0/tasklib/tests.py 
new/tasklib-2.4.3/tasklib/tests.py
--- old/tasklib-2.3.0/tasklib/tests.py  2021-01-03 10:18:26.000000000 +0100
+++ new/tasklib-2.4.3/tasklib/tests.py  2021-10-10 16:34:09.000000000 +0200
@@ -72,7 +72,7 @@
         tw = self.get_taskwarrior(
             task_command='wsl task',
             # prevent `_get_version` from running as `wsl` may not exist
-            version_override=os.getenv('TASK_VERSION'),
+            version_override=os.getenv('TASK_VERSION', 'v1.2.3'),
         )
         self.assertEqual(tw._get_task_command(), ['wsl', 'task'])
 
@@ -131,6 +131,16 @@
 
         self.assertEqual(len(self.tw.tasks.waiting()), 1)
 
+    def test_waiting_property(self):
+        t = Task(self.tw, description='test task')
+        t.save()
+        self.assertFalse(t.waiting)
+
+        t['wait'] = datetime.datetime.now() + datetime.timedelta(days=1)
+        t.save()
+
+        self.assertTrue(t.waiting)
+
     def test_recurring_empty(self):
         Task(self.tw, description='test task').save()
         self.assertEqual(len(self.tw.tasks.recurring()), 0)
@@ -1229,21 +1239,21 @@
         t = Task(self.tw, description='test task', due='eoy')
         now = local_zone.localize(datetime.datetime.now())
         eoy = local_zone.localize(datetime.datetime(
-            year=now.year+1,
-            month=1,
-            day=1,
-            hour=0,
-            minute=0,
-            second=0,
+            year=now.year,
+            month=12,
+            day=31,
+            hour=23,
+            minute=59,
+            second=59,
             ))
-        if self.tw.version < '2.5.2':
+        if self.tw.version >= '2.5.2' and self.tw.version < '2.6.0':
             eoy = local_zone.localize(datetime.datetime(
-                year=now.year,
-                month=12,
-                day=31,
-                hour=23,
-                minute=59,
-                second=59,
+                year=now.year+1,
+                month=1,
+                day=1,
+                hour=0,
+                minute=0,
+                second=0,
                 ))
         self.assertEqual(eoy, t['due'])
 
@@ -1260,23 +1270,23 @@
         now = local_zone.localize(datetime.datetime.now())
         due_date = local_zone.localize(
             datetime.datetime(
-                year=now.year+1,
-                month=1,
-                day=1,
-                hour=0,
-                minute=0,
-                second=0,
+                year=now.year,
+                month=12,
+                day=31,
+                hour=23,
+                minute=59,
+                second=59,
             )
         ) - datetime.timedelta(0, 4 * 30 * 86400)
-        if self.tw.version < '2.5.2':
+        if self.tw.version >= '2.5.2' and self.tw.version < '2.6.0':
             due_date = local_zone.localize(
                 datetime.datetime(
-                    year=now.year,
-                    month=12,
-                    day=31,
-                    hour=23,
-                    minute=59,
-                    second=59,
+                    year=now.year+1,
+                    month=1,
+                    day=1,
+                    hour=0,
+                    minute=0,
+                    second=0,
                 )
             ) - datetime.timedelta(0, 4 * 30 * 86400)
         self.assertEqual(due_date, t['due'])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tasklib-2.3.0/tasklib.egg-info/PKG-INFO 
new/tasklib-2.4.3/tasklib.egg-info/PKG-INFO
--- old/tasklib-2.3.0/tasklib.egg-info/PKG-INFO 2021-01-03 10:20:58.000000000 
+0100
+++ new/tasklib-2.4.3/tasklib.egg-info/PKG-INFO 2021-10-10 16:34:21.000000000 
+0200
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: tasklib
-Version: 2.3.0
-Summary: Python Task Warrior library
-Home-page: https://github.com/robgolding/tasklib
-Author: Rob Golding
-Author-email: [email protected]
+Version: 2.4.3
+Summary: Official Taskwarrior library for Python
+Home-page: https://github.com/GothenburgBitFactory/tasklib
+Author: GothenburgBitFactory
+Author-email: [email protected]
 License: BSD
-Download-URL: https://github.com/robgolding/tasklib/downloads
+Download-URL: https://github.com/GothenburgBitFactory/tasklib/downloads
 Description: tasklib
         =======
         
@@ -23,7 +23,7 @@
         ------------
         
         * Python 3.5 or above
-        * taskwarrior_ v2.1.x or above.
+        * taskwarrior_ v2.4.x or above.
         
         Older versions of taskwarrior are untested and may not work.
         
@@ -62,13 +62,18 @@
         .. _documentation: http://tasklib.readthedocs.org/en/latest/
         
 Platform: UNKNOWN
-Classifier: Development Status :: 4 - Beta
+Classifier: Development Status :: 6 - Mature
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 3
 Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
 Classifier: Programming Language :: Python :: 3.7
 Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: 3.9
+Classifier: Programming Language :: Python :: 3.10
 Classifier: License :: OSI Approved :: BSD License
 Classifier: Topic :: Software Development :: Libraries :: Python Modules
 Classifier: Intended Audience :: Developers
+Classifier: Intended Audience :: Information Technology
+Classifier: Intended Audience :: System Administrators
+Classifier: Operating System :: OS Independent

Reply via email to