Skip to content

A new upstream version is available: 8.4.1 Debian/latest

pytest (8.4.1-1) UNRELEASED; urgency=medium

  * Team upload.
  * New upstream version 8.4.1
  * d/patches: Drop 0004-Fix-attrs-25.2-compatibility.patch, merged upstream.
  * d/patches: Forward to upstream from 0003-Reproducible-build.patch not needed.
  * d/patches: Create 0004-Fix-test_stop_iteration_runtest_protocol.patch.

 -- klmurussi <klmurussi@hotmail.com>  Mon, 07 Jul 2025 07:06:53 -0300

Notes:

The test_stop_iteration_runtest_protocol test in testing/acceptance_test.py was failing during the sbuild process.

Upon investigation, the issue was traced to a hardcoded fnmatch_lines() check expecting StopIteration in the test output:

result.stdout.fnmatch_lines(
    [
        "=* short test summary info =*",
        "FAILED test_it.py::test_fail_call - StopIteration: 3",
        "ERROR test_it.py::test_fail_setup - StopIteration: 1",
        "ERROR test_it.py::test_fail_teardown - StopIteration: 2",
        "=* 1 failed, 1 passed, 2 errors in * =*",
    ]
)

However, according to the official Python documentation, starting from Python 3.7, such StopIteration exceptions raised inside generators are automatically wrapped in a RuntimeError as mandated by PEP 479: https://docs.python.org/3/library/exceptions.html#StopIteration

Changed in version 3.7: Enable PEP 479 for all code by default: a StopIteration error raised in a generator is transformed into a RuntimeError.

To fix this, the patch was created to conditionally assert the output based on the Python version, ensuring compatibility across versions.

Edited by Kathlyn Lara Murussi

Merge request reports

Loading