Package: src:python-falcon
Version: 4.2.0-2
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/202606/

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

Thanks.

--------------------------------------------------------------------------------
[...]
 debian/rules clean
make: pyversions: No such file or directory
py3versions: no X-Python3-Version in control file, using supported versions
debian/rules:40: warning: overriding recipe for target 
'override_dh_installchangelogs'
/usr/share/openstack-pkg-tools/pkgos.make:59: warning: ignoring old recipe for 
target 'override_dh_installchangelogs'
dh clean --buildsystem=python_distutils --with python3
   debian/rules override_dh_auto_clean
make[1]: Entering directory '/<<PKGBUILDDIR>>'
make[1]: pyversions: No such file or directory
py3versions: no X-Python3-Version in control file, using supported versions
debian/rules:40: warning: overriding recipe for target 
'override_dh_installchangelogs'
/usr/share/openstack-pkg-tools/pkgos.make:59: warning: ignoring old recipe for 
target 'override_dh_installchangelogs'
rm -rf build .stestr *.egg-info .pytest_cache
find falcon/ -iname '*.c' -delete
find . -iname '*.pyc' -delete

[... snipped ...]

tests/test_wsgi_servers.py::TestWSGIServer::test_static_file_byte_range[uvicorn-2-6-port]
 PASSED [ 99%]
tests/test_wsgi_servers.py::TestWSGIServer::test_static_file_byte_range[uvicorn-32-38-random]
 PASSED [ 99%]
tests/test_wsgi_servers.py::TestWSGIServer::test_static_file_byte_range[uvicorn--47-The
 content of this comment is part of a test.\n] PASSED [ 99%]
tests/test_wsgi_servers.py::TestWSGIServer::test_static_file_byte_range[uwsgi-7--hashlib]
 SKIPPED [ 99%]
tests/test_wsgi_servers.py::TestWSGIServer::test_static_file_byte_range[uwsgi-2-6-port]
 SKIPPED [ 99%]
tests/test_wsgi_servers.py::TestWSGIServer::test_static_file_byte_range[uwsgi-32-38-random]
 SKIPPED [ 99%]
tests/test_wsgi_servers.py::TestWSGIServer::test_static_file_byte_range[uwsgi--47-The
 content of this comment is part of a test.\n] SKIPPED [ 99%]
tests/test_wsgi_servers.py::TestWSGIServer::test_static_file_byte_range[waitress-7--hashlib]
 SKIPPED [ 99%]
tests/test_wsgi_servers.py::TestWSGIServer::test_static_file_byte_range[waitress-2-6-port]
 SKIPPED [ 99%]
tests/test_wsgi_servers.py::TestWSGIServer::test_static_file_byte_range[waitress-32-38-random]
 SKIPPED [ 99%]
tests/test_wsgi_servers.py::TestWSGIServer::test_static_file_byte_range[waitress--47-The
 content of this comment is part of a test.\n] SKIPPED [ 99%]
tests/test_wsgiref_inputwrapper_with_size.py::TestWsgiRefInputWrapper::test_resources_can_read_request_stream_during_tests
 PASSED [100%]

=================================== FAILURES ===================================
____________________________ test_media[True-True] _____________________________

