Package: src:pytest-httpbin
Version: 2.1.0-1
Severity: important
Tags: ftbfs trixie patch
Control: forwarded -1 https://github.com/kevin1024/pytest-httpbin/issues/99

Dear maintainer:

During a rebuild of all packages in trixie, 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/trixie/

Note: I managed to fix this by applying this simple patch:

--- a/pytest_httpbin/serve.py
+++ b/pytest_httpbin/serve.py
@@ -68,8 +68,8 @@ class SecureWSGIServer(WSGIServer):
                 address,
             )
         except Exception as e:
-            print("pytest-httpbin server hit an exception serving request: %s" 
% e)
-            print("attempting to ignore so the rest of the tests can run")
+            print("pytest-httpbin server hit an exception serving request: %s" 
% e, flush=True)
+            print("attempting to ignore so the rest of the tests can run", 
flush=True)
             raise
 
     def setup_environ(self):

which I also forwarded upstream:

https://github.com/kevin1024/pytest-httpbin/pull/100

The test failure does not seem to happen in forky/sid, but I believe the patch 
is
correct anyway, so my plan is to apply the patch in unstable first (for 
completeness),
and then make an upload for stable-proposed-updates.

Note: If you want to reproduce this in trixie, please try 
GRUB_CMDLINE_LINUX="nr_cpus=1"
first, as the probability of failure seems to be a lot higher that way.


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:pytest-httpbin, so that this is still
visible in the BTS web page for this package.

Thanks.

--------------------------------------------------------------------------------
[...]
tests/test_server.py::test_dont_crash_on_handshake_timeout pytest-httpbin 
server hit an exception serving request: _ssl.c:1012: The handshake operation 
timed out
attempting to ignore so the rest of the tests can run
FAILED

=================================== FAILURES ===================================
_____________________ test_dont_crash_on_handshake_timeout _____________________

httpbin_secure = <pytest_httpbin.serve.SecureServer object at 0x7f2c829e7cb0>
capsys = <_pytest.capture.CaptureFixture object at 0x7f2c82884050>

    def test_dont_crash_on_handshake_timeout(httpbin_secure, capsys):
        with socket.socket() as sock:
            sock.connect((httpbin_secure.host, httpbin_secure.port))
            # this request used to hang
            assert sock.recv(1) == b""
    
>       assert (
            re.match(
                r"pytest-httpbin server hit an exception serving request:.* The 
"
                "handshake operation timed out\nattempting to ignore so the 
rest "
                "of the tests can run\n",
                capsys.readouterr().out,
            )
            is not None
        )
E       AssertionError: assert None is not None
E        +  where None = <function match at 0x7f2c84d8a8e0>('pytest-httpbin 
server hit an exception serving request:.* The handshake operation timed 
out\nattempting to ignore so the rest of the tests can run\n', '')
E        +    where <function match at 0x7f2c84d8a8e0> = re.match
E        +    and   '' = CaptureResult(out='', err='').out
E        +      where CaptureResult(out='', err='') = readouterr()
E        +        where readouterr = <_pytest.capture.CaptureFixture object at 
0x7f2c82884050>.readouterr

tests/test_server.py:63: AssertionError
=========================== short test summary info ============================
FAILED tests/test_server.py::test_dont_crash_on_handshake_timeout - Assertion...
!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
========================= 1 failed, 19 passed in 2.17s =========================
E: pybuild pybuild:389: test: plugin custom failed with: exit code=1: 
python3.13 -m pytest -v -x -s
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p 3.13 
returned exit code 13
make[1]: *** [debian/rules:15: override_dh_auto_install] Error 25
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:9: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------

Reply via email to