Package: src:sphinx-autodoc-typehints Version: 3.12.0-1 Severity: serious Tags: ftbfs forky sid
Dear maintainer: During a rebuild of all packages in unstable, this package failed to build. Below you will find the last part of the build log (probably the most relevant part, but not necessarily). If required, the full build log is available here: https://people.debian.org/~sanvila/build-logs/202608/ About the archive rebuild: The build was made on virtual machines from AWS, using sbuild and a reduced chroot with only build-essential packages. If you cannot reproduce the bug please contact me privately, as I am willing to provide ssh access to a virtual machine where the bug is fully reproducible. If this is really a bug in one of the build-depends, please use reassign and add an affects on src:sphinx-autodoc-typehints, so that this is still visible in the BTS web page for this package. Thanks. -------------------------------------------------------------------------------- [...] =================================== FAILURES =================================== _____________________ test_format_annotation[FunctionType] _____________________ inv = Inventory(project='Python', version='3.14', source_type=<SourceTypes.DictJSON: 'dict_json'>) annotation = <class 'function'> expected_result = ':py:data:`~types.FunctionType`' @pytest.mark.parametrize(("annotation", "expected_result"), _CASES) def test_format_annotation(inv: Inventory, annotation: Any, expected_result: str) -> None: conf = create_autospec(Config, _annotation_globals=globals(), always_use_bars_union=False) result = format_annotation(annotation, conf) assert result == expected_result if re.match(r"^:py:data:`~typing\.Union`\\\[.*``None``.*]", expected_result): # pragma: <3.14 cover expected_result_not_simplified = expected_result.replace(", ``None``", "") expected_result_not_simplified += ":py:data:`~typing.Optional`\\ \\[" expected_result_not_simplified += "]" conf = create_autospec( Config, simplify_optional_unions=False, _annotation_globals=globals(), always_use_bars_union=False, ) assert format_annotation(annotation, conf) == expected_result_not_simplified if "typing" in expected_result_not_simplified: expected_result_not_simplified = expected_result_not_simplified.replace("~typing", "typing") conf = create_autospec( Config, typehints_fully_qualified=True, simplify_optional_unions=False, _annotation_globals=globals(), ) assert format_annotation(annotation, conf) == expected_result_not_simplified if "typing" in expected_result or __name__ in expected_result: expected_result = expected_result.replace("~typing", "typing") expected_result = expected_result.replace("~collections.abc", "collections.abc") expected_result = expected_result.replace("~numpy", "numpy") expected_result = expected_result.replace("~" + __name__, __name__) conf = create_autospec( Config, typehints_fully_qualified=True, _annotation_globals=globals(), always_use_bars_union=False, ) assert format_annotation(annotation, conf) == expected_result if ( result.count(":py:") == 1 and ("typing" in result or "types" in result) and (match := re.match(r"^:py:(?P<role>class|data|func):`~(?P<name>[^`]+)`", result)) ): name = match.group("name") expected_role = next((o.role for o in inv.objects if o.name == name), None) if expected_role == "function": # pragma: no cover -- Python docs inventory always uses "func" expected_role = "func" > assert match.group("role") == expected_role E AssertionError: assert 'data' == 'class' E E - class E + data tests/test_annotations.py:450: AssertionError ______________________ test_format_annotation[FrameType] _______________________ inv = Inventory(project='Python', version='3.14', source_type=<SourceTypes.DictJSON: 'dict_json'>) annotation = <class 'frame'>, expected_result = ':py:data:`~types.FrameType`' @pytest.mark.parametrize(("annotation", "expected_result"), _CASES) def test_format_annotation(inv: Inventory, annotation: Any, expected_result: str) -> None: conf = create_autospec(Config, _annotation_globals=globals(), always_use_bars_union=False) result = format_annotation(annotation, conf) assert result == expected_result if re.match(r"^:py:data:`~typing\.Union`\\\[.*``None``.*]", expected_result): # pragma: <3.14 cover expected_result_not_simplified = expected_result.replace(", ``None``", "") expected_result_not_simplified += ":py:data:`~typing.Optional`\\ \\[" expected_result_not_simplified += "]" conf = create_autospec( Config, simplify_optional_unions=False, _annotation_globals=globals(), always_use_bars_union=False, ) assert format_annotation(annotation, conf) == expected_result_not_simplified if "typing" in expected_result_not_simplified: expected_result_not_simplified = expected_result_not_simplified.replace("~typing", "typing") conf = create_autospec( Config, typehints_fully_qualified=True, simplify_optional_unions=False, _annotation_globals=globals(), ) assert format_annotation(annotation, conf) == expected_result_not_simplified if "typing" in expected_result or __name__ in expected_result: expected_result = expected_result.replace("~typing", "typing") expected_result = expected_result.replace("~collections.abc", "collections.abc") expected_result = expected_result.replace("~numpy", "numpy") expected_result = expected_result.replace("~" + __name__, __name__) conf = create_autospec( Config, typehints_fully_qualified=True, _annotation_globals=globals(), always_use_bars_union=False, ) assert format_annotation(annotation, conf) == expected_result if ( result.count(":py:") == 1 and ("typing" in result or "types" in result) and (match := re.match(r"^:py:(?P<role>class|data|func):`~(?P<name>[^`]+)`", result)) ): name = match.group("name") expected_role = next((o.role for o in inv.objects if o.name == name), None) if expected_role == "function": # pragma: no cover -- Python docs inventory always uses "func" expected_role = "func" > assert match.group("role") == expected_role E AssertionError: assert 'data' == 'class' E E - class E + data tests/test_annotations.py:450: AssertionError =========================== short test summary info ============================ FAILED tests/test_annotations.py::test_format_annotation[FunctionType] - Asse... FAILED tests/test_annotations.py::test_format_annotation[FrameType] - Asserti... =========== 2 failed, 692 passed, 24 skipped, 1 deselected in 14.59s =========== E: pybuild pybuild:485: test: plugin pyproject failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.14_sphinx-autodoc-typehints/build; python3.14 -m pytest --deselect tests/test_resolver/test_stubs.py::test_sphinx_build_stub_types_produce_crossrefs dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p 3.14 --parallel=2 returned exit code 13 make: *** [debian/rules:9: binary] Error 25 dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2 --------------------------------------------------------------------------------

