python-simplewrap fails to build with Python 3.11.0a4. ====================================================================== ERROR: test_callback (simplewrap.tests.test_all.TestSimpleWrap) Wrap a simple function that calls a Python callback. ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/simplewrap-0.3.3/simplewrap/tests/test_all.py", line 37, in test_callback B = random.randint(1,1e6) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib64/python3.11/random.py", line 330, in randint return self.randrange(a, b+1) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib64/python3.11/random.py", line 306, in randrange istop = _index(stop) ^^^^^^^^^^^^ TypeError: 'float' object cannot be interpreted as an integer ====================================================================== ERROR: test_int (simplewrap.tests.test_all.TestSimpleWrap) Wrap a simple function with integer parameters. ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/simplewrap-0.3.3/simplewrap/tests/test_all.py", line 27, in test_int number = random.randint(1,1e6) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib64/python3.11/random.py", line 330, in randint return self.randrange(a, b+1) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib64/python3.11/random.py", line 306, in randrange istop = _index(stop) ^^^^^^^^^^^^ TypeError: 'float' object cannot be interpreted as an integer ---------------------------------------------------------------------- Ran 4 tests in 0.003s FAILED (errors=2) https://docs.python.org/3.11/whatsnew/3.11.html For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.11/fedora-rawhide-x86_64/03272504-python-simplewrap/ For all our attempts to build python-simplewrap with Python 3.11, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.11/package/python-simplewrap/ 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.11: https://copr.fedorainfracloud.org/coprs/g/python/python3.11/ Let us know here if you have any questions. Python 3.11 is planned to be included in Fedora 37. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.11. 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.
$ python3.10 >>> import random >>> random.randint(1, 1e6) $ python3.11 >>> import random >>> random.randint(1, 1e6) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python3.11/random.py", line 330, in randint return self.randrange(a, b+1) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib64/python3.11/random.py", line 306, in randrange istop = _index(stop) ^^^^^^^^^^^^ TypeError: 'float' object cannot be interpreted as an integer
https://bugs.python.org/issue42222 https://github.com/python/cpython/commit/5afa0a411243210a30526c7459a0ccff5cb88494 randrange: Remove deprecated support for non-integer values
The randint/randrange change in Python violates Python's own policy for incompatible changes. I've asked the maintainer to revert it: https://bugs.python.org/issue46624
This bug appears to have been reported against 'rawhide' during the Fedora 36 development cycle. Changing version to 36.
Looking at the COPR[1], it seems like there was finally a successful build[2], but now there is a new problem: > <frozen importlib._bootstrap>:241: RuntimeWarning: builtins.type size changed, may indicate binary incompatibility. Expected 896 from C header, got 904 from PyObject > /var/tmp/rpm-tmp.QKo0J6: line 43: 499 Segmentation fault (core dumped) /usr/bin/python3 setup.py test [1] https://copr.fedorainfracloud.org/coprs/g/python/python3.11/package/python-simplewrap/ [2] https://copr.fedorainfracloud.org/coprs/g/python/python3.11/build/3846738/
That is a transient issue. A new pre-release version of Python 3.11 has landed in our copr out and until every extension module in the dependency tree has been rebuilt with the new one, this can happen. In this case, this is probably caused by numpy.
(In reply to Miro Hrončok from comment #6) > That is a transient issue. A new pre-release version of Python 3.11 has > landed in our copr out and until every extension module in the dependency > tree has been rebuilt with the new one, this can happen. In this case, this > is probably caused by numpy. Thanks. I thought I had seen it before in another package, but had never figured out exactly what was happening.
I’m going to close this even though the build doesn’t currently succeed, since the one successful COPR build does seem to confirm the original Python change was properly reverted.