bpo-38248: Fix inconsistent immediate asyncio.Task cancellation (GH-16330) (GH-16383)

(cherry picked from commit edad4d89e357c92f70c0324b937845d652b20afd)

Co-authored-by: Yury Selivanov <yury@edgedb.com>
4 files changed