MagicStack / asyncpg

A fast PostgreSQL Database Client Library for Python/asyncio.
Apache License 2.0
6.99k stars 404 forks source link

Don't raise a new CancelledError if the future was cancelled #1056

Closed agronholm closed 1 year ago

agronholm commented 1 year ago

This way, the original cancel message, if any, is preserved. This fixes compatibility with AnyIO 4.0.0rc1 which relies on said cancel messages to determine whether it should swallow a cancellation exception or not.