Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.12/site-packages/pip/_vendor/urllib3/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.12/site-packages/pip/_vendor/urllib3/__pycache__/filepost.cpython-312.pyc

�

4Μg�	���ddlmZddlZddlZddlZddlmZddlmZddl	m
Z
ddlmZejd�d	Zd
�Zd�Zd�Zdd
�Zy)�)�absolute_importN)�BytesIO�)�RequestField)�six)�bzutf-8�c��tjtjd��}tj
s|j
d�}|S)zN
    Our embarrassingly-simple replacement for mimetools.choose_boundary.
    ��ascii)�binascii�hexlify�os�urandomr�PY2�decode)�boundarys �G/usr/local/lib/python3.12/site-packages/pip/_vendor/urllib3/filepost.py�choose_boundaryrs6������
�
�2��/�H��7�7��?�?�7�+���O�c#��K�t|t�rtj|�}nt	|�}|D]+}t|t
�r|���tj|����-y�w)z�
    Iterate over fields.

    Supports list of (k, v) tuples and dicts, and lists of
    :class:`~urllib3.fields.RequestField`.

    N)�
isinstance�dictr�	iteritems�iterr�from_tuples)�fields�i�fields   r�iter_field_objectsr sS�����&�$���M�M�&�!����L�����e�\�*��K��*�*�E�2�2�	�s�A#A%c�l�t|t�rd�tj|�D�Sd�|D�S)a-
    .. deprecated:: 1.6

    Iterate over fields.

    The addition of :class:`~urllib3.fields.RequestField` makes this function
    obsolete. Instead, use :func:`iter_field_objects`, which returns
    :class:`~urllib3.fields.RequestField` objects.

    Supports list of (k, v) tuples and dicts.
    c3�*K�|]\}}||f���
y�w�N���.0�k�vs   r�	<genexpr>ziter_fields.<locals>.<genexpr>:s����9�#8�4�1�a��A��#8���c3�*K�|]\}}||f���
y�wr#r$r%s   rr)ziter_fields.<locals>.<genexpr><s����&�v�t�q�!�Q��F�v�r*)rrrr)rs r�iter_fieldsr,-s-���&�$��9�3�=�=��#8�9�9�&�v�&�&rc�N�t�}|�
t�}t|�D]�}|jt	d|z��t|�j|j
��|j}t|t�rt|�}t|tj�rt|�j|�n|j|�|jd���|jt	d|z��td|z�}|j�|fS)aQ
    Encode a dictionary of ``fields`` using the multipart/form-data MIME format.

    :param fields:
        Dictionary of fields or list of (key, :class:`~urllib3.fields.RequestField`).

    :param boundary:
        If not specified, then a random boundary will be generated using
        :func:`urllib3.filepost.choose_boundary`.
    z--%s
s
z--%s--
z multipart/form-data; boundary=%s)rrr �writer�writer�render_headers�datar�int�strr�	text_type�getvalue)rr�bodyrr1�content_types      r�encode_multipart_formdatar8?s����9�D���"�$��#�F�+���
�
�1�Z�8�,�-�.��t����5�/�/�1�2��z�z���d�C� ��t�9�D��d�C�M�M�*��4�L���t�$��J�J�t���
�
�7��,� 	�J�J�q���*�+�,��9�H�D�E�L��=�=�?�L�(�(rr#)�
__future__rr
�codecsr�iorrr�packagesr�packages.sixr�lookupr/rr r,r8r$rr�<module>r?sF��&��
�	�� ���	����w�	��	"���3�('�$#)r

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists