ó
    °"³j£  ã                  óÆ  • % S r SSKJr  SSKrSSKJrJrJr  SSKrSSK	r	SSK
Jr  SrSrS	\S
'     SSKr\(       ap  SSKr\R$                  \	R$                  -  rS\S'   \R(                  \	R(                  -  rS\S'   \R,                  \	R,                  -  rS\S'   \R,                  rS\S'   O‹\bX  \R$                  \	R$                  -  r\R(                  \	R(                  -  r\R,                  \	R,                  -  r\R,                  rO0\	R$                  r\	R(                  r\	R,                  r\	R,                  r\" S5      r\SS.SS jjrSS jrSS jrg! \ a    Sr GN*f = f)zYShared HTTP client types and helpers for the HTTPX2 clients Pydantic AI creates and owns.é    )ÚannotationsN)ÚTYPE_CHECKINGÚ	TypeAliasÚTypeVaré   )ÚPydanticAIDeprecationWarning)ÚDEFAULT_HTTP_TIMEOUTÚAsyncHTTPClientÚHTTPAuthÚHTTPTimeoutÚcreate_async_httpx2_clientÚlegacy_httpxÚto_httpx2_timeoutÚwarn_if_legacy_httpx_clientiX  Úintr	   r   r
   r   r   ÚLegacyTimeoutÚ
_NotGivenTé   ©ÚtimeoutÚconnectc                ój   • SSK Jn  [        R                  " [        R                  " XS9SU" 5       0S9$ )u%  Create an `httpx2.AsyncClient` with Pydantic AI's default timeouts and user agent.

Each call creates a new client instance. When used via a [`Provider`][pydantic_ai.providers.Provider],
the client's lifecycle is managed automatically â€” it will be closed when the provider (or agent) exits.
r   )Úget_user_agentr   z
User-Agent)r   Úheaders)Úmodelsr   Úhttpx2ÚAsyncClientÚTimeout)r   r   r   s      ÚN/home/mande/repo/quber/.venv/lib/python3.13/site-packages/pydantic_ai/_http.pyr   r   >   s1   € õ 'ä×ÒÜ—’ wÑ@Ø™~Ó/Ð0ñð ó    c                ó®   • [        U [        5      (       a?  [        R                  " U R                  U R
                  U R                  U R                  S9$ U $ )us  Rebuild a legacy `httpx.Timeout` as the `httpx2.Timeout` that migrated SDKs accept.

Anything else â€” a plain number, or the SDK's own not-given sentinel â€” passes through unchanged,
so callers can hand [`ModelSettings.timeout`][pydantic_ai.settings.ModelSettings.timeout] straight
to a client whose HTTPX family no longer matches the one the setting is typed against.
)r   ÚreadÚwriteÚpool)Ú
isinstancer   r   r   r   r"   r#   r$   )r   s    r   r   r   L   sA   € ô �'œ=×)Ñ)Ü�~Š~ g§o¡o¸G¿L¹LÐPW×P]ÑP]Ðdk×dpÑdpÑqÐqØ€Nr    c               ó–   • [         c  g[        U [         R                  5      (       a"  [        R                  " SU S3[
        US-   S9  gg)u‹  Warn when a caller-owned HTTP client is a legacy `httpx.AsyncClient` rather than an `httpx2.AsyncClient`.

Does nothing when legacy `httpx` isn't installed, since no client can then be an instance of it.

Args:
    http_client: The client the caller was handed; only legacy `httpx.AsyncClient` instances warn.
    consumer: Name of the surface accepting the client, interpolated into the warning message.
    stacklevel: The stacklevel the caller would pass to its own `warnings.warn` call â€” this helper
        adds 1 to account for its own frame. Callers pick the value that lands the warning on the
        user's provider-constructor call site.
Nz `httpx.AsyncClient` support for zK is deprecated and will be removed in v3; use `httpx2.AsyncClient` instead.r   )Ú
stacklevel)r   r%   r   ÚwarningsÚwarnr   )Úhttp_clientÚconsumerr'   s      r   r   r   Y   sL   € ô ÑØä�+œ|×7Ñ7×8Ñ8Ü�ŠØ.¨x¨jð 90ð 0ä(Ø! A‘~ó		
ð 9r    )r   r   r   r   Úreturnzhttpx2.AsyncClient)r   z"float | LegacyTimeout | _NotGivenTr,   z#float | httpx2.Timeout | _NotGivenT)r*   Úobjectr+   Ústrr'   r   r,   ÚNone)Ú__doc__Ú
__future__r   r(   Útypingr   r   r   Ú	httpcore2r   Ú	_warningsr   Ú__all__r	   Ú__annotations__Úhttpxr   ÚImportErrorr   r
   ÚAuthr   r   r   r   r   r   r   r   © r    r   Ú<module>r;      sO  ðÚ _å "ã ß 4Ñ 4ó Û å 3ð	€ð  Ð �cÓ ððÛ ö Ûà!&×!2Ñ!2°V×5GÑ5GÑ!G€O�YÓGØŸ*™* v§{¡{Ñ2€HˆiÓ2Ø"Ÿ]™]¨V¯^©^Ñ;€K�Ó;Ø$Ÿ}™}€M�9Ô,ØÑØ"×.Ñ.°×1CÑ1CÑC€OØ× Ñ  6§;¡;Ñ.€HØ×&Ñ&¨¯©Ñ7€KØ ×(Ñ(�Mà×(Ñ(€OØ�{‰{€HØ—.‘.€Kð —N‘N€Má�\Ó"€
ð 2FÐVW÷ ô	õ
øðm ó ØƒLðús   ±E ÅE ÅE 