Source: python-munch Version: 4.0.0-1 Severity: normal User: [email protected] Usertags: python3.13 Forwarded: https://github.com/Infinidat/munch/issues/103
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_munch/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>> configfile: setup.cfg plugins: typeguard-4.3.0 collected 112 items tests/test_munch.py ...........................F........................ [ 46%] .....F............................................... [ 93%] tests/test_readme.py . [ 94%] tests/test_yaml.py ...... [100%] =================================== FAILURES =================================== __________________ test_reserved_attributes[__firstlineno__] ___________________ attrname = '__firstlineno__' @pytest.mark.parametrize("attrname", dir(Munch)) def test_reserved_attributes(attrname): # Make sure that the default attributes on the Munch instance are # accessible. taken_munch = Munch(**{attrname: 'abc123'}) # Make sure that the attribute is determined as in the filled collection... assert attrname in taken_munch # ...and that it is available using key access... assert taken_munch[attrname] == 'abc123' # ...but that it is not available using attribute access. attr = getattr(taken_munch, attrname) assert attr != 'abc123' empty_munch = Munch() # Make sure that the attribute is not seen contained in the empty # collection... assert attrname not in empty_munch # ...and that the attr is of the correct original type. attr = getattr(empty_munch, attrname) if attrname == '__doc__': assert isinstance(attr, str) elif attrname in ('__hash__', '__weakref__'): assert attr is None elif attrname == '__module__': assert attr == 'munch' elif attrname == '__dict__': assert attr == {} else: > assert callable(attr) E assert False E + where False = callable(48) tests/test_munch.py:229: AssertionError _______________ test_reserved_attributes[__static_attributes__] ________________ attrname = '__static_attributes__' @pytest.mark.parametrize("attrname", dir(Munch)) def test_reserved_attributes(attrname): # Make sure that the default attributes on the Munch instance are # accessible. taken_munch = Munch(**{attrname: 'abc123'}) # Make sure that the attribute is determined as in the filled collection... assert attrname in taken_munch # ...and that it is available using key access... assert taken_munch[attrname] == 'abc123' # ...but that it is not available using attribute access. attr = getattr(taken_munch, attrname) assert attr != 'abc123' empty_munch = Munch() # Make sure that the attribute is not seen contained in the empty # collection... assert attrname not in empty_munch # ...and that the attr is of the correct original type. attr = getattr(empty_munch, attrname) if attrname == '__doc__': assert isinstance(attr, str) elif attrname in ('__hash__', '__weakref__'): assert attr is None elif attrname == '__module__': assert attr == 'munch' elif attrname == '__dict__': assert attr == {} else: > assert callable(attr) E assert False E + where False = callable(()) tests/test_munch.py:229: AssertionError =========================== short test summary info ============================ FAILED tests/test_munch.py::test_reserved_attributes[__firstlineno__] - asser... FAILED tests/test_munch.py::test_reserved_attributes[__static_attributes__] ======================== 2 failed, 110 passed in 0.26s ========================= E: pybuild pybuild:389: test: plugin distutils failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_munch/build; python3.13 -m pytest tests I: pybuild base:311: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_munch/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>> configfile: setup.cfg plugins: typeguard-4.3.0 collected 110 items tests/test_munch.py .................................................... [ 47%] ................................................... [ 93%] tests/test_readme.py . [ 94%] tests/test_yaml.py ...... [100%] ============================= 110 passed in 0.23s ============================== dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.13 3.12" returned exit code 13 make: *** [debian/rules:5: binary] Error 25 dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2 -------------------------------------------------------------------------------- Build finished at 2024-09-19T04:30:07Z If required, the full build log is available here (for the next 30 days): https://debusine.debian.net/artifact/786292/ 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

