Source: python-itemloaders
Version: 1.3.1-1
Severity: normal
User: [email protected]
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:

   dh_auto_test -O--buildsystem=pybuild
I: pybuild base:311: cd 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_itemloaders/build; python3.13 -m pytest 
tests
============================= test session starts ==============================
platform linux -- Python 3.13.0rc2, pytest-8.3.3, pluggy-1.5.0
rootdir: /<<PKGBUILDDIR>>
plugins: typeguard-4.3.0
collected 90 items

tests/test_base_loader.py ......................................         [ 42%]
tests/test_loader_initialization.py ..........                           [ 53%]
tests/test_nested_items.py ....                                          [ 57%]
tests/test_nested_loader.py ......                                       [ 64%]
tests/test_output_processor.py ..                                        [ 66%]
tests/test_processors.py .....                                           [ 72%]
tests/test_select_jmes.py .                                              [ 73%]
tests/test_selector_loader.py ......................                     [ 97%]
tests/test_utils_misc.py .                                               [ 98%]
tests/test_utils_python.py F                                             [100%]

=================================== FAILURES ===================================
____________________ UtilsPythonTestCase.test_get_func_args ____________________

self = <tests.test_utils_python.UtilsPythonTestCase 
testMethod=test_get_func_args>

    def test_get_func_args(self):
        def f1(a, b, c):
            pass
    
        def f2(a, b=None, c=None):
            pass
    
        def f3(a, b=None, *, c=None):
            pass
    
        class A:
            def __init__(self, a: Any, b: Any, c: Any):
                pass
    
            def method(self, a, b, c):
                pass
    
        class Callable:
            def __call__(self, a, b, c):
                pass
    
        a = A(1, 2, 3)
        cal = Callable()
        partial_f1 = functools.partial(f1, None)
        partial_f2 = functools.partial(f1, b=None)
        partial_f3 = functools.partial(partial_f2, None)
    
        self.assertEqual(get_func_args(f1), ["a", "b", "c"])
        self.assertEqual(get_func_args(f2), ["a", "b", "c"])
        self.assertEqual(get_func_args(f3), ["a", "b", "c"])
        self.assertEqual(get_func_args(A), ["a", "b", "c"])
        self.assertEqual(get_func_args(a.method), ["a", "b", "c"])
        self.assertEqual(get_func_args(partial_f1), ["b", "c"])
        self.assertEqual(get_func_args(partial_f2), ["a", "c"])
        self.assertEqual(get_func_args(partial_f3), ["c"])
        self.assertEqual(get_func_args(cal), ["a", "b", "c"])
        self.assertEqual(get_func_args(object), [])
        self.assertEqual(get_func_args(str.split, stripself=True), ["sep", 
"maxsplit"])
        self.assertEqual(get_func_args(" ".join, stripself=True), ["iterable"])
    
        if platform.python_implementation() == "CPython":
            # This didn't work on older versions of CPython: 
https://github.com/python/cpython/issues/86951
>           self.assertIn(
                get_func_args(operator.itemgetter(2), stripself=True),
                [[], ["args", "kwargs"]],
E               AssertionError: ['obj'] not found in [[], ['args', 'kwargs']]

tests/test_utils_python.py:53: AssertionError
=========================== short test summary info ============================
FAILED tests/test_utils_python.py::UtilsPythonTestCase::test_get_func_args - ...
========================= 1 failed, 89 passed in 0.46s =========================
E: pybuild pybuild:389: test: plugin distutils failed with: exit code=1: cd 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_itemloaders/build; python3.13 -m pytest 
tests
I: pybuild base:311: cd 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_itemloaders/build; python3.12 -m pytest 
tests
============================= test session starts ==============================
platform linux -- Python 3.12.6, pytest-8.3.3, pluggy-1.5.0
rootdir: /<<PKGBUILDDIR>>
plugins: typeguard-4.3.0
collected 90 items

tests/test_base_loader.py ......................................         [ 42%]
tests/test_loader_initialization.py ..........                           [ 53%]
tests/test_nested_items.py ....                                          [ 57%]
tests/test_nested_loader.py ......                                       [ 64%]
tests/test_output_processor.py ..                                        [ 66%]
tests/test_processors.py .....                                           [ 72%]
tests/test_select_jmes.py .                                              [ 73%]
tests/test_selector_loader.py ......................                     [ 97%]
tests/test_utils_misc.py .                                               [ 98%]
tests/test_utils_python.py .                                             [100%]

============================== 90 passed in 0.45s ==============================
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.13 
3.12" returned exit code 13
make: *** [debian/rules:6: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------
Build finished at 2024-09-19T03:06:45Z


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

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