Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at

Bug 1890444

Summary: python-isodate fails to build with Python 3.10: Tries to use Decimal as an integer
Product: [Fedora] Fedora Reporter: Tomáš Hrnčiar <thrnciar>
Component: python-isodateAssignee: James Laska <jal233>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: bperkins, dan, djc, jal233, jmatthew, mhroncok, thrnciar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-06-14 09:50:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1890881    

Description Tomáš Hrnčiar 2020-10-22 08:51:16 UTC
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/", line 400, in test_totimedelta
    self.assertEqual(dur.totimedelta(datetime(1998, 2, 25)),
  File "/builddir/build/BUILD/isodate-0.6.0/src/isodate/", line 320, in totimedelta
    return (start + self) - start
  File "/builddir/build/BUILD/isodate-0.6.0/src/isodate/", 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-isodate with Python 3.10, see:

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:

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.

Comment 1 Miro Hrončok 2020-10-22 11:53:37 UTC

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).

Comment 2 Miro Hrončok 2020-10-22 11:55:04 UTC
With Python 3.9 (current rawhide) I see the DeprecationWarning about this in build.log:

Comment 3 Dan Scott 2020-10-22 12:27:24 UTC
Looks like we'll need to pull in ?

Comment 4 Dan Scott 2020-10-22 12:29:00 UTC
Err, the direct link to the pull request is

Upstream has been inactive for over two years.

Comment 5 Tomáš Hrnčiar 2020-10-30 10:26:24 UTC
I have backported upstream PR, see:
Builds alright in Copr with Python3.10a1

Comment 6 Miro Hrončok 2021-02-02 16:49:26 UTC
Permission to merge?

Comment 7 Ben Cotton 2021-02-09 15:20:59 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle.
Changing version to 34.

Comment 8 Dan Scott 2021-02-16 04:16:54 UTC
Looks good to me. Thanks Tomáš and Miro!

Comment 9 Miro Hrončok 2021-06-04 20:16:01 UTC
This is a mass-posted update. Sorry if it is not 100% accurate to this bugzilla.

The Python 3.10 rebuild is in progress in a Koji side tag. If you manage to fix the problem, please commit the fix in the rawhide branch, but don't build the package in regular rawhide.

You can either build the package in the side tag, with:

    $ fedpkg build --target=f35-python

Or you can the build and we will eventually build it for you.

Note that the rebuild is still in progress, so not all (build) dependencies of this package might be available right away.


See also

If you have general questions about the rebuild, please use this mailing list thread:

Comment 10 Miro Hrončok 2021-06-07 23:00:21 UTC
The f35-python side tag has been merged to Rawhide. From now on, build as you would normally build.