Hello community, here is the log from the commit of package python-tasklib for openSUSE:Factory checked in at 2020-03-19 19:49:21 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-tasklib (Old) and /work/SRC/openSUSE:Factory/.python-tasklib.new.3160 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-tasklib" Thu Mar 19 19:49:21 2020 rev:2 rq:786184 version:2.1.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-tasklib/python-tasklib.changes 2019-12-02 11:38:33.774463479 +0100 +++ /work/SRC/openSUSE:Factory/.python-tasklib.new.3160/python-tasklib.changes 2020-03-19 19:53:01.532274990 +0100 @@ -1,0 +2,6 @@ +Wed Mar 11 12:56:33 UTC 2020 - [email protected] + +- version update to 2.1.1 + * no upstream changelog found + +------------------------------------------------------------------- Old: ---- tasklib-1.3.0.tar.gz New: ---- tasklib-2.1.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-tasklib.spec ++++++ --- /var/tmp/diff_new_pack.1Ser6h/_old 2020-03-19 19:53:04.032275077 +0100 +++ /var/tmp/diff_new_pack.1Ser6h/_new 2020-03-19 19:53:04.032275077 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-tasklib # -# Copyright (c) 2019 SUSE LLC +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,13 +17,14 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%define skip_python2 1 Name: python-tasklib -Version: 1.3.0 +Version: 2.1.1 Release: 0 Summary: Python Task Warrior library License: BSD-3-Clause Group: Development/Languages/Python -URL: https://github.com/robgolding63/tasklib +URL: https://github.com/robgolding/tasklib Source: https://files.pythonhosted.org/packages/source/t/tasklib/tasklib-%{version}.tar.gz Patch0: disable-windows-test.patch BuildRequires: %{python_module pytz} ++++++ tasklib-1.3.0.tar.gz -> tasklib-2.1.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tasklib-1.3.0/PKG-INFO new/tasklib-2.1.1/PKG-INFO --- old/tasklib-1.3.0/PKG-INFO 2019-11-18 10:56:26.000000000 +0100 +++ new/tasklib-2.1.1/PKG-INFO 2020-01-24 22:59:29.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: tasklib -Version: 1.3.0 +Version: 2.1.1 Summary: Python Task Warrior library Home-page: https://github.com/robgolding63/tasklib Author: Rob Golding @@ -19,7 +19,7 @@ tasklib is a Python library for interacting with taskwarrior_ databases, using a queryset API similar to that of Django's ORM. - Supports Python 2.7, and 3.4 - 3.8 with taskwarrior 2.1.x and above. + Supports Python 3.5 and above, with taskwarrior 2.1.x and above. Older versions of taskwarrior are untested and may not work. Requirements @@ -64,12 +64,11 @@ Platform: UNKNOWN Classifier: Development Status :: 4 - Beta Classifier: Programming Language :: Python -Classifier: Programming Language :: Python :: 2 -Classifier: Programming Language :: Python :: 2.6 -Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.2 -Classifier: Programming Language :: Python :: 3.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: License :: OSI Approved :: BSD License Classifier: Topic :: Software Development :: Libraries :: Python Modules Classifier: Intended Audience :: Developers diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tasklib-1.3.0/README.rst new/tasklib-2.1.1/README.rst --- old/tasklib-1.3.0/README.rst 2019-11-18 10:55:31.000000000 +0100 +++ new/tasklib-2.1.1/README.rst 2020-01-24 22:57:40.000000000 +0100 @@ -10,7 +10,7 @@ tasklib is a Python library for interacting with taskwarrior_ databases, using a queryset API similar to that of Django's ORM. -Supports Python 2.7, and 3.4 - 3.8 with taskwarrior 2.1.x and above. +Supports Python 3.5 and above, with taskwarrior 2.1.x and above. Older versions of taskwarrior are untested and may not work. Requirements diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tasklib-1.3.0/pyproject.toml new/tasklib-2.1.1/pyproject.toml --- old/tasklib-1.3.0/pyproject.toml 1970-01-01 01:00:00.000000000 +0100 +++ new/tasklib-2.1.1/pyproject.toml 2020-01-23 22:48:50.000000000 +0100 @@ -0,0 +1,19 @@ +[tool.poetry] +name = "tasklib" +version = "1.3.0" +description = "Python Task Warrior library" +authors = ["Rob Golding-Day <[email protected]>"] +license = "BSD-3-Clause" + +[tool.poetry.dependencies] +# python = "2.6, 2.7, 3.2, 3.3" +six = "1.14.0" +pytz = "2019.3" +tzlocal = "2.0.0" + +[tool.poetry.dev-dependencies] +pytest = "^4.0" + +[build-system] +requires = ["poetry>=0.12"] +build-backend = "poetry.masonry.api" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tasklib-1.3.0/setup.py new/tasklib-2.1.1/setup.py --- old/tasklib-1.3.0/setup.py 2019-11-18 10:55:31.000000000 +0100 +++ new/tasklib-2.1.1/setup.py 2020-01-24 22:59:25.000000000 +0100 @@ -1,8 +1,8 @@ from setuptools import setup, find_packages -install_requirements = ['six>=1.4', 'pytz', 'tzlocal'] +install_requirements = ['pytz', 'tzlocal'] -version = '1.3.0' +version = '2.1.1' try: import importlib @@ -26,12 +26,11 @@ classifiers=[ 'Development Status :: 4 - Beta', 'Programming Language :: Python', - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.6", - "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.2", - "Programming Language :: Python :: 3.3", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", 'License :: OSI Approved :: BSD License', 'Topic :: Software Development :: Libraries :: Python Modules', 'Intended Audience :: Developers', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tasklib-1.3.0/tasklib/backends.py new/tasklib-2.1.1/tasklib/backends.py --- old/tasklib-1.3.0/tasklib/backends.py 2019-11-18 10:55:31.000000000 +0100 +++ new/tasklib-2.1.1/tasklib/backends.py 2020-01-24 22:55:37.000000000 +0100 @@ -5,8 +5,8 @@ import logging import os import re -import six import subprocess +from functools import lru_cache from .task import Task, TaskQuerySet, ReadOnlyDictView from .filters import TaskWarriorFilter @@ -84,15 +84,15 @@ class TaskWarrior(Backend): - VERSION_2_1_0 = six.u('2.1.0') - VERSION_2_2_0 = six.u('2.2.0') - VERSION_2_3_0 = six.u('2.3.0') - VERSION_2_4_0 = six.u('2.4.0') - VERSION_2_4_1 = six.u('2.4.1') - VERSION_2_4_2 = six.u('2.4.2') - VERSION_2_4_3 = six.u('2.4.3') - VERSION_2_4_4 = six.u('2.4.4') - VERSION_2_4_5 = six.u('2.4.5') + 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' + VERSION_2_4_3 = '2.4.3' + VERSION_2_4_4 = '2.4.4' + VERSION_2_4_5 = '2.4.5' def __init__(self, data_location=None, create=True, taskrc_location=None, task_command='task', @@ -142,8 +142,8 @@ for item in overrides.items(): command_args.append('rc.{0}={1}'.format(*item)) command_args.extend([ - x.decode('utf-8') if isinstance(x, six.binary_type) - else six.text_type(x) for x in args + x.decode('utf-8') if isinstance(x, bytes) + else str(x) for x in args ]) return command_args @@ -168,10 +168,10 @@ if serialized_value == '': escaped_serialized_value = '' else: - escaped_serialized_value = six.u("'{0}'").format( + escaped_serialized_value = "'{0}'".format( serialized_value) - format_default = lambda task: six.u("{0}:{1}").format( + format_default = lambda task: "{0}:{1}".format( field, escaped_serialized_value) format_func = getattr(self, 'format_{0}'.format(field), @@ -223,7 +223,7 @@ if self.version < self.VERSION_2_4_0: return task._data['description'] else: - return six.u("description:'{0}'").format( + return "description:'{0}'".format( task._data['description'] or '', ) @@ -321,6 +321,10 @@ def undo(self): self.execute_command(['undo']) + @lru_cache(maxsize=128) + def get_task(self, uuid): + return self.tasks.get(uuid=uuid) + # Backend interface implementation def filter_tasks(self, filter_obj): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tasklib-1.3.0/tasklib/filters.py new/tasklib-2.1.1/tasklib/filters.py --- old/tasklib-1.3.0/tasklib/filters.py 2017-10-26 21:38:08.000000000 +0200 +++ new/tasklib-2.1.1/tasklib/filters.py 2020-01-24 22:55:37.000000000 +0100 @@ -1,5 +1,4 @@ import abc -import six from .serializing import SerializingObject @@ -68,7 +67,7 @@ modifier = '.is' if value else '.none' key = key + modifier if '.' not in key else key - self.filter_params.append(six.u("{0}:{1}").format(key, value)) + self.filter_params.append("{0}:{1}".format(key, value)) def get_filter_params(self): return [f for f in self.filter_params if f] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tasklib-1.3.0/tasklib/lazy.py new/tasklib-2.1.1/tasklib/lazy.py --- old/tasklib-1.3.0/tasklib/lazy.py 2019-11-18 10:55:31.000000000 +0100 +++ new/tasklib-2.1.1/tasklib/lazy.py 2020-01-24 22:55:37.000000000 +0100 @@ -71,8 +71,7 @@ Performs conversion to the regular Task object, referenced by the stored UUID. """ - - replacement = self._tw.tasks.get(uuid=self._uuid) + replacement = self._tw.get_task(self._uuid) self.__class__ = replacement.__class__ self.__dict__ = replacement.__dict__ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tasklib-1.3.0/tasklib/serializing.py new/tasklib-2.1.1/tasklib/serializing.py --- old/tasklib-1.3.0/tasklib/serializing.py 2017-10-26 21:38:08.000000000 +0200 +++ new/tasklib-2.1.1/tasklib/serializing.py 2020-01-24 22:55:37.000000000 +0100 @@ -2,7 +2,6 @@ import importlib import json import pytz -import six import tzlocal @@ -177,7 +176,7 @@ return ','.join(tags) if tags else '' def deserialize_tags(self, tags): - if isinstance(tags, six.string_types): + if isinstance(tags, str): return set(tags.split(',')) if tags else set() return set(tags or []) @@ -236,7 +235,7 @@ # If the value is already localized, there is no need to change # time zone at this point. Also None is a valid value too. localized = value - elif isinstance(value, six.string_types): + elif isinstance(value, str): localized = self.backend.convert_datetime_string(value) else: raise ValueError("Provided value could not be converted to " @@ -247,7 +246,7 @@ def normalize_uuid(self, value): # Enforce sane UUID - if not isinstance(value, six.string_types) or value == '': + if not isinstance(value, str) or value == '': raise ValueError("UUID must be a valid non-empty string, " "not: {}".format(value)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tasklib-1.3.0/tasklib/task.py new/tasklib-2.1.1/tasklib/task.py --- old/tasklib-1.3.0/tasklib/task.py 2019-11-18 10:55:31.000000000 +0100 +++ new/tasklib-2.1.1/tasklib/task.py 2020-01-24 22:55:37.000000000 +0100 @@ -4,7 +4,6 @@ import json import logging import os -import six import sys from .serializing import SerializingObject @@ -41,10 +40,10 @@ def __len__(self): return len(self.viewed_dict) - def __unicode__(self): - return six.u('ReadOnlyDictView: {0}'.format(repr(self.viewed_dict))) + def __str__(self): + return 'ReadOnlyDictView: {0}'.format(repr(self.viewed_dict)) - __repr__ = __unicode__ + __repr__ = __str__ def get(self, key, default=None): return copy.deepcopy(self.viewed_dict.get(key, default)) @@ -106,10 +105,7 @@ self._data[key] = value def __str__(self): - s = six.text_type(self.__unicode__()) - if not six.PY3: - s = s.encode('utf-8') - return s + return str(self['description']) def __repr__(self): return str(self) @@ -121,7 +117,7 @@ # We need to remove spaces for TW-1504, use custom separators data_tuples = ((key, self._serialize(key, value)) - for key, value in six.iteritems(self._data)) + for key, value in self._data.items()) # Empty string denotes empty serialized value, we do not want # to pass that to TaskWarrior. @@ -160,9 +156,6 @@ def remove(self): self.task.remove_annotation(self) - def __unicode__(self): - return self['description'] - def __eq__(self, other): # consider 2 annotations equal if they belong to the same task, and # their data dics are the same @@ -171,8 +164,6 @@ def __ne__(self, other): return not self.__eq__(other) - __repr__ = __unicode__ - class Task(TaskResource): read_only_fields = ['id', 'entry', 'urgency', 'uuid', 'modified'] @@ -266,14 +257,14 @@ # Rather unfortunate syntax due to python2.6 comaptiblity self._data = dict((key, self._normalize(key, value)) - for (key, value) in six.iteritems(kwargs)) + for (key, value) in kwargs.items()) self._original_data = copy.deepcopy(self._data) # Provide read only access to the original data self.original = ReadOnlyDictView(self._original_data) - def __unicode__(self): - return self['description'] + def __str__(self): + return str(self['description']) def __eq__(self, other): if self['uuid'] and other['uuid']: @@ -296,23 +287,23 @@ @property def completed(self): - return self['status'] == six.text_type('completed') + return self['status'] == 'completed' @property def deleted(self): - return self['status'] == six.text_type('deleted') + return self['status'] == 'deleted' @property def waiting(self): - return self['status'] == six.text_type('waiting') + return self['status'] == 'waiting' @property def pending(self): - return self['status'] == six.text_type('pending') + return self['status'] == 'pending' @property def recurring(self): - return self['status'] == six.text_type('recurring') + return self['status'] == 'recurring' @property def active(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tasklib-1.3.0/tasklib/tests.py new/tasklib-2.1.1/tasklib/tests.py --- old/tasklib-1.3.0/tasklib/tests.py 2019-05-27 20:59:05.000000000 +0200 +++ new/tasklib-2.1.1/tasklib/tests.py 2020-01-24 22:55:37.000000000 +0100 @@ -6,11 +6,11 @@ import json import os import pytz -import six import shutil import sys import tempfile import unittest +from io import StringIO from .backends import TaskWarrior from .task import Task, ReadOnlyDictView @@ -144,6 +144,17 @@ ).save() self.assertEqual(len(self.tw.tasks.recurring()), 1) + def test_get_task(self): + task = Task(self.tw, description='test task') + task.save() + + fetched_task = self.tw.get_task(task['uuid']) + self.assertEqual(fetched_task, task) + + # ensure `tw.tasks` is not queried as the task is cached + self.tw.tasks = None + self.tw.get_task(task['uuid']) + def test_filtering_by_attribute(self): Task(self.tw, description='no priority task').save() Task(self.tw, priority='H', description='high priority task').save() @@ -263,7 +274,7 @@ def test_filter_dummy_by_modified(self): # Older TW version does not support bumping modified # on save - if self.tw.version < six.text_type('2.2.0'): + if self.tw.version < '2.2.0': # Python2.6 does not support SkipTest. As a workaround # mark the test as passed by exiting. if getattr(unittest, 'SkipTest', None) is not None: @@ -1019,7 +1030,7 @@ class TaskFromHookTest(TasklibTest): - input_add_data = six.StringIO( + input_add_data = StringIO( '{"description":"Buy some milk",' '"entry":"20141118T050231Z",' '"status":"pending",' @@ -1027,7 +1038,7 @@ '"uuid":"a360fc44-315c-4366-b70c-ea7e7520b749"}', ) - input_add_data_recurring = six.StringIO( + input_add_data_recurring = StringIO( '{"description":"Mow the lawn",' '"entry":"20160210T224304Z",' '"parent":"62da6227-519c-42c2-915d-dccada926ad7",' @@ -1036,7 +1047,7 @@ '"uuid":"81305335-0237-49ff-8e87-b3cdc2369cec"}', ) - input_modify_data = six.StringIO( + input_modify_data = StringIO( '\n'.join([ input_add_data.getvalue(), ( @@ -1187,7 +1198,7 @@ class DatetimeStringTest(TasklibTest): def test_simple_now_conversion(self): - if self.tw.version < six.text_type('2.4.0'): + if self.tw.version < '2.4.0': # Python2.6 does not support SkipTest. As a workaround # mark the test as passed by exiting. if getattr(unittest, 'SkipTest', None) is not None: @@ -1207,7 +1218,7 @@ self.assertTrue((t['due'] - now).total_seconds() < 5) def test_simple_eoy_conversion(self): - if self.tw.version < six.text_type('2.4.0'): + if self.tw.version < '2.4.0': # Python2.6 does not support SkipTest. As a workaround # mark the test as passed by exiting. if getattr(unittest, 'SkipTest', None) is not None: @@ -1228,7 +1239,7 @@ self.assertEqual(eoy, t['due']) def test_complex_eoy_conversion(self): - if self.tw.version < six.text_type('2.4.0'): + if self.tw.version < '2.4.0': # Python2.6 does not support SkipTest. As a workaround # mark the test as passed by exiting. if getattr(unittest, 'SkipTest', None) is not None: @@ -1251,7 +1262,7 @@ self.assertEqual(due_date, t['due']) def test_filtering_with_string_datetime(self): - if self.tw.version < six.text_type('2.4.0'): + if self.tw.version < '2.4.0': # Python2.6 does not support SkipTest. As a workaround # mark the test as passed by exiting. if getattr(unittest, 'SkipTest', None) is not None: @@ -1330,12 +1341,12 @@ class UnicodeTest(TasklibTest): def test_unicode_task(self): - Task(self.tw, description=six.u('†åßk')).save() + Task(self.tw, description='†åßk').save() self.tw.tasks.get() def test_filter_by_unicode_task(self): - Task(self.tw, description=six.u('†åßk')).save() - tasks = self.tw.tasks.filter(description=six.u('†åßk')) + Task(self.tw, description='†åßk').save() + tasks = self.tw.tasks.filter(description='†åßk') self.assertEqual(len(tasks), 1) def test_non_unicode_task(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tasklib-1.3.0/tasklib.egg-info/PKG-INFO new/tasklib-2.1.1/tasklib.egg-info/PKG-INFO --- old/tasklib-1.3.0/tasklib.egg-info/PKG-INFO 2019-11-18 10:56:26.000000000 +0100 +++ new/tasklib-2.1.1/tasklib.egg-info/PKG-INFO 2020-01-24 22:59:29.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: tasklib -Version: 1.3.0 +Version: 2.1.1 Summary: Python Task Warrior library Home-page: https://github.com/robgolding63/tasklib Author: Rob Golding @@ -19,7 +19,7 @@ tasklib is a Python library for interacting with taskwarrior_ databases, using a queryset API similar to that of Django's ORM. - Supports Python 2.7, and 3.4 - 3.8 with taskwarrior 2.1.x and above. + Supports Python 3.5 and above, with taskwarrior 2.1.x and above. Older versions of taskwarrior are untested and may not work. Requirements @@ -64,12 +64,11 @@ Platform: UNKNOWN Classifier: Development Status :: 4 - Beta Classifier: Programming Language :: Python -Classifier: Programming Language :: Python :: 2 -Classifier: Programming Language :: Python :: 2.6 -Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.2 -Classifier: Programming Language :: Python :: 3.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: License :: OSI Approved :: BSD License Classifier: Topic :: Software Development :: Libraries :: Python Modules Classifier: Intended Audience :: Developers diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tasklib-1.3.0/tasklib.egg-info/SOURCES.txt new/tasklib-2.1.1/tasklib.egg-info/SOURCES.txt --- old/tasklib-1.3.0/tasklib.egg-info/SOURCES.txt 2019-11-18 10:56:26.000000000 +0100 +++ new/tasklib-2.1.1/tasklib.egg-info/SOURCES.txt 2020-01-24 22:59:29.000000000 +0100 @@ -1,6 +1,7 @@ LICENSE MANIFEST.in README.rst +pyproject.toml setup.py tasklib/__init__.py tasklib/backends.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tasklib-1.3.0/tasklib.egg-info/requires.txt new/tasklib-2.1.1/tasklib.egg-info/requires.txt --- old/tasklib-1.3.0/tasklib.egg-info/requires.txt 2019-11-18 10:56:26.000000000 +0100 +++ new/tasklib-2.1.1/tasklib.egg-info/requires.txt 2020-01-24 22:59:29.000000000 +0100 @@ -1,3 +1,2 @@ -six>=1.4 pytz tzlocal
