�
K�gc! � �. � d dl mZ d dlZd dlZddlmZ ddlmZmZm Z ddl
mZ ej rd dl
Z
g d�Z G d� d � � Z e� � Z dd d�Z G d� d� � Z G d� d� � Z G d� d� � Z ed�� � Z edd�� � ZdZdS )!� )�annotationsN� )�Headers)� CertTypes�HeaderTypes�TimeoutTypes)�URL)�Limits�Proxy�Timeout�create_ssl_contextc � � e Zd ZdS )� UnsetTypeN)�__name__�
__module__�__qualname__� � �]/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/httpx/_config.pyr r s � � � � � ��Dr r T�verify�ssl.SSLContext | str | bool�cert�CertTypes | None� trust_env�bool�return�ssl.SSLContextc �h � dd l }dd l}dd l}| du r�|rBt j � d� � r# |j t j d �� � }�n |rAt j � d� � r" |j t j d �� � }n� |j |� � � �� � }n�| du r) |j |j � � }d|_
|j |_ nut | t � � r^d}|� |t � � t j � | � � r |j | �� � S |j | �� � S | }|rRd }|� |t � � t |t � � r|� |� � n
|j |� |S )
Nr T�
SSL_CERT_FILE)�cafile�SSL_CERT_DIR)�capathFz�`verify=<str>` is deprecated. Use `verify=ssl.create_default_context(cafile=...)` or `verify=ssl.create_default_context(capath=...)` instead.zz`cert=...` is deprecated. Use `verify=<ssl_context>` instead,with `.load_cert_chain()` to configure the certificate chain.)�ssl�warnings�certifi�os�environ�get�create_default_context�where�
SSLContext�PROTOCOL_TLS_CLIENT�check_hostname� CERT_NONE�verify_mode�
isinstance�str�warn�DeprecationWarning�path�isdir�load_cert_chain)r r r r# r$ r% �ctx�messages r r
r
s� � �
�J�J�J��O�O�O��N�N�N�
��~�~�� E������8�8� E�,�#�,�B�J��4O�P�P�P�C�C�
� E�2�:�>�>�.�9�9� E�,�#�,�B�J�~�4N�O�O�O�C�C� -�#�,�G�M�M�O�O�D�D�D�C�C� �5����c�n�S�4�5�5��"����-���� �F�C� � � �
J� �
�
�
�g�1�2�2�2�
�7�=�=�� � � =�-�3�-�V�<�<�<�<�)�s�)��8�8�8�8���� '�
L� � �
�
�g�1�2�2�2��d�C� � � '�����%�%�%�%��C���&�&��Jr c �B � e Zd ZdZefeeeed�dd�Zdd�Zdd�Zdd�ZdS )r a�
Timeout configuration.
**Usage**:
Timeout(None) # No timeouts.
Timeout(5.0) # 5s timeout on all operations.
Timeout(None, connect=5.0) # 5s timeout on connect, no other timeouts.
Timeout(5.0, connect=10.0) # 10s timeout on connect. 5s timeout elsewhere.
Timeout(5.0, pool=None) # No timeout on acquiring connection from pool.
# 5s timeout elsewhere.
��connect�read�write�pool�timeout�TimeoutTypes | UnsetTyper; �None | float | UnsetTyper<