Source: numpy
Version: 1:1.26.4+ds-11
Severity: normal
User: debian-pyt...@lists.debian.org
Usertags: python3.13

This package failed build from source when test-built against a version of
python3-defaults that includes 3.13 as a supported version.

To reproduce this issue, build against python3-defaults (python3-all-dev etc.)
from Debian experimental.

What's new in Python 3.13:
https://docs.python.org/3.13/whatsnew/3.13.html

Log snippet:

../../.pybuild/cpython3_3.13/build/numpy/typing/tests/test_runtime.py .. [ 99%]
...................x...                                                  [100%]

=================================== 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 0xffff8189d4d0>
it2        = <numpy.nditer object at 0xffff8189d570>
rc2_a      = 3
rc2_dt     = 4294967295
rc_a       = 2
rc_dt      = 4294967295

../../.pybuild/cpython3_3.13/build/numpy/core/tests/test_nditer.py:70: 
AssertionError
_____________ test_deprecate_help_indentation[old_func4-old_func4] _____________

old_func = <function old_func4 at 0xffff8cbe60c0>
new_func = <function old_func4 at 0xffff8cbe6160>

    @pytest.mark.skipif(sys.flags.optimize == 2, reason="-OO discards 
docstrings")
    @pytest.mark.parametrize('old_func, new_func', [
        (old_func4, new_func4),
        (old_func5, new_func5),
        (old_func6, new_func6),
    ])
    def test_deprecate_help_indentation(old_func, new_func):
        _compare_docs(old_func, new_func)
        # Ensure we don't mess up the indentation
        for knd, func in (('old', old_func), ('new', new_func)):
            for li, line in enumerate(func.__doc__.split('\n')):
                if li == 0:
                    assert line.startswith('    ') or not line.startswith(' '), 
knd
                elif line:
>                   assert line.startswith('    '), knd
E                   AssertionError: old
E                   assert False
E                    +  where False = <built-in method startswith of str object 
at 0xffff8828dc70>('    ')
E                    +    where <built-in method startswith of str object at 
0xffff8828dc70> = 'Further info.'.startswith

func       = <function old_func4 at 0xffff8cbe60c0>
knd        = 'old'
li         = 2
line       = 'Further info.'
new_func   = <function old_func4 at 0xffff8cbe6160>
old_func   = <function old_func4 at 0xffff8cbe60c0>

../../.pybuild/cpython3_3.13/build/numpy/lib/tests/test_utils.py:104: 
AssertionError
_____________ test_deprecate_help_indentation[old_func5-old_func5] _____________

old_func = <function old_func5 at 0xffff8cbe6200>
new_func = <function old_func5 at 0xffff8cbe62a0>

    @pytest.mark.skipif(sys.flags.optimize == 2, reason="-OO discards 
docstrings")
    @pytest.mark.parametrize('old_func, new_func', [
        (old_func4, new_func4),
        (old_func5, new_func5),
        (old_func6, new_func6),
    ])
    def test_deprecate_help_indentation(old_func, new_func):
        _compare_docs(old_func, new_func)
        # Ensure we don't mess up the indentation
        for knd, func in (('old', old_func), ('new', new_func)):
            for li, line in enumerate(func.__doc__.split('\n')):
                if li == 0:
                    assert line.startswith('    ') or not line.startswith(' '), 
knd
                elif line:
>                   assert line.startswith('    '), knd
E                   AssertionError: old
E                   assert False
E                    +  where False = <built-in method startswith of str object 
at 0xffff886282b0>('    ')
E                    +    where <built-in method startswith of str object at 
0xffff886282b0> = 'Bizarre indentation.'.startswith

func       = <function old_func5 at 0xffff8cbe6200>
knd        = 'old'
li         = 2
line       = 'Bizarre indentation.'
new_func   = <function old_func5 at 0xffff8cbe62a0>
old_func   = <function old_func5 at 0xffff8cbe6200>

../../.pybuild/cpython3_3.13/build/numpy/lib/tests/test_utils.py:104: 
AssertionError
_____________ test_deprecate_help_indentation[old_func6-old_func6] _____________

old_func = <function old_func6 at 0xffff8cbe6340>
new_func = <function old_func6 at 0xffff8cbe63e0>

    @pytest.mark.skipif(sys.flags.optimize == 2, reason="-OO discards 
docstrings")
    @pytest.mark.parametrize('old_func, new_func', [
        (old_func4, new_func4),
        (old_func5, new_func5),
        (old_func6, new_func6),
    ])
    def test_deprecate_help_indentation(old_func, new_func):
        _compare_docs(old_func, new_func)
        # Ensure we don't mess up the indentation
        for knd, func in (('old', old_func), ('new', new_func)):
            for li, line in enumerate(func.__doc__.split('\n')):
                if li == 0:
                    assert line.startswith('    ') or not line.startswith(' '), 
knd
                elif line:
>                   assert line.startswith('    '), knd
E                   AssertionError: old
E                   assert False
E                    +  where False = <built-in method startswith of str object 
at 0xffff830628f0>('    ')
E                    +    where <built-in method startswith of str object at 
0xffff830628f0> = 'Also in PEP-257.'.startswith

func       = <function old_func6 at 0xffff8cbe6340>
knd        = 'old'
li         = 1
line       = 'Also in PEP-257.'
new_func   = <function old_func6 at 0xffff8cbe63e0>
old_func   = <function old_func6 at 0xffff8cbe6340>

../../.pybuild/cpython3_3.13/build/numpy/lib/tests/test_utils.py:104: 
AssertionError
______________________ test_deprecate_preserve_whitespace ______________________

    @pytest.mark.skipif(sys.flags.optimize == 2, reason="-OO discards 
docstrings")
    def test_deprecate_preserve_whitespace():
>       assert_('\n        Bizarre' in new_func5.__doc__)
E       AssertionError


../../.pybuild/cpython3_3.13/build/numpy/lib/tests/test_utils.py:116: 
AssertionError
=========================== short test summary info ============================
FAILED 
../../.pybuild/cpython3_3.13/build/numpy/core/tests/test_nditer.py::test_iter_refcount
FAILED 
../../.pybuild/cpython3_3.13/build/numpy/lib/tests/test_utils.py::test_deprecate_help_indentation[old_func4-old_func4]
FAILED 
../../.pybuild/cpython3_3.13/build/numpy/lib/tests/test_utils.py::test_deprecate_help_indentation[old_func5-old_func5]
FAILED 
../../.pybuild/cpython3_3.13/build/numpy/lib/tests/test_utils.py::test_deprecate_help_indentation[old_func6-old_func6]
FAILED 
../../.pybuild/cpython3_3.13/build/numpy/lib/tests/test_utils.py::test_deprecate_preserve_whitespace
= 5 failed, 32806 passed, 1007 skipped, 1315 deselected, 31 xfailed, 3 xpassed 
in 158.60s (0:02:38) =
E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13/build; {interpreter} {dir}/runtests.py 
--no-build --verbose --pythonpath {build_dir} -- -k 'not (cython or 
test_all_modules_are_expected or test_impossible_feature_enable)'

If required, the full build log is available here (for the next 30 days):
https://debusine.debian.net/artifact/770640/

This bug has been filed at "normal" severity, as we haven't started the
transition to add 3.13 as a supported version, yet. This will be raised to RC
as soon as that happens, hopefully well before trixie.

Thanks,

Stefano

Reply via email to