Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-taskw for openSUSE:Factory checked in at 2022-09-14 13:44:50 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-taskw (Old) and /work/SRC/openSUSE:Factory/.python-taskw.new.2083 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-taskw" Wed Sep 14 13:44:50 2022 rev:5 rq:1003394 version:2.0.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-taskw/python-taskw.changes 2022-02-17 00:32:42.565410767 +0100 +++ /work/SRC/openSUSE:Factory/.python-taskw.new.2083/python-taskw.changes 2022-09-14 13:44:58.145892285 +0200 @@ -1,0 +2,9 @@ +Tue Sep 13 14:57:40 UTC 2022 - [email protected] + +- 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 + +------------------------------------------------------------------- Old: ---- taskw-1.3.1.tar.gz New: ---- taskw-2.0.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-taskw.spec ++++++ --- /var/tmp/diff_new_pack.UBZm4Z/_old 2022-09-14 13:44:58.909894208 +0200 +++ /var/tmp/diff_new_pack.UBZm4Z/_new 2022-09-14 13:44:58.913894218 +0200 @@ -18,7 +18,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-taskw -Version: 1.3.1 +Version: 2.0.0 Release: 0 Summary: Python bindings for taskwarrior License: GPL-3.0-or-later @@ -31,7 +31,6 @@ Requires: python-kitchen Requires: python-python-dateutil Requires: python-pytz -Requires: python-six Requires: taskwarrior BuildArch: noarch # SECTION test requirements @@ -39,7 +38,6 @@ BuildRequires: %{python_module pytest} BuildRequires: %{python_module python-dateutil} BuildRequires: %{python_module pytz} -BuildRequires: %{python_module six} BuildRequires: taskwarrior # /SECTION %python_subpackages ++++++ taskw-1.3.1.tar.gz -> taskw-2.0.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/taskw-1.3.1/PKG-INFO new/taskw-2.0.0/PKG-INFO --- old/taskw-1.3.1/PKG-INFO 2021-11-25 03:29:30.303346200 +0100 +++ new/taskw-2.0.0/PKG-INFO 2022-05-30 03:05:05.141464200 +0200 @@ -1,162 +1,165 @@ -Metadata-Version: 1.1 +Metadata-Version: 2.1 Name: taskw -Version: 1.3.1 +Version: 2.0.0 Summary: Python bindings for your taskwarrior database Home-page: http://github.com/ralphbean/taskw Author: Ralph Bean Author-email: [email protected] License: GPLv3+ -Description: - - This is a python API for the `taskwarrior <http://taskwarrior.org>`_ command - line tool. - - It contains two implementations: ``taskw.TaskWarriorShellout`` and - ``taskw.TaskWarriorDirect``. The first implementation is the supported one - recommended by the upstream taskwarrior core project. It uses the ``task - export`` and ``task import`` commands to manipulate the task database. The - second implementation opens the task db file itself and directly manipulates - it. It exists for backwards compatibility, but should only be used when - necessary. - - Build Status - ------------ - - .. |master| image:: https://secure.travis-ci.org/ralphbean/taskw.png?branch=master - :alt: Build Status - master branch - :target: http://travis-ci.org/#!/ralphbean/taskw - - .. |develop| image:: https://secure.travis-ci.org/ralphbean/taskw.png?branch=develop - :alt: Build Status - develop branch - :target: http://travis-ci.org/#!/ralphbean/taskw - - +----------+-----------+ - | Branch | Status | - +==========+===========+ - | master | |master| | - +----------+-----------+ - | develop | |develop| | - +----------+-----------+ - - Getting taskw - ------------- - - Installing - ++++++++++ - - Using ``taskw`` requires that you first install `taskwarrior - <http://taskwarrior.org>`_. - - Installing it from http://pypi.python.org/pypi/taskw is easy with ``pip``:: - - $ pip install taskw - - The Source - ++++++++++ - - You can find the source on github at http://github.com/ralphbean/taskw - - - Examples - -------- - - Looking at tasks - ++++++++++++++++ - - >>> from taskw import TaskWarrior - >>> w = TaskWarrior() - >>> tasks = w.load_tasks() - >>> tasks.keys() - ['completed', 'pending'] - >>> type(tasks['pending']) - <type 'list'> - >>> type(tasks['pending'][0]) - <type 'dict'> - - Adding tasks - ++++++++++++ - - >>> from taskw import TaskWarrior - >>> w = TaskWarrior() - >>> w.task_add("Eat food") - >>> w.task_add("Take a nap", priority="H", project="life", due="1359090000") - - Retrieving tasks - ++++++++++++++++ - - >>> from taskw import TaskWarrior - >>> w = TaskWarrior() - >>> w.get_task(id=5) - - Updating tasks - ++++++++++++++ - - >>> from taskw import TaskWarrior - >>> w = TaskWarrior() - >>> id, task = w.get_task(id=14) - >>> task['project'] = 'Updated project name' - >>> w.task_update(task) - - Deleting tasks - ++++++++++++++ - - >>> from taskw import TaskWarrior - >>> w = TaskWarrior() - >>> w.task_delete(id=3) - - Completing tasks - ++++++++++++++++ - - >>> from taskw import TaskWarrior - >>> w = TaskWarrior() - >>> w.task_done(id=46) - - Being Flexible - ++++++++++++++ - - You can point ``taskw`` at different taskwarrior databases. - - >>> from taskw import TaskWarrior - >>> w = TaskWarrior(config_filename="~/some_project/.taskrc") - >>> w.task_add("Use 'taskw'.") - - - Looking at the config - +++++++++++++++++++++ - - >>> from taskw import TaskWarrior - >>> w = TaskWarrior() - >>> config = w.load_config() - >>> config['data']['location'] - '/home/threebean/.task' - >>> config['_forcecolor'] - 'yes' - - - Using Python-appropriate Types (Dates, UUIDs, etc) - ++++++++++++++++++++++++++++++++++++++++++++++++++ - - >>> from taskw import TaskWarrior - >>> w = TaskWarrior(marshal=True) - >>> w.get_task(id=10) - (10, - { - 'description': 'Hello there!', - 'entry': datetime.datetime(2014, 3, 14, 14, 18, 40, tzinfo=tzutc()) - 'id': 10, - 'project': 'Saying Hello', - 'status': 'pending', - 'uuid': UUID('4882751a-3966-4439-9675-948b1152895c') - } - ) Keywords: taskwarrior task Platform: UNKNOWN Classifier: Development Status :: 5 - Production/Stable -Classifier: Programming Language :: Python :: 2 -Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.4 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: License :: OSI Approved :: GNU General Public License (GPL) Classifier: Intended Audience :: Developers +License-File: LICENSE.txt + + + +This is a python API for the `taskwarrior <http://taskwarrior.org>`_ command +line tool. + +It contains two implementations: ``taskw.TaskWarriorShellout`` and +``taskw.TaskWarriorDirect``. The first implementation is the supported one +recommended by the upstream taskwarrior core project. It uses the ``task +export`` and ``task import`` commands to manipulate the task database. The +second implementation opens the task db file itself and directly manipulates +it. It exists for backwards compatibility, but should only be used when +necessary. + +Build Status +------------ + +.. |master| image:: https://secure.travis-ci.org/ralphbean/taskw.png?branch=master + :alt: Build Status - master branch + :target: http://travis-ci.org/#!/ralphbean/taskw + +.. |develop| image:: https://secure.travis-ci.org/ralphbean/taskw.png?branch=develop + :alt: Build Status - develop branch + :target: http://travis-ci.org/#!/ralphbean/taskw + ++----------+-----------+ +| Branch | Status | ++==========+===========+ +| master | |master| | ++----------+-----------+ +| develop | |develop| | ++----------+-----------+ + +Getting taskw +------------- + +Installing +++++++++++ + +Using ``taskw`` requires that you first install `taskwarrior +<http://taskwarrior.org>`_. + +Installing it from http://pypi.python.org/pypi/taskw is easy with ``pip``:: + + $ pip install taskw + +The Source +++++++++++ + +You can find the source on github at http://github.com/ralphbean/taskw + + +Examples +-------- + +Looking at tasks +++++++++++++++++ + + >>> from taskw import TaskWarrior + >>> w = TaskWarrior() + >>> tasks = w.load_tasks() + >>> tasks.keys() + ['completed', 'pending'] + >>> type(tasks['pending']) + <type 'list'> + >>> type(tasks['pending'][0]) + <type 'dict'> + +Adding tasks +++++++++++++ + + >>> from taskw import TaskWarrior + >>> w = TaskWarrior() + >>> w.task_add("Eat food") + >>> w.task_add("Take a nap", priority="H", project="life", due="1359090000") + +Retrieving tasks +++++++++++++++++ + + >>> from taskw import TaskWarrior + >>> w = TaskWarrior() + >>> w.get_task(id=5) + +Updating tasks +++++++++++++++ + + >>> from taskw import TaskWarrior + >>> w = TaskWarrior() + >>> id, task = w.get_task(id=14) + >>> task['project'] = 'Updated project name' + >>> w.task_update(task) + +Deleting tasks +++++++++++++++ + + >>> from taskw import TaskWarrior + >>> w = TaskWarrior() + >>> w.task_delete(id=3) + +Completing tasks +++++++++++++++++ + + >>> from taskw import TaskWarrior + >>> w = TaskWarrior() + >>> w.task_done(id=46) + +Being Flexible +++++++++++++++ + +You can point ``taskw`` at different taskwarrior databases. + + >>> from taskw import TaskWarrior + >>> w = TaskWarrior(config_filename="~/some_project/.taskrc") + >>> w.task_add("Use 'taskw'.") + + +Looking at the config ++++++++++++++++++++++ + + >>> from taskw import TaskWarrior + >>> w = TaskWarrior() + >>> config = w.load_config() + >>> config['data']['location'] + '/home/threebean/.task' + >>> config['_forcecolor'] + 'yes' + + +Using Python-appropriate Types (Dates, UUIDs, etc) +++++++++++++++++++++++++++++++++++++++++++++++++++ + + >>> from taskw import TaskWarrior + >>> w = TaskWarrior(marshal=True) + >>> w.get_task(id=10) + (10, + { + 'description': 'Hello there!', + 'entry': datetime.datetime(2014, 3, 14, 14, 18, 40, tzinfo=tzutc()) + 'id': 10, + 'project': 'Saying Hello', + 'status': 'pending', + 'uuid': UUID('4882751a-3966-4439-9675-948b1152895c') + } + ) + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/taskw-1.3.1/requirements.txt new/taskw-2.0.0/requirements.txt --- old/taskw-1.3.1/requirements.txt 2020-12-06 23:55:32.000000000 +0100 +++ new/taskw-2.0.0/requirements.txt 2022-05-30 02:59:47.000000000 +0200 @@ -1,4 +1,3 @@ -six python-dateutil pytz kitchen diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/taskw-1.3.1/setup.py new/taskw-2.0.0/setup.py --- old/taskw-1.3.1/setup.py 2021-11-25 03:22:10.000000000 +0100 +++ new/taskw-2.0.0/setup.py 2022-05-30 03:00:38.000000000 +0200 @@ -37,22 +37,18 @@ ] REQUIREMENTS[category] = requirements -if sys.version_info < (2, 7): - REQUIREMENTS['test'].append('unittest2') - REQUIREMENTS['install'].append('ordereddict') - setup(name='taskw', - version='1.3.1', + version='2.0.0', description="Python bindings for your taskwarrior database", long_description=long_description, classifiers=[ "Development Status :: 5 - Production/Stable", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", "License :: OSI Approved :: GNU General Public License (GPL)", "Intended Audience :: Developers", ], diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/taskw-1.3.1/taskw/exceptions.py new/taskw-2.0.0/taskw/exceptions.py --- old/taskw-1.3.1/taskw/exceptions.py 2019-09-16 03:29:06.000000000 +0200 +++ new/taskw-2.0.0/taskw/exceptions.py 2022-05-30 02:59:47.000000000 +0200 @@ -9,13 +9,10 @@ self.code = code super(TaskwarriorError, self).__init__(self.stderr) - def __unicode__(self): + def __str__(self): return "%r #%s; stderr:\"%s\"; stdout:\"%s\"" % ( self.command, self.code, self.stderr, self.stdout, ) - - def __str__(self): - return self.__unicode__().encode(sys.getdefaultencoding(), 'replace') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/taskw-1.3.1/taskw/fields/annotationarray.py new/taskw-2.0.0/taskw/fields/annotationarray.py --- old/taskw-1.3.1/taskw/fields/annotationarray.py 2019-09-16 03:29:06.000000000 +0200 +++ new/taskw-2.0.0/taskw/fields/annotationarray.py 2022-05-30 02:59:47.000000000 +0200 @@ -1,11 +1,10 @@ from dateutil.parser import parse -import six from .array import ArrayField from .base import DirtyableList -class Annotation(six.text_type): +class Annotation(str): """ A special type of string that we'll use for storing annotations. This is, for all intents and purposes, really just a string, but @@ -14,7 +13,7 @@ """ def __new__(self, description, entry=None): - return six.text_type.__new__(self, description) + return str.__new__(self, description) def __init__(self, description, entry=None): self._entry = entry @@ -59,5 +58,5 @@ if not value: value = [] return super(AnnotationArrayField, self).serialize( - [six.text_type(entry) for entry in value] + [str(entry) for entry in value] ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/taskw-1.3.1/taskw/fields/base.py new/taskw-2.0.0/taskw/fields/base.py --- old/taskw-1.3.1/taskw/fields/base.py 2019-09-16 03:29:06.000000000 +0200 +++ new/taskw-2.0.0/taskw/fields/base.py 2022-05-30 02:59:47.000000000 +0200 @@ -1,8 +1,6 @@ import copy import sys -import six - class Field(object): def __init__(self, label=None, read_only=False): @@ -25,17 +23,12 @@ return value def __str__(self): - if sys.version_info >= (3, ): - return self.label - return self.__unicode__().encode(sys.getdefaultencoding(), 'replace') - - def __unicode__(self): return self.label def __repr__(self): return "<{cls} '{label}'>".format( - cls=six.text_type(self.__class__.__name__), - label=six.text_type(self) if self._label else '(No Label)', + cls=str(self.__class__.__name__), + label=str(self) if self._label else '(No Label)', ) def __eq__(self, other): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/taskw-1.3.1/taskw/fields/commaseparateduuid.py new/taskw-2.0.0/taskw/fields/commaseparateduuid.py --- old/taskw-1.3.1/taskw/fields/commaseparateduuid.py 2020-12-06 23:55:32.000000000 +0100 +++ new/taskw-2.0.0/taskw/fields/commaseparateduuid.py 2022-05-30 02:59:47.000000000 +0200 @@ -1,5 +1,3 @@ -from __future__ import absolute_import - from distutils.version import LooseVersion import uuid diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/taskw-1.3.1/taskw/fields/string.py new/taskw-2.0.0/taskw/fields/string.py --- old/taskw-1.3.1/taskw/fields/string.py 2020-12-06 23:55:32.000000000 +0100 +++ new/taskw-2.0.0/taskw/fields/string.py 2022-05-30 02:59:47.000000000 +0200 @@ -1,7 +1,5 @@ import logging -import six - from taskw.utils import encode_replacements_experimental from .base import Field @@ -14,9 +12,9 @@ # If value is None, let's just let it pass through if not value: return value - if not isinstance(value, six.string_types): - value = six.text_type(value) - for left, right in six.iteritems(encode_replacements_experimental): + if not isinstance(value, str): + value = str(value) + for left, right in encode_replacements_experimental.items(): value = value.replace(right, left) return value @@ -24,14 +22,14 @@ # If value is None let it pass through if not value: return value - if not isinstance(value, six.string_types): - string_value = six.text_type(value) + if not isinstance(value, str): + string_value = str(value) logger.debug( "Value %s serialized to string as '%s'", repr(value), string_value ) value = string_value - for left, right in six.iteritems(encode_replacements_experimental): + for left, right in encode_replacements_experimental.items(): value = value.replace(left, right) return value diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/taskw-1.3.1/taskw/fields/uuid.py new/taskw-2.0.0/taskw/fields/uuid.py --- old/taskw-1.3.1/taskw/fields/uuid.py 2019-09-16 03:29:06.000000000 +0200 +++ new/taskw-2.0.0/taskw/fields/uuid.py 2022-05-30 02:59:47.000000000 +0200 @@ -1,5 +1,3 @@ -from __future__ import absolute_import - import uuid from .base import Field diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/taskw-1.3.1/taskw/task.py new/taskw-2.0.0/taskw/task.py --- old/taskw-1.3.1/taskw/task.py 2020-12-06 23:55:32.000000000 +0100 +++ new/taskw-2.0.0/taskw/task.py 2022-05-30 02:59:47.000000000 +0200 @@ -3,8 +3,6 @@ import os import sys -import six - from taskw.fields import ( AnnotationArrayField, ArrayField, @@ -73,7 +71,7 @@ self._changes = [] processed = {} - for k, v in six.iteritems(data): + for k, v in data.items(): processed[k] = self._deserialize(k, v, self._fields) super(Task, self).__init__(processed) @@ -87,7 +85,7 @@ fields.update(udas) processed = {} - for k, v in six.iteritems(data): + for k, v in data.items(): processed[k] = cls._serialize(k, v, fields) return cls(processed, udas) @@ -173,7 +171,7 @@ ) # Check for changes on subordinate items - for k, v in six.iteritems(self): + for k, v in self.items(): if isinstance(v, Dirtyable): result = v.get_changes(keep=keep) if result: @@ -198,7 +196,7 @@ """ results = {} - for k, v in six.iteritems(values): + for k, v in values.items(): results[k] = self.__setitem__(k, v, force=force) return results @@ -209,13 +207,13 @@ def serialized(self): """ Returns a serialized representation of this task.""" serialized = {} - for k, v in six.iteritems(self): + for k, v in self.items(): serialized[k] = self._serialize(k, v, self._fields) return serialized def serialized_changes(self, keep=False): serialized = {} - for k, v in six.iteritems(self.get_changes(keep=keep)): + for k, v in self.get_changes(keep=keep).items(): # Here, `v` is a 2-tuple of the field's original value # and the field's new value. _, to = v diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/taskw-1.3.1/taskw/taskrc.py new/taskw-2.0.0/taskw/taskrc.py --- old/taskw-1.3.1/taskw/taskrc.py 2020-12-07 00:01:31.000000000 +0100 +++ new/taskw-2.0.0/taskw/taskrc.py 2022-05-30 02:59:47.000000000 +0200 @@ -1,4 +1,3 @@ -import codecs import logging import os @@ -93,7 +92,7 @@ def _read(self, path): config = {} - with codecs.open(path, 'r', 'utf8') as config_file: + with open(path, 'r') as config_file: for raw_line in config_file.readlines(): line = sanitize(raw_line) if not line: @@ -158,10 +157,7 @@ return udas - def __unicode__(self): + def __str__(self): return 'TaskRc file at {path}'.format( path=self.path ) - - def __str__(self): - return self.__unicode__().encode('utf-8', 'REPLACE') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/taskw-1.3.1/taskw/test/test_fields.py new/taskw-2.0.0/taskw/test/test_fields.py --- old/taskw-1.3.1/taskw/test/test_fields.py 2019-09-16 03:29:06.000000000 +0200 +++ new/taskw-2.0.0/taskw/test/test_fields.py 2022-05-30 02:59:47.000000000 +0200 @@ -4,15 +4,11 @@ from dateutil.tz import tzlocal from pytz import UTC, timezone -import six from taskw import fields from taskw.fields.annotationarray import Annotation -if sys.version_info >= (2, 7): - from unittest import TestCase -else: - from unittest2 import TestCase +from unittest import TestCase class TestAnnotationArrayField(TestCase): @@ -36,9 +32,7 @@ self.assertEqual(actual_serialized, expected_serialized) for entry in actual_serialized: - self.assertTrue( - isinstance(entry, six.text_type) - ) + self.assertTrue(isinstance(entry, str)) def test_deserialize_fully_formed_entries_to_stringey_things(self): # Note that this test is *identical* in conditions and actions diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/taskw-1.3.1/taskw/test/test_task.py new/taskw-2.0.0/taskw/test/test_task.py --- old/taskw-1.3.1/taskw/test/test_task.py 2020-12-06 23:55:32.000000000 +0100 +++ new/taskw-2.0.0/taskw/test/test_task.py 2022-05-30 02:59:47.000000000 +0200 @@ -1,10 +1,10 @@ import copy import datetime +import io import uuid from unittest import TestCase import pytz -import six from dateutil.tz import tzutc from taskw.task import Task @@ -41,7 +41,7 @@ expected_changes = {'due': (original_due_date, new_due_date)} actual_changes = self.task.get_changes() - self.assertEqual(list(six.iterkeys(actual_changes)), ['due']) + self.assertEqual(list(actual_changes.keys()), ['due']) # Use assertAlmostEqual to allow for millisecond loss when # converting to string in setUp @@ -165,7 +165,7 @@ self.assertEqual(after_composition, expected_result) def test_from_input(self): - input_add_data = six.StringIO( + input_add_data = io.StringIO( '{' '"description":"Go to Camelot",' '"entry":"20180618T030242Z",' @@ -174,7 +174,7 @@ '"uuid":"daa3ff05-f716-482e-bc35-3e1601e50778"' '}') - input_modify_data = six.StringIO( + input_modify_data = io.StringIO( '\n'.join([ input_add_data.getvalue(), ( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/taskw-1.3.1/taskw/test/test_taskrc.py new/taskw-2.0.0/taskw/test/test_taskrc.py --- old/taskw-1.3.1/taskw/test/test_taskrc.py 2019-09-16 03:29:06.000000000 +0200 +++ new/taskw-2.0.0/taskw/test/test_taskrc.py 2022-05-30 02:59:47.000000000 +0200 @@ -6,10 +6,7 @@ from taskw.fields import NumericField, ChoiceField -if sys.version_info >= (2, 7): - from unittest import TestCase -else: - from unittest2 import TestCase +from unittest import TestCase class TestBasicLoading(TestCase): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/taskw-1.3.1/taskw/test/test_utils.py new/taskw-2.0.0/taskw/test/test_utils.py --- old/taskw-1.3.1/taskw/test/test_utils.py 2020-12-07 01:20:52.000000000 +0100 +++ new/taskw-2.0.0/taskw/test/test_utils.py 2022-05-30 02:59:47.000000000 +0200 @@ -3,7 +3,6 @@ import dateutil.tz import pytz -import six from taskw.utils import ( convert_dict_to_override_args, @@ -74,9 +73,7 @@ def test_with_unicode(self): expected = { - six.text_type('andthis'): ( - six.text_type('has a fucking \\backslash in it') - ) + 'andthis': 'has a fucking \\backslash in it' } line = r'[andthis:"has a fucking \\backslash in it"]' r = decode_task(line) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/taskw-1.3.1/taskw/utils.py new/taskw-2.0.0/taskw/utils.py --- old/taskw-1.3.1/taskw/utils.py 2020-12-06 23:55:32.000000000 +0100 +++ new/taskw-2.0.0/taskw/utils.py 2022-05-30 02:59:47.000000000 +0200 @@ -1,18 +1,12 @@ """ Various utilties """ -from __future__ import print_function import datetime import re +from collections import OrderedDict from operator import itemgetter -try: - from collections import OrderedDict -except ImportError: - from ordereddict import OrderedDict - import dateutil.tz import pytz -import six from distutils.version import LooseVersion @@ -66,19 +60,17 @@ value = value.astimezone(pytz.utc).strftime(DATE_FORMAT) elif isinstance(value, datetime.date): value = value.strftime(DATE_FORMAT) - elif isinstance(value, six.string_types): + elif isinstance(value, str): if query: # In some contexts, parentheses are interpreted for use in # logical expressions. They must *sometimes* be escaped. - for left, right in six.iteritems(logical_replacements): + for left, right in logical_replacements.items(): # don't replace '?' if this is an exact match if left == '?' and '.' not in key: continue value = value.replace(left, right) else: - for unsafe, safe in six.iteritems( - encode_replacements_experimental - ): + for unsafe, safe in encode_replacements_experimental.items(): value = value.replace(unsafe, safe) else: value = str(value) @@ -89,7 +81,7 @@ args = [] if isinstance(value, dict): - value = six.iteritems(value) + value = value.items() for k, v in value: if isinstance(v, list): @@ -147,8 +139,8 @@ if 'tags' in task: task['tags'] = ','.join(task['tags']) for k in task: - for unsafe, safe in six.iteritems(encode_replacements): - if isinstance(task[k], six.string_types): + for unsafe, safe in encode_replacements.items(): + if isinstance(task[k], str): task[k] = task[k].replace(unsafe, safe) if isinstance(task[k], datetime.datetime): @@ -176,7 +168,7 @@ for key, value in re.findall(r'(\w+):"(.*?)(?<!\\)"', line): value = value.replace('\\"', '"') # unescape quotes task[key] = value - for unsafe, safe in six.iteritems(decode_replacements): + for unsafe, safe in decode_replacements.items(): task[key] = task[key].replace(unsafe, safe) if 'tags' in task: task['tags'] = task['tags'].split(',') @@ -244,7 +236,7 @@ """ args = [] - for k, v in six.iteritems(config): + for k, v in config.items(): if isinstance(v, dict): args.extend( convert_dict_to_override_args( @@ -256,7 +248,7 @@ ) ) else: - v = six.text_type(v) + v = str(v) left = 'rc' + (('.' + prefix) if prefix else '') + '.' + k right = v if ' ' not in v else '"%s"' % v args.append('='.join([left, right])) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/taskw-1.3.1/taskw/warrior.py new/taskw-2.0.0/taskw/warrior.py --- old/taskw-1.3.1/taskw/warrior.py 2021-11-25 03:21:45.000000000 +0100 +++ new/taskw-2.0.0/taskw/warrior.py 2022-05-30 02:59:47.000000000 +0200 @@ -10,7 +10,6 @@ """ import abc -import codecs import copy from distutils.version import LooseVersion import logging @@ -24,11 +23,6 @@ import kitchen.text.converters -import six -from six import with_metaclass -from six.moves import filter -from six.moves import map - import taskw.utils from taskw.exceptions import TaskwarriorError from taskw.task import Task @@ -38,14 +32,12 @@ logger = logging.getLogger(__name__) -open = lambda fname, mode: codecs.open(fname, mode, "utf-8") - # Location of configuration file: either specified by TASKRC environment # variable, or ~/.taskrc (default). TASKRC = os.getenv("TASKRC", "~/.taskrc") -class TaskWarriorBase(with_metaclass(abc.ABCMeta, object)): +class TaskWarriorBase(metaclass=abc.ABCMeta): """ The task warrior Really though, a python object with methods allowing you to interact @@ -468,7 +460,7 @@ 'task', ] + self.get_configuration_override_args() - + [six.text_type(arg) for arg in args] + + [str(arg) for arg in args] ) env = os.environ.copy() env['TASKRC'] = self.config_filename @@ -476,7 +468,7 @@ # subprocess is expecting bytestrings only, so nuke unicode if present # and remove control characters for i in range(len(command)): - if isinstance(command[i], six.text_type): + if isinstance(command[i], str): command[i] = ( taskw.utils.clean_ctrl_chars(command[i].encode('utf-8'))) @@ -652,7 +644,7 @@ ) search = [] - for key, value in six.iteritems(kwargs): + for key, value in kwargs.items(): if key not in ['id', 'uuid', 'description']: search.append( '%s:%s' % ( @@ -724,7 +716,7 @@ for annotation in annotations: self.task_annotate(added_task, annotation) - id, added_task = self.get_task(uuid=added_task[six.u('uuid')]) + id, added_task = self.get_task(uuid=added_task['uuid']) return added_task def task_annotate(self, task, annotation): @@ -735,7 +727,7 @@ '--', annotation ) - id, annotated_task = self.get_task(uuid=task[six.u('uuid')]) + id, annotated_task = self.get_task(uuid=task['uuid']) return annotated_task def task_denotate(self, task, annotation): @@ -746,7 +738,7 @@ '--', annotation ) - id, denotated_task = self.get_task(uuid=task[six.u('uuid')]) + id, denotated_task = self.get_task(uuid=task['uuid']) return denotated_task def task_done(self, **kw): @@ -770,7 +762,7 @@ if isinstance(task, Task): # Let's pre-serialize taskw.task.Task instances - task_uuid = six.text_type(task['uuid']) + task_uuid = str(task['uuid']) task = task.serialized_changes(keep=True) legacy = False else: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/taskw-1.3.1/taskw.egg-info/PKG-INFO new/taskw-2.0.0/taskw.egg-info/PKG-INFO --- old/taskw-1.3.1/taskw.egg-info/PKG-INFO 2021-11-25 03:29:30.000000000 +0100 +++ new/taskw-2.0.0/taskw.egg-info/PKG-INFO 2022-05-30 03:05:05.000000000 +0200 @@ -1,162 +1,165 @@ -Metadata-Version: 1.1 +Metadata-Version: 2.1 Name: taskw -Version: 1.3.1 +Version: 2.0.0 Summary: Python bindings for your taskwarrior database Home-page: http://github.com/ralphbean/taskw Author: Ralph Bean Author-email: [email protected] License: GPLv3+ -Description: - - This is a python API for the `taskwarrior <http://taskwarrior.org>`_ command - line tool. - - It contains two implementations: ``taskw.TaskWarriorShellout`` and - ``taskw.TaskWarriorDirect``. The first implementation is the supported one - recommended by the upstream taskwarrior core project. It uses the ``task - export`` and ``task import`` commands to manipulate the task database. The - second implementation opens the task db file itself and directly manipulates - it. It exists for backwards compatibility, but should only be used when - necessary. - - Build Status - ------------ - - .. |master| image:: https://secure.travis-ci.org/ralphbean/taskw.png?branch=master - :alt: Build Status - master branch - :target: http://travis-ci.org/#!/ralphbean/taskw - - .. |develop| image:: https://secure.travis-ci.org/ralphbean/taskw.png?branch=develop - :alt: Build Status - develop branch - :target: http://travis-ci.org/#!/ralphbean/taskw - - +----------+-----------+ - | Branch | Status | - +==========+===========+ - | master | |master| | - +----------+-----------+ - | develop | |develop| | - +----------+-----------+ - - Getting taskw - ------------- - - Installing - ++++++++++ - - Using ``taskw`` requires that you first install `taskwarrior - <http://taskwarrior.org>`_. - - Installing it from http://pypi.python.org/pypi/taskw is easy with ``pip``:: - - $ pip install taskw - - The Source - ++++++++++ - - You can find the source on github at http://github.com/ralphbean/taskw - - - Examples - -------- - - Looking at tasks - ++++++++++++++++ - - >>> from taskw import TaskWarrior - >>> w = TaskWarrior() - >>> tasks = w.load_tasks() - >>> tasks.keys() - ['completed', 'pending'] - >>> type(tasks['pending']) - <type 'list'> - >>> type(tasks['pending'][0]) - <type 'dict'> - - Adding tasks - ++++++++++++ - - >>> from taskw import TaskWarrior - >>> w = TaskWarrior() - >>> w.task_add("Eat food") - >>> w.task_add("Take a nap", priority="H", project="life", due="1359090000") - - Retrieving tasks - ++++++++++++++++ - - >>> from taskw import TaskWarrior - >>> w = TaskWarrior() - >>> w.get_task(id=5) - - Updating tasks - ++++++++++++++ - - >>> from taskw import TaskWarrior - >>> w = TaskWarrior() - >>> id, task = w.get_task(id=14) - >>> task['project'] = 'Updated project name' - >>> w.task_update(task) - - Deleting tasks - ++++++++++++++ - - >>> from taskw import TaskWarrior - >>> w = TaskWarrior() - >>> w.task_delete(id=3) - - Completing tasks - ++++++++++++++++ - - >>> from taskw import TaskWarrior - >>> w = TaskWarrior() - >>> w.task_done(id=46) - - Being Flexible - ++++++++++++++ - - You can point ``taskw`` at different taskwarrior databases. - - >>> from taskw import TaskWarrior - >>> w = TaskWarrior(config_filename="~/some_project/.taskrc") - >>> w.task_add("Use 'taskw'.") - - - Looking at the config - +++++++++++++++++++++ - - >>> from taskw import TaskWarrior - >>> w = TaskWarrior() - >>> config = w.load_config() - >>> config['data']['location'] - '/home/threebean/.task' - >>> config['_forcecolor'] - 'yes' - - - Using Python-appropriate Types (Dates, UUIDs, etc) - ++++++++++++++++++++++++++++++++++++++++++++++++++ - - >>> from taskw import TaskWarrior - >>> w = TaskWarrior(marshal=True) - >>> w.get_task(id=10) - (10, - { - 'description': 'Hello there!', - 'entry': datetime.datetime(2014, 3, 14, 14, 18, 40, tzinfo=tzutc()) - 'id': 10, - 'project': 'Saying Hello', - 'status': 'pending', - 'uuid': UUID('4882751a-3966-4439-9675-948b1152895c') - } - ) Keywords: taskwarrior task Platform: UNKNOWN Classifier: Development Status :: 5 - Production/Stable -Classifier: Programming Language :: Python :: 2 -Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.4 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: License :: OSI Approved :: GNU General Public License (GPL) Classifier: Intended Audience :: Developers +License-File: LICENSE.txt + + + +This is a python API for the `taskwarrior <http://taskwarrior.org>`_ command +line tool. + +It contains two implementations: ``taskw.TaskWarriorShellout`` and +``taskw.TaskWarriorDirect``. The first implementation is the supported one +recommended by the upstream taskwarrior core project. It uses the ``task +export`` and ``task import`` commands to manipulate the task database. The +second implementation opens the task db file itself and directly manipulates +it. It exists for backwards compatibility, but should only be used when +necessary. + +Build Status +------------ + +.. |master| image:: https://secure.travis-ci.org/ralphbean/taskw.png?branch=master + :alt: Build Status - master branch + :target: http://travis-ci.org/#!/ralphbean/taskw + +.. |develop| image:: https://secure.travis-ci.org/ralphbean/taskw.png?branch=develop + :alt: Build Status - develop branch + :target: http://travis-ci.org/#!/ralphbean/taskw + ++----------+-----------+ +| Branch | Status | ++==========+===========+ +| master | |master| | ++----------+-----------+ +| develop | |develop| | ++----------+-----------+ + +Getting taskw +------------- + +Installing +++++++++++ + +Using ``taskw`` requires that you first install `taskwarrior +<http://taskwarrior.org>`_. + +Installing it from http://pypi.python.org/pypi/taskw is easy with ``pip``:: + + $ pip install taskw + +The Source +++++++++++ + +You can find the source on github at http://github.com/ralphbean/taskw + + +Examples +-------- + +Looking at tasks +++++++++++++++++ + + >>> from taskw import TaskWarrior + >>> w = TaskWarrior() + >>> tasks = w.load_tasks() + >>> tasks.keys() + ['completed', 'pending'] + >>> type(tasks['pending']) + <type 'list'> + >>> type(tasks['pending'][0]) + <type 'dict'> + +Adding tasks +++++++++++++ + + >>> from taskw import TaskWarrior + >>> w = TaskWarrior() + >>> w.task_add("Eat food") + >>> w.task_add("Take a nap", priority="H", project="life", due="1359090000") + +Retrieving tasks +++++++++++++++++ + + >>> from taskw import TaskWarrior + >>> w = TaskWarrior() + >>> w.get_task(id=5) + +Updating tasks +++++++++++++++ + + >>> from taskw import TaskWarrior + >>> w = TaskWarrior() + >>> id, task = w.get_task(id=14) + >>> task['project'] = 'Updated project name' + >>> w.task_update(task) + +Deleting tasks +++++++++++++++ + + >>> from taskw import TaskWarrior + >>> w = TaskWarrior() + >>> w.task_delete(id=3) + +Completing tasks +++++++++++++++++ + + >>> from taskw import TaskWarrior + >>> w = TaskWarrior() + >>> w.task_done(id=46) + +Being Flexible +++++++++++++++ + +You can point ``taskw`` at different taskwarrior databases. + + >>> from taskw import TaskWarrior + >>> w = TaskWarrior(config_filename="~/some_project/.taskrc") + >>> w.task_add("Use 'taskw'.") + + +Looking at the config ++++++++++++++++++++++ + + >>> from taskw import TaskWarrior + >>> w = TaskWarrior() + >>> config = w.load_config() + >>> config['data']['location'] + '/home/threebean/.task' + >>> config['_forcecolor'] + 'yes' + + +Using Python-appropriate Types (Dates, UUIDs, etc) +++++++++++++++++++++++++++++++++++++++++++++++++++ + + >>> from taskw import TaskWarrior + >>> w = TaskWarrior(marshal=True) + >>> w.get_task(id=10) + (10, + { + 'description': 'Hello there!', + 'entry': datetime.datetime(2014, 3, 14, 14, 18, 40, tzinfo=tzutc()) + 'id': 10, + 'project': 'Saying Hello', + 'status': 'pending', + 'uuid': UUID('4882751a-3966-4439-9675-948b1152895c') + } + ) + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/taskw-1.3.1/taskw.egg-info/requires.txt new/taskw-2.0.0/taskw.egg-info/requires.txt --- old/taskw-1.3.1/taskw.egg-info/requires.txt 2021-11-25 03:29:30.000000000 +0100 +++ new/taskw-2.0.0/taskw.egg-info/requires.txt 2022-05-30 03:05:05.000000000 +0200 @@ -1,4 +1,3 @@ kitchen python-dateutil pytz -six diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/taskw-1.3.1/tox.ini new/taskw-2.0.0/tox.ini --- old/taskw-1.3.1/tox.ini 2021-11-25 03:21:45.000000000 +0100 +++ new/taskw-2.0.0/tox.ini 2022-05-30 02:59:47.000000000 +0200 @@ -1,10 +1,9 @@ [tox] -envlist = py{27,35,36,37,38}-tw{250,251} py{38}-tw{253} +envlist = py{35,36,37,38}-tw{250,251} py{38}-tw{253} downloadcache = {toxworkdir}/_download/ [testenv] basepython = - py27: python2.7 py35: python3.5 py36: python3.6 py37: python3.7
