+\h} dZddlmZddlZddlZddlZddlZddlmZm Z m Z m Z ddl m Z ddlmZdZe de d ef Zdd Z dd Zej(d k\rej*Zej,ZyddZddZy)z2Miscellaneous pieces that need to be synchronized.) annotationsN)AnyCallableTypeVarcast)OperationFailure)_REAUTHENTICATION_REQUIRED_CODEFF.)boundc0dfd }tt|S)NcK|jdd}ddlm}ddlm} |i|d{S7#t $r}|r|j tk(rhd}|D],}t||r|}nt||s |j}n|r|jdd{7n|i|d{7cYd}~Sd}~wwxYww)N no_reauthFr)AsyncConnection)_BulkWriteContextT)reauthenticate) poppymongo.asynchronous.poolrpymongo.messagerrcoder isinstanceconn authenticate) argskwargsrrrexcrargfuncs _/root/niggaflix-v3/playground/venv/lib/python3.12/site-packages/pymongo/asynchronous/helpers.pyinnerz_handle_reauth..inner)sJJ{E2 =5 t.v.. .. xx::C!#7"!#'89"xx ++4+@@@!4262222 ) s`C 535C5 C9B=8&B=B!B=1B42B=6C7C<B==CC)rrrrreturnr)rr )rrs` r_handle_reauthr!(s: 5>cKts0tj}|j||fi|d{St j||fi|S7w)N)_IS_SYNCasyncioget_running_loop getaddrinfosocket)hostportrloops r _getaddrinfor,IsS '')%T%%dD;F;;;!!$777K|jd{S7w)iCompatibility function until we drop 3.9 support: https://docs.python.org/3/library/functions.html#anext.N) __anext__clss ranextr4`s]]_$$$s c"|jS)r0) __aiter__r2s raiterr7ds}}r")rr r r )r)rr*rrrr zklist[tuple[socket.AddressFamily, socket.SocketKind, int, str, tuple[str, int] | tuple[str, int, int, int]]])r3rr r)__doc__ __future__rr%builtinsr(systypingrrrrpymongo.errorsrpymongo.helpers_sharedr r$r r!r, version_infor4r7r"rrAs9" C  CxS)*B8 88$'88$w NNE NNE%r"