Skip to content

Chores - pre-commit autoupdate and uv.lock#300

Merged
fleming79 merged 3 commits intomainfrom
maintenance
Jan 25, 2026
Merged

Chores - pre-commit autoupdate and uv.lock#300
fleming79 merged 3 commits intomainfrom
maintenance

Conversation

@fleming79
Copy link
Owner

No description provided.

@codecov-commenter
Copy link

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
514 1 513 0
View the top 1 failed test(s) by shortest run time
tests/test_command.py::test_subprocess_kernels_client[async-ipc-asyncio+uvloop]
Stack Traces | 2.75s run time
anyio_backend = ('asyncio', {'use_uvloop': True})
request = <SubRequest 'subprocess_kernels_client' for <Function test_subprocess_kernels_client[async-tcp-asyncio+uvloop]>>
kwargs = {'anyio_backend': ('asyncio', {'use_uvloop': True}), 'kernel_name': <KernelName.asyncio: 'async'>, 'tmp_path_factory':...basetemp=PosixPath('.............../tmp/pytest-of-runner/pytest-0'), _retention_count=3, _retention_policy='all'), 'transport': 'tcp'}
local_func = <function subprocess_kernels_client at 0x7fd2fb1f7600>
backend_name = 'asyncio', backend_options = {'use_uvloop': True}
runner = <anyio._backends._asyncio.TestRunner object at 0x7fd2f8a273f0>

    def wrapper(anyio_backend: Any, request: SubRequest, **kwargs: Any) -> Any:
        # Rebind any fixture methods to the request instance
        if (
            request.instance
            and ismethod(func)
            and type(func.__self__) is type(request.instance)
        ):
            local_func = func.__func__.__get__(request.instance)
        else:
            local_func = func
    
        backend_name, backend_options = extract_backend_and_options(anyio_backend)
        if has_backend_arg:
            kwargs["anyio_backend"] = anyio_backend
    
        if has_request_arg:
            kwargs["request"] = request
    
        with get_runner(backend_name, backend_options) as runner:
            if isasyncgenfunction(local_func):
>               yield from runner.run_asyncgen_fixture(local_func, kwargs)

anyio_backend = ('asyncio', {'use_uvloop': True})
backend_name = 'asyncio'
backend_options = {'use_uvloop': True}
func       = <function subprocess_kernels_client at 0x7fd2fb1f7600>
has_backend_arg = True
has_request_arg = False
kwargs     = {'anyio_backend': ('asyncio', {'use_uvloop': True}), 'kernel_name': <KernelName.asyncio: 'async'>, 'tmp_path_factory':...basetemp=PosixPath('.............../tmp/pytest-of-runner/pytest-0'), _retention_count=3, _retention_policy='all'), 'transport': 'tcp'}
local_func = <function subprocess_kernels_client at 0x7fd2fb1f7600>
request    = <SubRequest 'subprocess_kernels_client' for <Function test_subprocess_kernels_client[async-tcp-asyncio+uvloop]>>
runner     = <anyio._backends._asyncio.TestRunner object at 0x7fd2f8a273f0>

.venv/lib/python3.13.../site-packages/anyio/pytest_plugin.py:121: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.venv/lib/python3.13.../anyio/_backends/_asyncio.py:2276: in run_asyncgen_fixture
    self.get_loop().run_until_complete(
        asyncgen   = <async_generator object subprocess_kernels_client at 0x7fd2f8aa5e70>
        fixture_func = <function subprocess_kernels_client at 0x7fd2fb1f7600>
        fixturevalue = <jupyter_client.asynchronous.client.AsyncKernelClient object at 0x7fd2f8a182f0>
        kwargs     = {'anyio_backend': ('asyncio', {'use_uvloop': True}), 'kernel_name': <KernelName.asyncio: 'async'>, 'tmp_path_factory':...basetemp=PosixPath('.............../tmp/pytest-of-runner/pytest-0'), _retention_count=3, _retention_policy='all'), 'transport': 'tcp'}
        self       = <anyio._backends._asyncio.TestRunner object at 0x7fd2f8a273f0>
uvloop/loop.pyx:1518: in uvloop.loop.Loop.run_until_complete
    ???
.venv/lib/python3.13.../anyio/_backends/_asyncio.py:2260: in _call_in_runner_task
    return await future
           ^^^^^^^^^^^^
        args       = (None,)
        coro       = <async_generator_asend object at 0x7fd2fb2ac6c0>
        func       = <built-in method asend of async_generator object at 0x7fd2f8aa5e70>
        future     = <Future finished exception=AssertionError("cleanup_connection_file not called by atexit ...\nassert not True\n +  wher...exists()\n +    where exists = PosixPath('............/pytest-0/async_kernel2/temp_connection.json').exists")>
        kwargs     = {}
        self       = <anyio._backends._asyncio.TestRunner object at 0x7fd2f8a273f0>
