Make CacheConfig() the Client cache default and None the off switch (#3164)

This commit is contained in:
Max 2026-07-25 17:50:53 +01:00 • committed by GitHub
commit 0cb920f126
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -595,7 +595,7 @@ async def test_client_listen_installs_the_cache_eviction_barrier_exactly_when_a_
with anyio.fail_after(5):
async with cached_client.listen(tools_list_changed=True) as sub: # pragma: no branch
assert sub._on_event == cached_client._evict_for_listen_event # pyright: ignore[reportPrivateUsage]
async with Client(_bus_server(bus), cache=False) as uncached_client:
async with Client(_bus_server(bus), cache=None) as uncached_client:
with anyio.fail_after(5):
async with uncached_client.listen(tools_list_changed=True) as sub: # pragma: no branch
assert sub._on_event is None # pyright: ignore[reportPrivateUsage]