Hide Forgot
python-isodate fails to build with Python 3.10.0a1.
======================================================================
ERROR: test_totimedelta (isodate.tests.test_duration.DurationTest)
Test conversion form Duration to timedelta.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/builddir/build/BUILD/isodate-0.6.0/src/isodate/tests/test_duration.py", line 400, in test_totimedelta
self.assertEqual(dur.totimedelta(datetime(1998, 2, 25)),
File "/builddir/build/BUILD/isodate-0.6.0/src/isodate/duration.py", line 320, in totimedelta
return (start + self) - start
File "/builddir/build/BUILD/isodate-0.6.0/src/isodate/duration.py", line 183, in __add__
newdt = other.replace(year=newyear, month=newmonth, day=newday)
TypeError: 'decimal.Decimal' object cannot be interpreted as an integer
----------------------------------------------------------------------
Ran 278 tests in 0.070s
FAILED (errors=45)
Test failed: <unittest.runner.TextTestResult run=278 errors=45 failures=0>
For the build logs, see:
For all our attempts to build python-isod.
Builtin and extension functions that take integer arguments no longer accept Decimals, Fractions and other objects that can be converted to integers only with a loss (e.g. that have the __int__() method but do not have the __index__() method).
With Python 3.9 (current rawhide) I see the DeprecationWarning about this in build.log:
Looks like we'll need to pull in ?
Err, the direct link to the pull request is
Upstream has been inactive for over two years.
I have backported upstream PR, see:
Builds alright in Copr with Python3.10a1
Permission to merge?
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle.
Changing version to 34.
Looks good to me. Thanks Tomáš and Miro!