.venv/lib/python3.13.../anyio/_backends/_asyncio.py:2227: in _run_tests_and_fixtures
    retval = await coro
             ^^^^^^^^^^
        OutcomeException = <class '_pytest.outcomes.OutcomeException'>
        coro       = <async_generator_asend object at 0x7fd2fb2ac6c0>
        future     = <Future finished exception=AssertionError("cleanup_connection_file not called by atexit ...\nassert not True\n +  wher...exists()\n +    where exists = PosixPath('............/pytest-0/async_kernel2/temp_connection.json').exists")>
        receive_stream = MemoryObjectReceiveStream(_state=_MemoryObjectStreamState(max_buffer_size=1, buffer=deque([]), open_send_channels=0, open_receive_channels=0, waiting_receivers=OrderedDict(), waiting_senders=OrderedDict()), _closed=True)
        retval     = None
        self       = <anyio._backends._asyncio.TestRunner object at 0x7fd2f8a273f0>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

anyio_backend = ('asyncio', {'use_uvloop': True})
tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7fd2fb201220>, _basetemp=PosixPath('.............../tmp/pytest-of-runner/pytest-0'), _retention_count=3, _retention_policy='all')
kernel_name = <KernelName.asyncio: 'async'>, transport = 'tcp'

    @pytest.fixture(scope="module")
    async def subprocess_kernels_client(anyio_backend, tmp_path_factory, kernel_name: KernelName, transport):
        """
        Starts a kernel in a subprocess and returns an AsyncKernelCient that is connected to it.
        """
        assert anyio_backend[0] == "asyncio", "Asyncio is required for the client"
        connection_file = tmp_path_factory.mktemp("async_kernel") / "temp_connection.json"
        kwgs = {"interface.transport": transport}
        command = make_argv(connection_file=connection_file, kernel_name=kernel_name, **kwgs)
        process = await anyio.open_process([*command, "--no-print_kernel_messages"])
        async with process:
            while not connection_file.exists() or not connection_file.stat().st_size:
                await anyio.sleep(0.1)
            await anyio.sleep(0.01)
            client = AsyncKernelClient()
            client.load_connection_file(connection_file)
            client.start_channels()
            try:
                msg_id = client.kernel_info()
                await utils.get_reply(client, msg_id)
                await utils.clear_iopub(client, timeout=0.1)
                yield client
            finally:
                client.shutdown()
                client.stop_channels()
        for _ in range(2):
            if connection_file.exists():
                await anyio.sleep(1)
>       assert not connection_file.exists(), "cleanup_connection_file not called by atexit ..."
E       AssertionError: cleanup_connection_file not called by atexit ...
E       assert not True
E        +  where True = exists()
E        +    where exists = PosixPath('............/pytest-0/async_kernel2/temp_connection.json').exists

_          = 1
anyio_backend = ('asyncio', {'use_uvloop': True})
client     = <jupyter_client.asynchronous.client.AsyncKernelClient object at 0x7fd2f8a182f0>
command    = ['.../async-kernel/async-kernel/.venv/bin/python', '-m', 'async_kernel', '-f', PosixPath('/tmp/pytest-of...est-0/async_kernel2/temp_connection.json'), '--start_interface=async_kernel.interface.start_kernel_zmq_interface', ...]
connection_file = PosixPath('............/pytest-0/async_kernel2/temp_connection.json')
kernel_name = <KernelName.asyncio: 'async'>
kwgs       = {'interface.transport': 'tcp'}
msg_id     = '0f5a6b88-549f08a0c21e62241608fc96_2269_0'
process    = Process(_process=<Process 2480>, _stdin=StreamWriterWrapper(_stream=<StreamWriter transport=<WriteUnixTransport closed...eamReader eof exception=ClosedResourceError() transport=<ReadUnixTransport closed=True reading=False 0x7fd2f8978d40>>))
tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=<pluggy._tracing.TagTracerSub object at 0x7fd2fb201220>, _basetemp=PosixPath('.............../tmp/pytest-of-runner/pytest-0'), _retention_count=3, _retention_policy='all')
transport  = 'tcp'

tests/conftest.py:146: 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.

@fleming79 fleming79 changed the title Cut back on test combinations + uv and pre-commit updates. Chores - pre-commit autoupdate and uv.lock Jan 25, 2026
@fleming79 fleming79 merged commit 5e7a6bd into main Jan 25, 2026
17 checks passed
@fleming79 fleming79 deleted the maintenance branch January 25, 2026 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants