1
0

- update to 0.6.1:

* support python 3.10 ()
  * last version to support py 2.7
- drop coerce-decimal-to-int-python-310.patch (upstream)

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-isodate?expand=0&rev=30
This commit is contained in:
Dirk Mueller 2022-02-14 21:43:01 +00:00 committed by Git OBS Bridge
parent 854684b73b
commit fcec695277
5 changed files with 13 additions and 44 deletions

View File

@ -1,37 +0,0 @@
From 201720a3717426c33ff114b3169ac6d7d29de2c0 Mon Sep 17 00:00:00 2001
From: Hugo van Kemenade <hugovk@users.noreply.github.com>
Date: Mon, 13 Sep 2021 12:38:36 +0300
Subject: [PATCH 3/4] Fix for Python 3.10: TypeError: 'decimal.Decimal' object
cannot be interpreted as an integer
---
src/isodate/duration.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/isodate/duration.py b/src/isodate/duration.py
index 6d1848c..4b83e45 100644
--- a/src/isodate/duration.py
+++ b/src/isodate/duration.py
@@ -180,7 +180,9 @@ def __add__(self, other):
newday = maxdays
else:
newday = other.day
- newdt = other.replace(year=newyear, month=newmonth, day=newday)
+ newdt = other.replace(
+ year=int(newyear), month=int(newmonth), day=int(newday)
+ )
# does a timedelta + date/datetime
return self.tdelta + newdt
except AttributeError:
@@ -264,7 +266,9 @@ def __rsub__(self, other):
newday = maxdays
else:
newday = other.day
- newdt = other.replace(year=newyear, month=newmonth, day=newday)
+ newdt = other.replace(
+ year=int(newyear), month=int(newmonth), day=int(newday)
+ )
return newdt - self.tdelta
except AttributeError:
# other probably was not compatible with data/datetime

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2e364a3d5759479cdb2d37cce6b9376ea504db2ff90252a2e5b7cc89cc9ff2d8
size 28480

BIN
isodate-0.6.1.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Mon Feb 14 21:40:35 UTC 2022 - Dirk Müller <dmueller@suse.com>
- update to 0.6.1:
* support python 3.10 ()
* last version to support py 2.7
- drop coerce-decimal-to-int-python-310.patch (upstream)
-------------------------------------------------------------------
Mon Dec 13 01:44:25 UTC 2021 - Steve Kowalik <steven.kowalik@suse.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package python-isodate
#
# 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
@ -18,14 +18,12 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-isodate
Version: 0.6.0
Version: 0.6.1
Release: 0
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
# PATCH-FIX-UPSTREAM gh#gweis/isodate#68
Patch0: coerce-decimal-to-int-python-310.patch
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six}
BuildRequires: fdupes