CancelledError with anyio 3.7.0
#2749
Replies: 4 comments 6 replies
-
|
Can you paste the code in |
Beta Was this translation helpful? Give feedback.
-
|
Sure! It amounts to this: async def _send_request(...) -> Response:
with AsyncClient() as client:
response = await client.get(url, timeout=REQUEST_TIMEOUT, params=url_params)I'll quickly see if I'm able to produce a minimal reproducible code sample 👍 |
Beta Was this translation helpful? Give feedback.
-
|
Ok this is a weird one. It seems to only happen when I interact with redis ( import asyncio
from httpx import AsyncClient
from redis.asyncio import Redis
redis = Redis.from_url('redis://127.0.0.1:6379')
async def main():
await redis.get('INFO') # <-- if you remove this, it's fine
async with AsyncClient() as session:
await session.get("https://google.com")
asyncio.run(main()) |
Beta Was this translation helpful? Give feedback.
-
|
Reading redis/redis-py#2633 (comment), it looks like I've been very unlucky. I'm happy to close this and upgrade to 3.11.4 🙂 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
After upgrading dependencies, requests using
httpx.AsyncClientnow fail with:It took me a while to identify that anyio was the issue, since there's no error included. I'm also not sure if this should be opened here, in anyio, or elsewhere. Thought I would try here first 🙇
Basically any request fails right away, when run. I'm using httpx 0.24.1 (latest).
Beta Was this translation helpful? Give feedback.
All reactions