Repository URL to install this package:
|
Version:
2.0.0-beta3-2-armbian20.08.0-trunk1 ▾
|
wiperf
/
usr
/
local
/
lib
/
python3.7
/
dist-packages
/
urllib3
/
__pycache__
/
filepost.cpython-37.pyc
|
|---|
B
¥ûø·®ã @ s d dl mZ d dlZd dlZd dlZd dlmZ ddlmZ ddl m
Z
ddlmZ e
d¡d Zd
d Zdd
Zdd ZdddZdS )é )Úabsolute_importN)ÚBytesIOé )Úsix)Úb)ÚRequestFieldzutf-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 ú5/tmp/pip-install-z4i6eiy2/urllib3/urllib3/filepost.pyÚchoose_boundary s
r c c sN t | trt | ¡}nt| }x*|D ]"}t |tr:|V q$tj| V q$W 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 | trdd 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 )Nr )r r r r r r r! <