관리-도구
편집 파일: filepost.cpython-312.pyc
� G��e� � � � d dl mZ d dlZd dlZd dlZd dlmZ ddlmZ ddl m Z ddlmZ ej d� d Zd � Zd� Zd� Zdd �Zy)� )�absolute_importN)�BytesIO� )�RequestField)�six)�bzutf-8� c � � t j t j d� � } t j s| j d� } | S )zN Our embarrassingly-simple replacement for mimetools.choose_boundary. � �ascii)�binascii�hexlify�os�urandomr �PY2�decode)�boundarys ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-1.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/urllib3/filepost.py�choose_boundaryr s6 � � ���� � �2��/�H��7�7��?�?�7�+���O� c # �� K � t | t � rt j | � }nt | � }|D ]+ }t |t � r|�� �t j |� �� �- 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 sX � �� � �&�$���M�M�&�!����L��� 3���e�\�*��K��*�*�E�2�2� 3�s �A#A%c �l � t | t � rd� t j | � D � S d� | 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. c 3 �* K � | ] \ }}||f�� � y �w�N� ��.0�k�vs r � <genexpr>ziter_fields.<locals>.<genexpr>: s � �� �9�4�1�a��A��9�� �c 3 �* K � | ] \ }}||f�� � y �wr# r$ r% s r r) ziter_fields.<locals>.<genexpr><