+\hpdZddlmZddlZddlZddlmZmZmZGddejZ ddd dZ y) zA custom asyncio.Task that allows checking if a task has been sent a cancellation request. Can be removed once we drop Python 3.10 support in favor of asyncio.Task.cancelling.) annotationsN)Any CoroutineOptionalcDeZdZdddfdZdd fd Zd dZd dZxZS) _TaskNnamec`t|||d|_tj|y)Nr r)super__init___cancel_requestsasyncio_register_task)selfcoror __class__s X/root/niggaflix-v3/playground/venv/lib/python3.12/site-packages/pymongo/_asyncio_task.pyr z_Task.__init__s+ D) !t$cN|xjdz c_t| |S)N)msg)rr cancel)rrrs rrz _Task.cancel!s% "w~#~&&rcb|jdkDr|xjdzc_|jS)Nrrrrs runcancelz_Task.uncancel%s-  1 $  ! !Q & !$$$rc|jSNrrs r cancellingz_Task.cancelling*s$$$r)rCoroutine[Any, Any, Any]r Optional[str]returnNoner)rr"r#bool)r#int)__name__ __module__ __qualname__r rrr __classcell__)rs@rrrsPT% '% %rrr cptjdk\rtj||St ||S)N) r )sys version_infor create_taskr)rr s rr0r0.s0 7"""4d33 D !!r)rr!r r"r#z asyncio.Task) __doc__ __future__rrr.typingrrrTaskrr0rrr6s8X# ++%GLL%&JN"r