Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-isodate for openSUSE:Factory 
checked in at 2021-12-16 21:19:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-isodate (Old)
 and      /work/SRC/openSUSE:Factory/.python-isodate.new.2520 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-isodate"

Thu Dec 16 21:19:16 2021 rev:18 rq:940121 version:0.6.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-isodate/python-isodate.changes    
2021-11-10 21:45:57.107798474 +0100
+++ /work/SRC/openSUSE:Factory/.python-isodate.new.2520/python-isodate.changes  
2021-12-16 21:20:06.826539539 +0100
@@ -1,0 +2,6 @@
+Mon Dec 13 01:44:25 UTC 2021 - Steve Kowalik <steven.kowa...@suse.com>
+
+- Add patch coerce-decimal-to-int-python-310.patch:
+  * Support Python 3.10.
+
+-------------------------------------------------------------------

New:
----
  coerce-decimal-to-int-python-310.patch

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

Other differences:
------------------
++++++ python-isodate.spec ++++++
--- /var/tmp/diff_new_pack.b5uAEt/_old  2021-12-16 21:20:07.310539723 +0100
+++ /var/tmp/diff_new_pack.b5uAEt/_new  2021-12-16 21:20:07.314539724 +0100
@@ -22,9 +22,10 @@
 Release:        0
 Summary:        An ISO 8601 Date/Time/Duration Parser and Formatter
 License:        BSD-3-Clause
-Group:          Development/Languages/Python
 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
@@ -42,6 +43,7 @@
 
 %prep
 %setup -q -n isodate-%{version}
+%autopatch -p1
 
 %build
 %python_build

++++++ coerce-decimal-to-int-python-310.patch ++++++
>From 201720a3717426c33ff114b3169ac6d7d29de2c0 Mon Sep 17 00:00:00 2001
From: Hugo van Kemenade <hug...@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

Reply via email to