I think these are due to problems inside the Python interpreter sorted out in 3.10.
From 3.10 release notes:
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 how and why LONG_MAX/ULONG_MAX is replaced by
long_max/ulong_max.
- Use our conventional approach to detecting Python version in testcases.
- Convert use of testcase assert.
Use Python class staticmethod syntax to access C++ static member functions,
such as Klass.memberfunction, instead of Klass_memberfunction.
Examples and test-suite changes in preparation for issue #2137.