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: https://copr-be.cloud.fedoraproject.org/results/@python/python3.10/fedora-rawhide-x86_64/01715721-python-isodate/ For all our attempts to build python-isodate with Python 3.10, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.10/package/python-isodate/ Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.10: https://copr.fedorainfracloud.org/coprs/g/python/python3.10/ Let us know here if you have any questions. Python 3.10 will be included in Fedora 35. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.10. A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon. We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.
https://docs.python.org/3.10/whatsnew/3.10.html#other-language-changes 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). https://bugs.python.org/issue37999
With Python 3.9 (current rawhide) I see the DeprecationWarning about this in build.log: https://koji.fedoraproject.org/koji/buildinfo?buildID=1565949
Looks like we'll need to pull in https://github.com/gweis/isodate/issues/58 ?
Err, the direct link to the pull request is https://github.com/gweis/isodate/pull/60 Upstream has been inactive for over two years.
I have backported upstream PR, see: https://src.fedoraproject.org/rpms/python-isodate/pull-request/4 Builds alright in Copr with Python3.10a1 https://copr.fedorainfracloud.org/coprs/g/python/python3.10/build/1728227/
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!