numpy fails to build with Python 3.13.0b1. =================================== FAILURES =================================== ______________________________ test_iter_refcount ______________________________ @pytest.mark.skipif(not HAS_REFCOUNT, reason="Python lacks refcounts") def test_iter_refcount(): # Make sure the iterator doesn't leak # Basic a = arange(6) dt = np.dtype('f4').newbyteorder() rc_a = sys.getrefcount(a) rc_dt = sys.getrefcount(dt) with nditer(a, [], [['readwrite', 'updateifcopy']], casting='unsafe', op_dtypes=[dt]) as it: assert_(not it.iterationneedsapi) assert_(sys.getrefcount(a) > rc_a) assert_(sys.getrefcount(dt) > rc_dt) # del 'it' it = None assert_equal(sys.getrefcount(a), rc_a) assert_equal(sys.getrefcount(dt), rc_dt) # With a copy a = arange(6, dtype='f4') dt = np.dtype('f4') rc_a = sys.getrefcount(a) rc_dt = sys.getrefcount(dt) it = nditer(a, [], [['readwrite']], op_dtypes=[dt]) rc2_a = sys.getrefcount(a) rc2_dt = sys.getrefcount(dt) it2 = it.copy() assert_(sys.getrefcount(a) > rc2_a) > assert_(sys.getrefcount(dt) > rc2_dt) E AssertionError a = array([0., 1., 2., 3., 4., 5.], dtype=float32) dt = dtype('float32') it = <numpy.nditer object at 0x7fb500c6f550> it2 = <numpy.nditer object at 0x7fb500c6f5f0> rc2_a = 3 rc2_dt = 4294967295 rc_a = 2 rc_dt = 4294967295 https://docs.python.org/3.13/whatsnew/3.13.html For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.13/fedora-rawhide-x86_64/07434550-numpy/ For all our attempts to build numpy with Python 3.13, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.13/package/numpy/ 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.13: https://copr.fedorainfracloud.org/coprs/g/python/python3.13/ Let us know here if you have any questions. Python 3.13 is planned to be included in Fedora 41. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.13. 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.
Successfully built with: https://src.fedoraproject.org/rpms/numpy/c/d369de021a659b59589b431cb1972fda4acb7d7a?branch=rawhide