• Bug#1099291: starlette: FTBFS: E assert '{"example":123}' == '{"example

    From Santiago Vila@21:1/5 to All on Sat Mar 1 22:10:13 2025
    Package: src:starlette
    Version: 0.41.3-2
    Severity: serious
    Tags: ftbfs trixie sid

    Dear maintainer:

    During a rebuild of all packages in unstable, your package failed to build:

    --------------------------------------------------------------------------------
    [...]
    debian/rules clean
    dh clean --with python3 --buildsystem=pybuild
    dh_auto_clean -O--buildsystem=pybuild
    dh_autoreconf_clean -O--buildsystem=pybuild
    dh_clean -O--buildsystem=pybuild
    debian/rules binary
    dh binary --with python3 --buildsystem=pybuild
    dh_update_autotools_config -O--buildsystem=pybuild
    dh_autoreconf -O--buildsystem=pybuild
    dh_auto_configure -O--buildsystem=pybuild
    dh_auto_build -O--buildsystem=pybuild
    I: pybuild plugin_pyproject:129: Building wheel for python3.13 with "build" module
    I: pybuild base:311: python3.13 -m build --skip-dependency-check --no-isolation --wheel --outdir /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_starlette
    * Building wheel...
    Successfully built starlette-0.41.3-py3-none-any.whl
    I: pybuild plugin_pyproject:144: Unpacking wheel built for python3.13 with "installer" module
    dh_auto_test -O--buildsystem=pybuild
    I: pybuild base:311: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_starlette/build; python3.13 -m pytest tests
    ============================= test session starts ==============================
    platform linux -- Python 3.13.2, pytest-8.3.4, pluggy-1.5.0
    rootdir: /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_starlette/build
    configfile: pyproject.toml
    plugins: anyio-4.8.0, typeguard-4.4.2
    collected 863 items

    tests/middleware/test_base.py .....x.........................x.......... [ 4%] ........... [ 6%] tests/middleware/test_cors.py .............................. [ 9%] tests/middleware/test_errors.py ............ [ 11%] tests/middleware/test_gzip.py .......... [ 12%] tests/middleware/test_https_redirect.py .. [ 12%] tests/middleware/test_middleware.py .. [ 12%] tests/middleware/test_session.py .............. [ 14%] tests/middleware/test_trusted_host.py ..... [ 14%] tests/middleware/test_wsgi.py .F...F.... [ 15%] tests/test__utils.py .......... [ 17%] tests/test_applications.py ............................................. [ 22%] ......... [ 23%] tests/test_authentication.py ........... [ 24%] tests/test_background.py ........ [ 25%] tests/test_concurrency.py ...... [ 26%] tests/test_config.py ..... [ 26%] tests/test_convertors.py ...... [ 27%] tests/test_datastructures.py .............................. [ 31%] tests/test_endpoints.py .................... [ 33%] tests/test_exceptions.py ..................... [ 35%] tests/test_formparsers.py .............................................. [ 41%] .......................... [ 44%] tests/test_requests.py ...FF......................................FF.... [ 49%] .................................... [ 53%] tests/test_responses.py ................................................ [ 59%] ......................................................... [ 66%] tests/test_routing.py .................................................. [ 71%] ....................................... [ 76%] tests/test_schemas.py ... [ 76%] tests/test_staticfiles.py .............................................. [ 82%] ........ [ 83%] tests/test_status.py .. [ 83%] tests/test_templates.py ........................ [ 86%] tests/test_testclient.py ............................................. [ 91%] tests/test_websockets.py ............................................... [ 96%] ............................ [100%]

    =================================== FAILURES ===================================
    ___________________________ test_wsgi_post[asyncio] ____________________________

    test_client_factory = functools.partial(<class 'starlette.testclient.TestClient'>, backend='asyncio', backend_options={})

    def test_wsgi_post(test_client_factory: TestClientFactory) -> None:
    app = WSGIMiddleware(echo_body)
    client = test_client_factory(app)
    response = client.post("/", json={"example": 123})
    assert response.status_code == 200
    assert response.text == '{"example": 123}'
    E assert '{"example":123}' == '{"example": 123}'
    E
    E - {"example": 123}
    E ? -
    E + {"example":123}

    tests/middleware/test_wsgi.py:80: AssertionError
    _____________________________ test_wsgi_post[trio] _____________________________

    test_client_factory = functools.partial(<class 'starlette.testclient.TestClient'>, backend='trio', backend_options={})

    def test_wsgi_post(test_client_factory: TestClientFactory) -> None:
    app = WSGIMiddleware(echo_body)
    client = test_client_factory(app)
    response = client.post("/", json={"example": 123})
    assert response.status_code == 200
    assert response.text == '{"example": 123}'
    E assert '{"example":123}' == '{"example": 123}'
    E
    E - {"example": 123}
    E ? -
    E + {"example":123}

    tests/middleware/test_wsgi.py:80: AssertionError
    __________________________ test_request_body[asyncio] __________________________

    test_client_factory = functools.partial(<class 'starlette.testclient.TestClient'>, backend='asyncio', backend_options={})

    def test_request_body(test_client_factory: TestClientFactory) -> None:
    async def app(scope: Scope, receive: Receive, send: Send) -> None:
    request = Request(scope, receive)
    body = await request.body()
    response = JSONResponse({"body": body.decode()})
    await response(scope, receive, send)

    client = test_client_factory(app)

    response = client.get("/")
    assert response.json() == {"body": ""}

    response = client.post("/", json={"a": "123"})
    assert response.json() == {"body": '{"a": "123"}'}
    E assert {'body': '{"a":"123"}'} == {'body': '{"a": "123"}'}
    E
    E Differing items:
    E {'body': '{"a":"123"}'} != {'body': '{"a": "123"}'}
    E Use -v to get more diff

    tests/test_requests.py:94: AssertionError
    _________________________ test_request_stream[asyncio] _________________________

    test_client_factory = functools.partial(<class 'starlette.testclient.TestClient'>, backend='asyncio', backend_options={})

    def test_request_stream(test_client_factory: TestClientFactory) -> None:
    async def app(scope: Scope, receive: Receive, send: Send) -> None:
    request = Request(scope, receive)
    body = b""
    async for chunk in request.stream():
    body += chunk
    response = JSONResponse({"body": body.decode()})
    await response(scope, receive, send)

    client = test_client_factory(app)

    response = client.get("/")
    assert response.json() == {"body": ""}

    response = client.post("/", json={"a": "123"})
    assert response.json() == {"body": '{"a": "123"}'}
    E assert {'body': '{"a":"123"}'} == {'body': '{"a": "123"}'}
    E
    E Differing items:
    E {'body': '{"a":"123"}'} != {'body': '{"a": "123"}'}
    E Use -v to get more diff

    tests/test_requests.py:115: AssertionError
    ___________________________ test_request_body[trio] ____________________________

    test_client_factory = functools.partial(<class 'starlette.testclient.TestClient'>, backend='trio', backend_options={})

    def test_request_body(test_client_factory: TestClientFactory) -> None:
    async def app(scope: Scope, receive: Receive, send: Send) -> None:
    request = Request(scope, receive)
    body = await request.body()
    response = JSONResponse({"body": body.decode()})
    await response(scope, receive, send)

    client = test_client_factory(app)

    response = client.get("/")
    assert response.json() == {"body": ""}

    response = client.post("/", json={"a": "123"})
    assert response.json() == {"body": '{"a": "123"}'}
    E assert {'body': '{"a":"123"}'} == {'body': '{"a": "123"}'}
    E
    E Differing items:
    E {'body': '{"a":"123"}'} != {'body': '{"a": "123"}'}
    E Use -v to get more diff

    tests/test_requests.py:94: AssertionError
    __________________________ test_request_stream[trio] ___________________________

    test_client_factory = functools.partial(<class 'starlette.testclient.TestClient'>, backend='trio', backend_options={})

    def test_request_stream(test_client_factory: TestClientFactory) -> None:
    async def app(scope: Scope, receive: Receive, send: Send) -> None:
    request = Request(scope, receive)
    body = b""
    async for chunk in request.stream():
    body += chunk
    response = JSONResponse({"body": body.decode()})
    await response(scope, receive, send)

    client = test_client_factory(app)

    response = client.get("/")
    assert response.json() == {"body": ""}

    response = client.post("/", json={"a": "123"})
    assert response.json() == {"body": '{"a": "123"}'}
    E assert {'body': '{"a":"123"}'} == {'body': '{"a": "123"}'}
    E
    E Differing items:
    E {'body': '{"a":"123"}'} != {'body': '{"a": "123"}'}
    E Use -v to get more diff

    tests/test_requests.py:115: AssertionError
    =================== 6 failed, 855 passed, 2 xfailed in 3.89s ===================
    E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_starlette/build; python3.13 -m pytest tests
    dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p 3.13 returned exit code 13
    make: *** [debian/rules:5: binary] Error 25
    dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2 --------------------------------------------------------------------------------

    The above is just how the build ends and not necessarily the most relevant part.
    If required, the full build log is available here:

    https://people.debian.org/~sanvila/build-logs/202503/

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

    Thanks.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Debian Bug Tracking System@21:1/5 to All on Sun Mar 9 13:40:01 2025
    This is a multi-part message in MIME format...

    Your message dated Sun, 09 Mar 2025 12:35:38 +0000
    with message-id <E1trFsY-00Bk6u-N3@fasolo.debian.org>
    and subject line Bug#1099291: fixed in starlette 0.46.1-1
    has caused the Debian Bug report #1099291,
    regarding starlette: FTBFS: E assert '{"example":123}' == '{"example": 123}'
    to be marked as done.

    This means that you claim that the problem has been dealt with.
    If this is not the case it is now your responsibility to reopen the
    Bug report if necessary, and/or fix the problem forthwith.

    (NB: If you are a system administrator and have no idea what this
    message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@bugs.debian.org
    immediately.)


    --
    1099291: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1099291
    Debian Bug Tracking System
    Contact owner@bugs.debian.org with problems

    Received: (at submit) by bugs.debian.org; 1 Mar 2025 21:03:14 +0000 X-Spam-Checker-Version: SpamAssassin 3.4.6-bugs.debian.org_2005_01_02
    (2021-04-09) on buxtehude.debian.org
    X-Spam-Level:
    X-Spam-Status: No, score=-120.6 required=4.0 tests=BAYES_00,
    BODY_INCLUDES_PACKAGE,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,
    DKIM_VALID_AU,DKIM_VALID_EF,FROMDEVELOPER,HAS_PACKAGE,
    RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_NONE,USER_IN_DKIM_WELCOMELIST,
    USER_IN_DKIM_WHITELIST,X_DEBBUGS_CC autolearn=ham autolearn_force=no
    version=3.4.6-bugs.debian.org_2005_01_02
    X-Spam-Bayes: score:0.0000 Tokens: new, 45; hammy, 150; neutral, 252; spammy,
    0. spammytokens: hammytokens:0.000-+--python3, 0.000-+--trixie,
    0.000-+--pkgbuilddir, 0.000-+--PKGBUILDDIR, 0.000-+--sk:dh_auto Return-path: <sanvila@debian.org>
    Received: from mitropoulos.debian.org ([2001:648:2ffc:deb:216:61ff:fe9d