custom_text = True, custom_data = True
conductor = <falcon.testing.client.ASGIConductor object at 0x7f0ddaa8e2e0>

    @pytest.mark.parametrize('custom_text', [True, False])
    @pytest.mark.parametrize('custom_data', [True, False])
    @pytest.mark.skipif(msgpack is None, reason='msgpack is required for this 
test')
    async def test_media(custom_text, custom_data, conductor):  # NOQA: C901
        # TODO(kgriffs): Refactor to reduce McCabe score
    
        sample_doc = {
            'answer': 42,
            'runes': b'\xe1\x9a\xa0\xe1\x9b\x87\xe1\x9a\xbb'.decode(),
            'ascii': 'hello world',
        }
    
        sample_doc_bin = sample_doc.copy()
        sample_doc_bin['bits'] = os.urandom(32)
        sample_doc_bin['array'] = [0, 1, 2]
    
        class Resource:
            def __init__(self):
                self.finished = asyncio.Event()
                self.docs_received = []
                self.deserialize_error_count = 0
    
            async def on_websocket(self, req, ws):
                try:
                    await ws.accept()
    
                    await ws.send_media(sample_doc)
                    self.docs_received.append(await ws.receive_media())
                    await ws.send_media(sample_doc, 
falcon.WebSocketPayloadType.TEXT)
                    self.docs_received.append(await ws.receive_media())
    
                    await ws.send_media(sample_doc_bin, 
falcon.WebSocketPayloadType.BINARY)
                    self.docs_received.append(await ws.receive_media())
    
                    for __ in range(3):
                        try:
                            await ws.receive_media()
                        except ValueError:
                            self.deserialize_error_count += 1
                finally:
                    self.finished.set()
    
        app = conductor.app
    
        resource = Resource()
        app.add_route('/', resource)
    
        if custom_text:
            if rapidjson is None:
                pytest.skip('rapidjson is required for this test')
    
            # Let's say we want to use a faster JSON library. You could also 
use this
            #   pattern to add serialization support for custom types that 
aren't
            #   normally JSON-serializable out of the box.
            class RapidJSONHandler(media.TextBaseHandlerWS):
                def serialize(self, media: object) -> str:
                    return rapidjson.dumps(media, ensure_ascii=False)
    
                # The raw TEXT payload will be passed as a Unicode string
                def deserialize(self, payload: str) -> object:
                    return rapidjson.loads(payload)
    
            app.ws_options.media_handlers[falcon.WebSocketPayloadType.TEXT] = (
                RapidJSONHandler()
            )
    
        if custom_data:
            if cbor2 is None:
                pytest.skip('cbor2 is required for this test')
    
            class CBORHandler(media.BinaryBaseHandlerWS):
                def serialize(self, media: object) -> bytes:
                    return cbor2.dumps(media)
    
                # The raw BINARY payload will be passed as a byte string
                def deserialize(self, payload: bytes) -> object:
                    return cbor2.loads(payload)
    
            app.ws_options.media_handlers[falcon.WebSocketPayloadType.BINARY] = 
(
                CBORHandler()
            )
    
        async with conductor as c:
            async with c.simulate_ws() as ws:
                for __ in range(2):
                    doc = await ws.receive_json()
                    await ws.send_json(doc)
    
                if custom_data:
                    data = await ws.receive_data()
                    cbor2.loads(data)  # NOTE(kgriffs): Validate serialization 
format
                    await ws.send_data(data)
                else:
                    doc = await ws.receive_msgpack()
                    await ws.send_msgpack(doc)
    
                # NOTE(kgriffs): The first one will work, but we include it to
                #    ensure we aren't getting any false-positives.
                await ws.send_text('"DEADBEEF"')
                await ws.send_text('DEADBEEF')
                await ws.send_data(b'\xde\xad\xbe\xef')
    
                await resource.finished.wait()
    
>       assert resource.deserialize_error_count == 2
E       assert 1 == 2
E        +  where 1 = <asgi.test_ws.test_media.<locals>.Resource object at 
0x7f0dda7bd160>.deserialize_error_count

tests/asgi/test_ws.py:515: AssertionError
------------------------------ Captured log call -------------------------------
ERROR    falcon:app.py:1349 [FALCON] Unhandled exception in ASGI app
Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/falcon/asgi/app.py", line 1243, in _handle_websocket
    await on_websocket(req, web_socket, **params)
  File "/<<PKGBUILDDIR>>/tests/asgi/test_ws.py", line 447, in on_websocket
    await ws.receive_media()
  File "/<<PKGBUILDDIR>>/falcon/asgi/ws.py", line 476, in receive_media
    return self._mh_bin_deserialize(data)
           ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "/<<PKGBUILDDIR>>/tests/asgi/test_ws.py", line 487, in deserialize
    return cbor2.loads(payload)
           ~~~~~~~~~~~^^^^^^^^^
cbor2.CBORDecodeError: error decoding semantic tag: unknown unsigned integer 
subtype 0x1e
____________________________ test_media[True-False] ____________________________

custom_text = False, custom_data = True
conductor = <falcon.testing.client.ASGIConductor object at 0x7f0ddaa0cad0>

    @pytest.mark.parametrize('custom_text', [True, False])
    @pytest.mark.parametrize('custom_data', [True, False])
    @pytest.mark.skipif(msgpack is None, reason='msgpack is required for this 
test')
    async def test_media(custom_text, custom_data, conductor):  # NOQA: C901
        # TODO(kgriffs): Refactor to reduce McCabe score
    
        sample_doc = {
            'answer': 42,
            'runes': b'\xe1\x9a\xa0\xe1\x9b\x87\xe1\x9a\xbb'.decode(),
            'ascii': 'hello world',
        }
    
        sample_doc_bin = sample_doc.copy()
        sample_doc_bin['bits'] = os.urandom(32)
        sample_doc_bin['array'] = [0, 1, 2]
    
        class Resource:
            def __init__(self):
                self.finished = asyncio.Event()
                self.docs_received = []
                self.deserialize_error_count = 0
    
            async def on_websocket(self, req, ws):
                try:
                    await ws.accept()
    
                    await ws.send_media(sample_doc)
                    self.docs_received.append(await ws.receive_media())
                    await ws.send_media(sample_doc, 
falcon.WebSocketPayloadType.TEXT)
                    self.docs_received.append(await ws.receive_media())
    
                    await ws.send_media(sample_doc_bin, 
falcon.WebSocketPayloadType.BINARY)
                    self.docs_received.append(await ws.receive_media())
    
                    for __ in range(3):
                        try:
                            await ws.receive_media()
                        except ValueError:
                            self.deserialize_error_count += 1
                finally:
                    self.finished.set()
    
        app = conductor.app
    
        resource = Resource()
        app.add_route('/', resource)
    
        if custom_text:
            if rapidjson is None:
                pytest.skip('rapidjson is required for this test')
    
            # Let's say we want to use a faster JSON library. You could also 
use this
            #   pattern to add serialization support for custom types that 
aren't
            #   normally JSON-serializable out of the box.
            class RapidJSONHandler(media.TextBaseHandlerWS):
                def serialize(self, media: object) -> str:
                    return rapidjson.dumps(media, ensure_ascii=False)
    
                # The raw TEXT payload will be passed as a Unicode string
                def deserialize(self, payload: str) -> object:
                    return rapidjson.loads(payload)
    
            app.ws_options.media_handlers[falcon.WebSocketPayloadType.TEXT] = (
                RapidJSONHandler()
            )
    
        if custom_data:
            if cbor2 is None:
                pytest.skip('cbor2 is required for this test')
    
            class CBORHandler(media.BinaryBaseHandlerWS):
                def serialize(self, media: object) -> bytes:
                    return cbor2.dumps(media)
    
                # The raw BINARY payload will be passed as a byte string
                def deserialize(self, payload: bytes) -> object:
                    return cbor2.loads(payload)
    
            app.ws_options.media_handlers[falcon.WebSocketPayloadType.BINARY] = 
(
                CBORHandler()
            )
    
        async with conductor as c:
            async with c.simulate_ws() as ws:
                for __ in range(2):
                    doc = await ws.receive_json()
                    await ws.send_json(doc)
    
                if custom_data:
                    data = await ws.receive_data()
                    cbor2.loads(data)  # NOTE(kgriffs): Validate serialization 
format
                    await ws.send_data(data)
                else:
                    doc = await ws.receive_msgpack()
                    await ws.send_msgpack(doc)
    
                # NOTE(kgriffs): The first one will work, but we include it to
                #    ensure we aren't getting any false-positives.
                await ws.send_text('"DEADBEEF"')
                await ws.send_text('DEADBEEF')
                await ws.send_data(b'\xde\xad\xbe\xef')
    
                await resource.finished.wait()
    
>       assert resource.deserialize_error_count == 2
E       assert 1 == 2
E        +  where 1 = <asgi.test_ws.test_media.<locals>.Resource object at 
0x7f0dda7be270>.deserialize_error_count

tests/asgi/test_ws.py:515: AssertionError
------------------------------ Captured log call -------------------------------
ERROR    falcon:app.py:1349 [FALCON] Unhandled exception in ASGI app
Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/falcon/asgi/app.py", line 1243, in _handle_websocket
    await on_websocket(req, web_socket, **params)
  File "/<<PKGBUILDDIR>>/tests/asgi/test_ws.py", line 447, in on_websocket
    await ws.receive_media()
  File "/<<PKGBUILDDIR>>/falcon/asgi/ws.py", line 476, in receive_media
    return self._mh_bin_deserialize(data)
           ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "/<<PKGBUILDDIR>>/tests/asgi/test_ws.py", line 487, in deserialize
    return cbor2.loads(payload)
           ~~~~~~~~~~~^^^^^^^^^
cbor2.CBORDecodeError: error decoding semantic tag: unknown unsigned integer 
subtype 0x1e
=========================== short test summary info ============================
FAILED tests/asgi/test_ws.py::test_media[True-True] - assert 1 == 2
FAILED tests/asgi/test_ws.py::test_media[True-False] - assert 1 == 2
================= 2 failed, 3934 passed, 180 skipped in 33.32s =================
make[1]: *** [debian/rules:27: override_dh_auto_install] Error 1
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:11: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess failed with exit 
status 2
--------------------------------------------------------------------------------

Reply via email to