관리-도구
편집 파일: filepost.cpython-38.pyc
U ʗRe� � @ s� d dl mZ d dlZd dlZd dlZd dlmZ ddlmZ ddl m Z ddlmZ e� d�d Zd d� Zdd � Zdd� Zddd�ZdS )� )�absolute_importN)�BytesIO� )�RequestField)�six)�bzutf-8� c C s$ t �t�d��} tjs | �d�} | S )zN Our embarrassingly-simple replacement for mimetools.choose_boundary. � �ascii)�binascii�hexlify�os�urandomr �PY2�decode)�boundary� r ��/builddir/build/BUILDROOT/alt-python38-pip-22.2.1-2.el8.x86_64/opt/alt/python38/lib/python3.8/site-packages/pip/_vendor/urllib3/filepost.py�choose_boundary s r c c sJ t | t�rt�| �}nt| �}|D ]"}t |t�r8|V q"tj|� V q"dS )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�fieldr r r �iter_field_objects s r c C s, t | t�rdd� t�| �D �S dd� | 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 s s | ]\}}||fV qd S �Nr ��.0�k�vr r r � <genexpr>: s ziter_fields.<locals>.<genexpr>c s s | ]\}}||fV qd S r r r r r r r# <