From 4c2251ead8bb832a19815bccad9cb1274cd5a8b01538a15fb68ca6fc34db4dc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Fri, 21 Oct 2022 08:53:24 +0000 Subject: [PATCH 1/2] Accepting request 1030313 from home:pgajdos:python - added patches https://github.com/gweis/isodate/commit/07d1602048083415bc22dc72cff152c9c2e0e021 + python-isodate-no-six.patch OBS-URL: https://build.opensuse.org/request/show/1030313 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-isodate?expand=0&rev=31 --- python-isodate-no-six.patch | 52 +++++++++++++++++++++++++++++++++++++ python-isodate.changes | 7 +++++ python-isodate.spec | 2 ++ 3 files changed, 61 insertions(+) create mode 100644 python-isodate-no-six.patch diff --git a/python-isodate-no-six.patch b/python-isodate-no-six.patch new file mode 100644 index 0000000..7f8c0fa --- /dev/null +++ b/python-isodate-no-six.patch @@ -0,0 +1,52 @@ +Index: isodate-0.6.1/setup.py +=================================================================== +--- isodate-0.6.1.orig/setup.py ++++ isodate-0.6.1/setup.py +@@ -40,7 +40,6 @@ setup(name='isodate', + + # dependencies: + install_requires=[ +- 'six' + ], + + # PyPI metadata +Index: isodate-0.6.1/src/isodate.egg-info/requires.txt +=================================================================== +--- isodate-0.6.1.orig/src/isodate.egg-info/requires.txt ++++ isodate-0.6.1/src/isodate.egg-info/requires.txt +@@ -1 +0,0 @@ +-six +Index: isodate-0.6.1/src/isodate/isoduration.py +=================================================================== +--- isodate-0.6.1.orig/src/isodate/isoduration.py ++++ isodate-0.6.1/src/isodate/isoduration.py +@@ -34,8 +34,6 @@ from datetime import timedelta + from decimal import Decimal + import re + +-from six import string_types +- + from isodate.duration import Duration + from isodate.isoerror import ISO8601Error + from isodate.isodatetime import parse_datetime +@@ -82,7 +80,7 @@ def parse_duration(datestring): + The alternative format does not support durations with years, months or + days set to 0. + """ +- if not isinstance(datestring, string_types): ++ if not isinstance(datestring, str): + raise TypeError("Expecting a string %r" % datestring) + match = ISO8601_PERIOD_REGEX.match(datestring) + if not match: +Index: isodate-0.6.1/src/isodate/tests/test_pickle.py +=================================================================== +--- isodate-0.6.1.orig/src/isodate/tests/test_pickle.py ++++ isodate-0.6.1/src/isodate/tests/test_pickle.py +@@ -1,6 +1,6 @@ + import unittest + +-from six.moves import cPickle as pickle ++import pickle + + import isodate + diff --git a/python-isodate.changes b/python-isodate.changes index 0f7719d..b4c80da 100644 --- a/python-isodate.changes +++ b/python-isodate.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Oct 21 07:59:21 UTC 2022 - pgajdos@suse.com + +- added patches + https://github.com/gweis/isodate/commit/07d1602048083415bc22dc72cff152c9c2e0e021 + + python-isodate-no-six.patch + ------------------------------------------------------------------- Mon Feb 14 21:40:35 UTC 2022 - Dirk Müller diff --git a/python-isodate.spec b/python-isodate.spec index b16eab7..cdaed6d 100644 --- a/python-isodate.spec +++ b/python-isodate.spec @@ -24,6 +24,8 @@ Summary: An ISO 8601 Date/Time/Duration Parser and Formatter License: BSD-3-Clause URL: https://pypi.org/project/isodate/ Source: https://files.pythonhosted.org/packages/source/i/isodate/isodate-%{version}.tar.gz +# https://github.com/gweis/isodate/commit/07d1602048083415bc22dc72cff152c9c2e0e021 +Patch0: python-isodate-no-six.patch BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six} BuildRequires: fdupes From fc8ebf0eb8b548115d279acb64f1ff2b934cb91947748c9e25aaf69c4bac31ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Fri, 21 Oct 2022 08:54:07 +0000 Subject: [PATCH 2/2] remove the six dep OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-isodate?expand=0&rev=32 --- python-isodate.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/python-isodate.spec b/python-isodate.spec index cdaed6d..2f25b3c 100644 --- a/python-isodate.spec +++ b/python-isodate.spec @@ -27,10 +27,8 @@ Source: https://files.pythonhosted.org/packages/source/i/isodate/isodate # https://github.com/gweis/isodate/commit/07d1602048083415bc22dc72cff152c9c2e0e021 Patch0: python-isodate-no-six.patch BuildRequires: %{python_module setuptools} -BuildRequires: %{python_module six} BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires: python-six BuildArch: noarch %python_subpackages