Skip to content

Conversation

@patchback
Copy link
Contributor

@patchback patchback bot commented Feb 6, 2025

This is a backport of PR #10423 as merged into master (51daf71).

We have a writelines version of this test, test_write_large_payload_deflate_compression_data_in_eof_writelines, which should have writelines enabled, but for this version, writelines should always be disabled

This test would fail with CPython 3.12.9+ or 3.13.2+

fixes #10421

@bdraco bdraco enabled auto-merge (squash) February 6, 2025 16:27
@codspeed-hq
Copy link

codspeed-hq bot commented Feb 6, 2025

CodSpeed Performance Report

Merging #10429 will degrade performances by 17.39%

Comparing patchback/backports/3.11/51daf7190e7674773c22011a4e443df8b5e66437/pr-10423 (3280653) with 3.11 (5942b0b)

Summary

❌ 2 (👁 2) regressions
✅ 46 untouched benchmarks

Benchmarks breakdown

Benchmark BASE HEAD Change
👁 test_one_hundred_get_requests_iter_chunks_on_512kib_chunked_payload[pyloop] 108.2 ms 131 ms -17.39%
👁 test_one_hundred_get_requests_with_512kib_chunked_payload[pyloop] 166.3 ms 188.9 ms -11.97%

@codecov
Copy link

codecov bot commented Feb 6, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
3469 1 3468 104
View the top 1 failed test(s) by shortest run time
tests.test_client_ws_functional test_heartbeat[pyloop]
Stack Traces | 0.178s run time
aiohttp_client = <function aiohttp_client.<locals>.go at 0x000002E0619B4310>

    #x1B[0m#x1B[94masync#x1B[39;49;00m #x1B[94mdef#x1B[39;49;00m #x1B[92mtest_heartbeat#x1B[39;49;00m(aiohttp_client) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
        ping_received = #x1B[94mFalse#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        #x1B[94masync#x1B[39;49;00m #x1B[94mdef#x1B[39;49;00m #x1B[92mhandler#x1B[39;49;00m(request):#x1B[90m#x1B[39;49;00m
            #x1B[94mnonlocal#x1B[39;49;00m ping_received#x1B[90m#x1B[39;49;00m
            ws = web.WebSocketResponse(autoping=#x1B[94mFalse#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
            #x1B[94mawait#x1B[39;49;00m ws.prepare(request)#x1B[90m#x1B[39;49;00m
            msg = #x1B[94mawait#x1B[39;49;00m ws.receive()#x1B[90m#x1B[39;49;00m
            #x1B[94mif#x1B[39;49;00m msg.type == aiohttp.WSMsgType.ping:#x1B[90m#x1B[39;49;00m
                ping_received = #x1B[94mTrue#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
            #x1B[94mawait#x1B[39;49;00m ws.close()#x1B[90m#x1B[39;49;00m
            #x1B[94mreturn#x1B[39;49;00m ws#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        app = web.Application()#x1B[90m#x1B[39;49;00m
        app.router.add_route(#x1B[33m"#x1B[39;49;00m#x1B[33mGET#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33m/#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, handler)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        client = #x1B[94mawait#x1B[39;49;00m aiohttp_client(app)#x1B[90m#x1B[39;49;00m
        resp = #x1B[94mawait#x1B[39;49;00m client.ws_connect(#x1B[33m"#x1B[39;49;00m#x1B[33m/#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, heartbeat=#x1B[94m0.01#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
        #x1B[94mawait#x1B[39;49;00m asyncio.sleep(#x1B[94m0.1#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
        #x1B[94mawait#x1B[39;49;00m resp.receive()#x1B[90m#x1B[39;49;00m
        #x1B[94mawait#x1B[39;49;00m resp.close()#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
>       #x1B[94massert#x1B[39;49;00m ping_received#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE       assert False#x1B[0m

aiohttp_client = <function aiohttp_client.<locals>.go at 0x000002E0619B4310>
app        = <Application 0x2e064d5d340>
client     = <aiohttp.test_utils.TestClient object at 0x000002E064D5D220>
handler    = <function test_heartbeat.<locals>.handler at 0x000002E0650D00D0>
ping_received = True
resp       = <aiohttp.client_ws.ClientWebSocketResponse object at 0x000002E0654BF370>

#x1B[1m#x1B[31mtests\test_client_ws_functional.py#x1B[0m:737: AssertionError

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@bdraco bdraco merged commit cf19b04 into 3.11 Feb 7, 2025
36 checks passed
@bdraco bdraco deleted the patchback/backports/3.11/51daf7190e7674773c22011a4e443df8b5e66437/pr-10423 branch February 7, 2025 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants