Skip to content

Conversation

@pre-commit-ci
Copy link
Contributor

@pre-commit-ci pre-commit-ci bot commented Nov 10, 2025

@codspeed-hq
Copy link

codspeed-hq bot commented Nov 10, 2025

CodSpeed Performance Report

Merging #11757 will not alter performance

Comparing pre-commit-ci-update-config (3797669) with master (4db0b67)1

Summary

✅ 59 untouched

Footnotes

  1. No successful run was found on master (261dbb5) during the generation of this report, so 4db0b67 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@pre-commit-ci pre-commit-ci bot force-pushed the pre-commit-ci-update-config branch from b346006 to dbd94ae Compare November 24, 2025 16:26
@codecov
Copy link

codecov bot commented Nov 24, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
4264 1 4263 49
View the full list of 1 ❄️ flaky test(s)
tests.test_run_app.TestShutdown::test_shutdown_close_websockets

Flake rate in main: 5.00% (Passed 19 times, Failed 1 times)

Stack Traces | 1.02s run time
self = <test_run_app.TestShutdown object at 0x108804170>
unused_port_socket = <socket.socket [closed] fd=-1, family=2, type=1, proto=0>

    #x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_shutdown_close_websockets#x1B[39;49;00m(#x1B[96mself#x1B[39;49;00m, unused_port_socket: socket.socket) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
        sock = unused_port_socket#x1B[90m#x1B[39;49;00m
        port = sock.getsockname()[#x1B[94m1#x1B[39;49;00m]#x1B[90m#x1B[39;49;00m
        WS = web.AppKey(#x1B[33m"#x1B[39;49;00m#x1B[33mws#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[96mset#x1B[39;49;00m[web.WebSocketResponse])#x1B[90m#x1B[39;49;00m
        client_finished = server_finished = #x1B[94mFalse#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        t = #x1B[94mNone#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[90m #x1B[39;49;00m#x1B[92mws_handler#x1B[39;49;00m(request: web.Request) -> web.WebSocketResponse:#x1B[90m#x1B[39;49;00m
            ws = web.WebSocketResponse()#x1B[90m#x1B[39;49;00m
            #x1B[94mawait#x1B[39;49;00m ws.prepare(request)#x1B[90m#x1B[39;49;00m
            request.app[WS].add(ws)#x1B[90m#x1B[39;49;00m
            #x1B[94masync#x1B[39;49;00m #x1B[94mfor#x1B[39;49;00m msg #x1B[95min#x1B[39;49;00m ws:#x1B[90m#x1B[39;49;00m
                #x1B[94mpass#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
            #x1B[94mnonlocal#x1B[39;49;00m server_finished#x1B[90m#x1B[39;49;00m
            server_finished = #x1B[94mTrue#x1B[39;49;00m#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
        #x1B[94masync#x1B[39;49;00m #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mclose_websockets#x1B[39;49;00m(app: web.Application) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
            #x1B[94mfor#x1B[39;49;00m ws #x1B[95min#x1B[39;49;00m app[WS]:#x1B[90m#x1B[39;49;00m
                #x1B[94mawait#x1B[39;49;00m ws.close(code=WSCloseCode.GOING_AWAY)#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[90m #x1B[39;49;00m#x1B[92mtest#x1B[39;49;00m() -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
            #x1B[94mawait#x1B[39;49;00m asyncio.sleep(#x1B[94m1#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
            #x1B[94masync#x1B[39;49;00m #x1B[94mwith#x1B[39;49;00m ClientSession() #x1B[94mas#x1B[39;49;00m sess:#x1B[90m#x1B[39;49;00m
                #x1B[94masync#x1B[39;49;00m #x1B[94mwith#x1B[39;49;00m sess.ws_connect(#x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mhttp://127.0.0.1:#x1B[39;49;00m#x1B[33m{#x1B[39;49;00mport#x1B[33m}#x1B[39;49;00m#x1B[33m/ws#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m) #x1B[94mas#x1B[39;49;00m ws:#x1B[90m#x1B[39;49;00m
                    #x1B[94masync#x1B[39;49;00m #x1B[94mwith#x1B[39;49;00m sess.get(#x1B[33mf#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[33mhttp://127.0.0.1:#x1B[39;49;00m#x1B[33m{#x1B[39;49;00mport#x1B[33m}#x1B[39;49;00m#x1B[33m/stop#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m):#x1B[90m#x1B[39;49;00m
                        #x1B[94mpass#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
                    #x1B[94masync#x1B[39;49;00m #x1B[94mfor#x1B[39;49;00m msg #x1B[95min#x1B[39;49;00m ws:#x1B[90m#x1B[39;49;00m
                        #x1B[94mpass#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
                    #x1B[94mnonlocal#x1B[39;49;00m client_finished#x1B[90m#x1B[39;49;00m
                    client_finished = #x1B[94mTrue#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[90m #x1B[39;49;00m#x1B[92mrun_test#x1B[39;49;00m(app: web.Application) -> AsyncIterator[#x1B[94mNone#x1B[39;49;00m]:#x1B[90m#x1B[39;49;00m
            #x1B[94mnonlocal#x1B[39;49;00m t#x1B[90m#x1B[39;49;00m
            t = asyncio.create_task(test())#x1B[90m#x1B[39;49;00m
            #x1B[94myield#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
            t.cancel()#x1B[90m#x1B[39;49;00m
            #x1B[94mwith#x1B[39;49;00m contextlib.suppress(asyncio.CancelledError):#x1B[90m#x1B[39;49;00m
                #x1B[94mawait#x1B[39;49;00m t#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        app = web.Application()#x1B[90m#x1B[39;49;00m
        app[WS] = #x1B[96mset#x1B[39;49;00m()#x1B[90m#x1B[39;49;00m
        app.on_shutdown.append(close_websockets)#x1B[90m#x1B[39;49;00m
        app.cleanup_ctx.append(run_test)#x1B[90m#x1B[39;49;00m
        app.router.add_get(#x1B[33m"#x1B[39;49;00m#x1B[33m/ws#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, ws_handler)#x1B[90m#x1B[39;49;00m
        app.router.add_get(#x1B[33m"#x1B[39;49;00m#x1B[33m/stop#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[96mself#x1B[39;49;00m.stop)#x1B[90m#x1B[39;49;00m
    #x1B[90m#x1B[39;49;00m
        start = time.time()#x1B[90m#x1B[39;49;00m
        web.run_app(app, sock=sock, shutdown_timeout=#x1B[94m10#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
        #x1B[94massert#x1B[39;49;00m time.time() - start < #x1B[94m5#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
>       #x1B[94massert#x1B[39;49;00m client_finished#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE       assert False#x1B[0m

WS         = <AppKey(__channelexec__.ws, type=set[aiohttp.web_ws.WebSocketResponse])>
app        = <Application 0x1099812d0>
client_finished = False
close_websockets = <function TestShutdown.test_shutdown_close_websockets.<locals>.close_websockets at 0x109fdf240>
port       = 50715
run_test   = <function TestShutdown.test_shutdown_close_websockets.<locals>.run_test at 0x109fce5c0>
self       = <test_run_app.TestShutdown object at 0x108804170>
server_finished = True
sock       = <socket.socket [closed] fd=-1, family=2, type=1, proto=0>
start      = 1765211740.3340821
t          = <Task cancelled name='Task-4223' coro=<TestShutdown.test_shutdown_close_websockets.<locals>.test() done, defined at .../aiohttp/tests/test_run_app.py:1271>>
test       = <function TestShutdown.test_shutdown_close_websockets.<locals>.test at 0x109fce700>
unused_port_socket = <socket.socket [closed] fd=-1, family=2, type=1, proto=0>
ws_handler = <function TestShutdown.test_shutdown_close_websockets.<locals>.ws_handler at 0x109fddee0>

#x1B[1m#x1B[31mtests/test_run_app.py#x1B[0m:1301: 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.

updates:
- [github.com/psf/black-pre-commit-mirror: 25.9.0 → 25.12.0](psf/black-pre-commit-mirror@25.9.0...25.12.0)
- [github.com/asottile/pyupgrade: v3.21.0 → v3.21.2](asottile/pyupgrade@v3.21.0...v3.21.2)
@pre-commit-ci pre-commit-ci bot force-pushed the pre-commit-ci-update-config branch from dbd94ae to 3797669 Compare December 8, 2025 16:26
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.

1 participant