Files
wg-backend-django/dell-env/lib/python3.11/site-packages/urllib3/__pycache__/fields.cpython-311.pyc

153 lines
13 KiB
Plaintext
Raw Normal View History

2023-10-30 14:40:43 +07:00
<EFBFBD>
s]?e+<00><01><><00>ddlmZddlZddlZddlZejeefZ eje ej
ee fej
ee effZ ddd <09>Z dd <0A>Z dd<0E>Zdd<0F>Zdd<10>ZGd<11>d<12><00>ZdS)<16>)<01> annotationsN<73>application/octet-stream<61>filename<6D>
str | None<6E>default<6C>str<74>returnc<01>B<00>|rtj|<00><00>dp|S|S)z<>
Guess the "Content-Type" of a file.
:param filename:
The filename to guess the "Content-Type" of using :mod:`mimetypes`.
:param default:
If no "Content-Type" can be guessed, default to `default`.
r)<02> mimetypes<65>
guess_type)rrs <20>g/home/infidel/Sync/TIP/WireGuard/ocp-wg-backend/dell-env/lib/python3.11/site-packages/urllib3/fields.py<70>guess_content_typers,<00><00><10><<3C><18>#<23>H<EFBFBD>-<2D>-<2D>a<EFBFBD>0<>;<3B>G<EFBFBD>;<3B> <12>N<EFBFBD><00>name<6D>value<75>_TYPE_FIELD_VALUEc<01><><00><01>ddl}|<02>dtd<04><05><00>t<00>t<00><00>r<15><01>d<06><00><00>t <00>fd<07>dD<00><00><00><00>s7|<00>d <09><01>d
<EFBFBD>} |<03>d <0B><00>|S#ttf$rYnwxYwtj <00> <00>d<06><00><00>|<00>d <0C><01><00><03><01>S) a<>
Helper function to format and quote a single header parameter using the
strategy defined in RFC 2231.
Particularly useful for header parameters which might contain
non-ASCII values, like file names. This follows
`RFC 2388 Section 4.4 <https://tools.ietf.org/html/rfc2388#section-4.4>`_.
:param name:
The name of the parameter, a string expected to be ASCII only.
:param value:
The value of the parameter, provided as ``bytes`` or `str``.
:returns:
An RFC-2231-formatted unicode string.
.. deprecated:: 2.0.0
Will be removed in urllib3 v2.1.0. This is not valid for
``multipart/form-data`` header parameters.
rNz<4E>'format_header_param_rfc2231' is deprecated and will be removed in urllib3 v2.1.0. This is not valid for multipart/form-data header parameters.<2E><00><01>
stacklevel<EFBFBD>utf-8c3<01> <00>K<00>|]}|<01>vV<00><00> dS<00>N<>)<03>.0<EFBFBD>chrs <20>r <00> <genexpr>z.format_header_param_rfc2231.<locals>.<genexpr>@s'<00><><00><00><00>/<2F>/<2F>r<EFBFBD>r<EFBFBD>U<EFBFBD>{<7B>/<2F>/<2F>/<2F>/<2F>/<2F>/rz"\
<EFBFBD>="<22>"<22>asciiz*=) <0A>warnings<67>warn<72>DeprecationWarning<6E>
isinstance<EFBFBD>bytes<65>decode<64>any<6E>encode<64>UnicodeEncodeError<6F>UnicodeDecodeError<6F>email<69>utils<6C>encode_rfc2231)rrr!<00>results ` r <00>format_header_param_rfc2231r/s <00><><00>(<14>O<EFBFBD>O<EFBFBD>O<EFBFBD> <0C>M<EFBFBD>M<EFBFBD> 1<> <1B><14> <12><06><06><06><12>%<25><15><1F><1F>&<26><15> <0C> <0C>W<EFBFBD>%<25>%<25><05> <0E>/<2F>/<2F>/<2F>/<2F>Y<EFBFBD>/<2F>/<2F>/<2F> /<2F> /<2F><1A><18>$<24>$<24>E<EFBFBD>$<24>$<24>$<24><06> <1A> <12>M<EFBFBD>M<EFBFBD>'<27> "<22> "<22> "<22><1A>M<EFBFBD><4D>#<23>$6<>7<> <11> <11> <11> <10>D<EFBFBD> <11><><EFBFBD><EFBFBD>
<12>K<EFBFBD> &<26> &<26>u<EFBFBD>g<EFBFBD> 6<> 6<>E<EFBFBD><13> <1E> <1E>u<EFBFBD> <1E> <1E>E<EFBFBD> <10>Ls<00>1B<00>B<03>Bc<01><><00>t|t<00><00>r|<01>d<01><00>}|<01>dddd<05><03><00>}|<00>d|<01>d<07>S)a<>
Format and quote a single multipart header parameter.
This follows the `WHATWG HTML Standard`_ as of 2021/06/10, matching
the behavior of current browser and curl versions. Values are
assumed to be UTF-8. The ``\n``, ``\r``, and ``"`` characters are
percent encoded.
.. _WHATWG HTML Standard:
https://html.spec.whatwg.org/multipage/
form-control-infrastructure.html#multipart-form-data
:param name:
The name of the parameter, an ASCII-only ``str``.
:param value:
The value of the parameter, a ``str`` or UTF-8 encoded
``bytes``.
:returns:
A string ``name="value"`` with the escaped value.
.. versionchanged:: 2.0.0
Matches the WHATWG HTML Standard as of 2021/06/10. Control
characters are no longer percent encoded.
.. versionchanged:: 2.0.0
Renamed from ``format_header_param_html5`` and
``format_header_param``. The old names will be removed in
urllib3 v2.1.0.
rz%0Az%0Dz%22)<03>
<00> <00>"rr)r$r%r&<00> translate)rrs r <00>format_multipart_header_paramr5Os[<00><00><<12>%<25><15><1F><1F>&<26><15> <0C> <0C>W<EFBFBD>%<25>%<25><05> <12>O<EFBFBD>O<EFBFBD><15>E<EFBFBD>u<EFBFBD>=<3D>=<3D> ><3E> ><3E>E<EFBFBD><12> <1E> <1E>e<EFBFBD> <1E> <1E> <1E>rc<01>d<00>ddl}|<02>dtd<04><05><00>t||<01><00>S)<06><>
.. deprecated:: 2.0.0
Renamed to :func:`format_multipart_header_param`. Will be
removed in urllib3 v2.1.0.
rNz<4E>'format_header_param_html5' has been renamed to 'format_multipart_header_param'. The old name will be removed in urllib3 v2.1.0.rr<00>r!r"r#r5<00>rrr!s r <00>format_header_param_html5r:u<00>G<00><00> <14>O<EFBFBD>O<EFBFBD>O<EFBFBD> <0C>M<EFBFBD>M<EFBFBD> %<25> <1B><14> <12><06><06><06> )<29><14>u<EFBFBD> 5<> 5<>5rc<01>d<00>ddl}|<02>dtd<04><05><00>t||<01><00>S)r7rNzz'format_header_param' has been renamed to 'format_multipart_header_param'. The old name will be removed in urllib3 v2.1.0.rrr8r9s r <00>format_header_paramr=<00>r;rc<01>f<00>eZdZdZ ddd <0A>Ze dd d<12><05><00>Zd!d<13>Zd"d<16>Zd#d<17>Z dd$d<1C>Z
dS)%<25> RequestFielda<64>
A data container for request body parameters.
:param name:
The name of this request field. Must be unicode.
:param data:
The data/value body.
:param filename:
An optional filename of the request field. Must be unicode.
:param headers:
An optional dict-like object of headers to initially use for the field.
.. versionchanged:: 2.0.0
The ``header_formatter`` parameter is deprecated and will
be removed in urllib3 v2.1.0.
Nrr<00>datarrr<00>headers<72>typing.Mapping[str, str] | None<6E>header_formatter<65>5typing.Callable[[str, _TYPE_FIELD_VALUE], str] | Nonec<01><><00>||_||_||_i|_|rt |<04><00>|_|<05>*ddl}|<06>dtd<03><04><00>||_dSt|_dS)NrzUThe 'header_formatter' parameter is deprecated and will be removed in urllib3 v2.1.0.rr)
<EFBFBD>_name<6D> _filenamer@rA<00>dictr!r"r#rCr5)<07>selfrr@rrArCr!s r <00>__init__zRequestField.__init__<5F>s<><00><00><1A><04>
<EFBFBD>!<21><04><0E><18><04> <09>.0<EFBFBD><04> <0C> <12> )<29><1F><07>=<3D>=<3D>D<EFBFBD>L<EFBFBD> <1B> '<27> <1B>O<EFBFBD>O<EFBFBD>O<EFBFBD> <14>M<EFBFBD>M<EFBFBD>5<>"<22><1C> <1A> <0E> <0E> <0E> %5<>D<EFBFBD> !<21> !<21> !<21>$A<>D<EFBFBD> !<21> !<21> !r<00> fieldnamer<00>_TYPE_FIELD_VALUE_TUPLEr c<01><><00>t|t<00><00>r<>t|<02><00>dkr<tjtjt tt f|<02><00>\}}}nJtjtjt tf|<02><00>\}}t|<04><00>}nd}d}|}|||||<03><03><00>}|<07> |<06><04><00>|S)a<>
A :class:`~urllib3.fields.RequestField` factory from old-style tuple parameters.
Supports constructing :class:`~urllib3.fields.RequestField` from
parameter of key/value strings AND key/filetuple. A filetuple is a
(filename, data, MIME type) tuple where the MIME type is optional.
For example::
'foo': 'bar',
'fakefile': ('foofile.txt', 'contents of foofile'),
'realfile': ('barfile.txt', open('realfile').read()),
'typedfile': ('bazfile.bin', open('bazfile').read(), 'image/jpeg'),
'nonamefile': 'contents of nonamefile field',
Field names and filenames must be unicode.
<20>N)rrC)<01> content_type)
r$<00>tuple<6C>len<65>typing<6E>cast<73>Tuplerrr<00>make_multipart)<08>clsrKrrCrr@rO<00> request_params r <00> from_tupleszRequestField.from_tuples<65>s<><00><00>6 <16>e<EFBFBD>U<EFBFBD> #<23> #<23> <19><12>5<EFBFBD>z<EFBFBD>z<EFBFBD>Q<EFBFBD><EFBFBD><EFBFBD>/5<>{<7B><1A>L<EFBFBD><13>&7<><13>!<<3C>=<3D>u<EFBFBD>0<12>0<12>,<2C><08>$<24> <0C> <0C>"(<28><1B><1A>L<EFBFBD><13>&7<>!7<>8<>%<25>"<12>"<12><0E><08>$<24> 2<>(<28>;<3B>;<3B> <0C> <0C><1B>H<EFBFBD><1F>L<EFBFBD><18>D<EFBFBD><1B><03> <15>t<EFBFBD>h<EFBFBD>AQ<41>
<EFBFBD>
<EFBFBD>
<EFBFBD> <0A> <16>$<24>$<24>,<2C>$<24>?<3F>?<3F>?<3F><1C>rc<01>.<00>|<00>||<02><00>S)a<>
Override this method to change how each multipart header
parameter is formatted. By default, this calls
:func:`format_multipart_header_param`.
:param name:
The name of the parameter, an ASCII-only ``str``.
:param value:
The value of the parameter, a ``str`` or UTF-8 encoded
``bytes``.
:meta public:
)rC)rIrrs r <00> _render_partzRequestField._render_part<72>s<00><00><14>$<24>$<24>T<EFBFBD>5<EFBFBD>1<>1<>1r<00> header_parts<74>[dict[str, _TYPE_FIELD_VALUE | None] | typing.Sequence[tuple[str, _TYPE_FIELD_VALUE | None]]c<01><><00>g}t|t<00><00>r|<01><00><00>}n|}|D]0\}}|<05>)|<02>|<00>||<05><00><00><00><00>1d<02>|<02><00>S)aO
Helper function to format and quote a single header.
Useful for single headers that are composed of multiple items. E.g.,
'Content-Disposition' fields.
:param header_parts:
A sequence of (k, v) tuples or a :class:`dict` of (k, v) to format
as `k1="v1"; k2="v2"; ...`.
N<>; )r$rH<00>items<6D>appendrZ<00>join)rIr[<00>parts<74>iterablerrs r <00> _render_partszRequestField._render_partss<><00><00>&<13><05> <15>l<EFBFBD>D<EFBFBD> )<29> )<29> $<24>#<23>)<29>)<29>+<2B>+<2B>H<EFBFBD>H<EFBFBD>#<23>H<EFBFBD>#<23> =<3D> =<3D>K<EFBFBD>D<EFBFBD>%<25><14> <20><15> <0C> <0C>T<EFBFBD>.<2E>.<2E>t<EFBFBD>U<EFBFBD>;<3B>;<3B><<3C><<3C><<3C><><13>y<EFBFBD>y<EFBFBD><15><1F><1F>rc<01>j<00>g}gd<01>}|D]B}|j<00>|d<02><00>r%|<01>|<03>d|j|<00><00><03><00><00>C|j<00><00><00>D]%\}}||vr|r|<01>|<04>d|<05><00><03><00><00>&|<01>d<04><00>d<04>|<01><00>S)z=
Renders the headers for this request field.
)<03>Content-Disposition<6F> Content-Type<70>Content-LocationFz: z
)rA<00>getr`r_ra)rI<00>lines<65> sort_keys<79>sort_key<65> header_name<6D> header_values r <00>render_headerszRequestField.render_headers's<><00><00><13><05>O<>O<>O<> <09>!<21> F<01> F<01>H<EFBFBD><13>|<7C><1F><1F><08>%<25>0<>0<> F<01><15> <0C> <0C><08>D<>D<>D<EFBFBD>L<EFBFBD><18>,B<>D<>D<>E<>E<>E<><45>)-<2D><1C>);<3B>);<3B>)=<3D>)=<3D> C<01> C<01> %<25>K<EFBFBD><1C><1A>)<29>+<2B>+<2B><1F>C<01><19>L<EFBFBD>L<EFBFBD>K<EFBFBD>!A<>!A<><<3C>!A<>!A<>B<>B<>B<><42> <0A> <0C> <0C>V<EFBFBD><1C><1C><1C><15>{<7B>{<7B>5<EFBFBD>!<21>!<21>!r<00>content_dispositionrO<00>content_location<6F>Nonec <01><><00>|pdd<02>d|<00>d|jfd|jff<02><00>g<02><00>z}||jd<||jd<||jd<d S)
a<EFBFBD>
Makes this request field into a multipart request field.
This method overrides "Content-Disposition", "Content-Type" and
"Content-Location" headers to the request parameter.
:param content_disposition:
The 'Content-Disposition' of the request body. Defaults to 'form-data'
:param content_type:
The 'Content-Type' of the request body.
:param content_location:
The 'Content-Location' of the request body.
z form-datar^<00>rrrfrgrhN)rardrFrGrA)rIrprOrqs r rUzRequestField.make_multipart:s<><00><00>( 3<>A<>k<EFBFBD>T<EFBFBD>Y<EFBFBD>Y<EFBFBD><12><14>"<22>"<22><1C>d<EFBFBD>j<EFBFBD>)<29>J<EFBFBD><04><0E>+G<>H<><12><12> <0E>F
<EFBFBD>F
<EFBFBD>
<EFBFBD><1B>/B<01><04> <0C>*<2A>+<2B>'3<><04> <0C>^<5E>$<24>+;<3B><04> <0C>'<27>(<28>(<28>(r)NNN)
rrr@rrrrArBrCrDr)rKrrrLrCrDr r?<00>rrrrr r)r[r\r r)r r)rprrOrrqrr rr) <0B>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__doc__rJ<00> classmethodrXrZrdrorUrrr r?r?<00>s<><00><00><00><00><00><00><08><08>* $<24>37<33>RV<52> B<01>B<01>B<01>B<01>B<01>8<11>
SW<01> .<1D>.<1D>.<1D>.<1D><11>[<5B>.<1D>`2<>2<>2<>2<>  <20> <20> <20> <20>>"<22>"<22>"<22>"<22>*+/<2F>#'<27>'+<2B> <<3C><<3C><<3C><<3C><<3C><<3C><rr?)r)rrrrr rru)<12>
__future__r<00> email.utilsr+r rR<00>Unionrr%rrTrLrr/r5r:r=r?rrr <00><module>r~s-<00><01>"<22>"<22>"<22>"<22>"<22>"<22><12><12><12><12><10><10><10><10> <0A> <0A> <0A> <0A><1A>L<EFBFBD><13>e<EFBFBD><1A>,<2C><11> <20>,<2C><15>
<EFBFBD>L<EFBFBD><13>'<27>'<27>(<28>
<EFBFBD>L<EFBFBD><13>'<27><13>,<2C>-<2D>/<2F><02><17>*D<01> <13> <13> <13> <13> <13> -<11>-<11>-<11>-<11>`#<1F>#<1F>#<1F>#<1F>L6<>6<>6<>6<>$6<>6<>6<>6<>$@<<3C>@<<3C>@<<3C>@<<3C>@<<3C>@<<3C>@<<3C>@<<3C>@<<3C>@<r