관리-도구
편집 파일: filepost.cpython-35.pyc
��Re� � @ s� d d l m Z d d l Z d d l Z d d l Z d d l m Z d d l m Z d d l m Z d d l m Z e j d � d Z d d � Z d d � Z d d � Z d d d � Z d S)� )�absolute_importN)�BytesIO� )�six)�b)�RequestFieldzutf-8� c C s4 t j t j d � � } t j s0 | j d � } | S)zN Our embarrassingly-simple replacement for mimetools.choose_boundary. � �ascii)�binascii�hexlify�os�urandomr �PY2�decode)�boundary� r ��/builddir/build/BUILDROOT/alt-python35-pip-20.2.4-5.el8.x86_64/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/urllib3/filepost.py�choose_boundary s r c c sg t | t � r! t j | � } n t | � } x3 | D]+ } t | t � rQ | Vq4 t j | � Vq4 Wd S)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 � r) d d � t j | � D� Sd 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 s s! | ] \ } } | | f Vq d S)Nr )�.0�k�vr r r � <genexpr>: s ziter_fields.<locals>.<genexpr>c s s! | ] \ } } | | f Vq d S)Nr )r r r r r r r! <