Results 961 comments of Thomas Grainger

Yeah #338 looks great. I'd like to see an example in the docs though, eg: Bad: ```python database = Database() @contextlib.asynccontextmanager async def lifespan_context(app): async with database: yield app =...

This is a bug in httpcore where it tries to acquire a lock while in a cancelled scope. This should be refactored so no awaits happen inside the lock and...

This line raises a CancelledError when a request is cancelled, so the lock cannot be acquired and the connection cannot be released https://github.com/encode/httpcore/blob/master/httpcore/_async/connection_pool.py#L277

@tomchristie this is a design flaw in httpcore and needs to be re-done with an assumption of level cancellation

I think this is ready for review now @madkinsz

adding typing in anyio found a large number of type level bugs, I'm in favor of this change - so unmarking stale

> A decision is still needed on #526 to support h11 0.13. The decision is about PAUSED handling? If so that's resolved

I think Cancelled needs special handling: ```python def aio_acmgr_fn_as_trio_acmgr_fn(acmgr_fn): @functools.wraps(acmgr_fn) @contextlib.asynccontextmanager async def wrapper(*args, **kwargs): @trio_asyncio.aio_as_trio async def run(*, task_status): fut = asyncio.get_running_loop().create_future() async with acmgr_fn(*args, **kwargs) as result: task_status.started((fut,...

hmm I only have permission to force merge this PR as administrator. I don't have permission to enable CI