## The problem
Platform: Python 3.8 on Ubuntu / Generic Description: Canceling async Redis command leaves connection open, in unsafe state for future commands This is a reincarnation of #2624, which was closed with an incomplete fix and a possibly unreliable test case. This is the same issue that recently got a lot of attention due to ChatGPT outage, and that remains only partially fixed. The cancellation shielding introduced in #2641 addressed only the cancellation of Redis pipeline operation, but non-pipelined ops are still vulnerable.
## The fix
Upgrade redis-py to 4.4 or later. The maintainer confirmed the async cancellation-safety fix is in the 4.4 and 4.5 lines, and closed the issue as fixed. A backport to 4.3.x was planned but not confirmed released in the thread, so if you are on 4.3.x, moving to 4.4+ is the confirmed path. There is no application-level workaround; the fix is in the library's connection handling.