Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
odigos / etc / odigos-vmagent / instrumentations / python / urllib3 / __pycache__ / fields.cpython-311.pyc
Size: Mime:
§

ÞEqfƒ!ãó̗ddlmZddlZddlZddlZddlmZdd„Zd„Z	dd	d
œZ
e
 d„edd¦«D¦«¦«d
„Z
d„ZeZGd„de¦«ZdS)é)Úabsolute_importNé)Úsixúapplication/octet-streamcóB—|rtj|¦«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)Ú	mimetypesÚ
guess_type)ÚfilenameÚdefaults  ú5/tmp/pip-target-asg8frr5/lib/python/urllib3/fields.pyÚguess_content_typer

s,€ðð<ÝÔ# HÑ-Ô-¨aÔ0Ð;°GÐ;Ø€Nócó܇—t‰tj¦«r‰ d¦«Št	ˆfd„dD¦«¦«s7|›d‰›d}	| d¦«|S#ttf$rYnwxYwtjr‰ d¦«Štj
 ‰d¦«Š|›d‰›Štjr‰ d¦«Š‰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``.
    :ret:
        An RFC-2231-formatted unicode string.
    úutf-8c3ó •K—|]}|‰vV—Œ	dS©N©)Ú.0ÚchÚvalues  €rú	<genexpr>z.format_header_param_rfc2231.<locals>.<genexpr>+s'øèè€Ð/Ð/˜rˆrUˆ{Ð/Ð/Ð/Ð/Ð/Ð/rz"\
ú="ú"Úasciiz*=)Ú
isinstancerÚbinary_typeÚdecodeÚanyÚencodeÚUnicodeEncodeErrorÚUnicodeDecodeErrorÚPY2ÚemailÚutilsÚencode_rfc2231)ÚnamerÚresults ` rÚformat_header_param_rfc2231r(s
ø€õ %œÑ)Ô)ð&Ø—’˜WÑ%Ô%ˆåÐ/Ð/Ð/Ð/ YÐ/Ñ/Ô/Ñ/Ô/ðØ#˜t˜t U U UÐ+ˆð	ØMŠM˜'Ñ"Ô"Ð"ðˆMøõ#Õ$6Ð7ð	ð	ð	ØˆDð	øøøõ
„wð&Ø—’˜WÑ%Ô%ˆõ
ŒK×&Ò& u¨gÑ6Ô6€Eؘ˜˜e˜eÐ$€Eå
„wð&Ø—’˜WÑ%Ô%ˆà€LsÁA,Á,BÁ?Bz%22z\\)rú\cóf—i|].}|dv¯tj|¦«d |¦«“Œ/S))éz%{:02X})rÚunichrÚformat)rÚccs  rú
<dictcomp>r/JsE€ðððàØ
WÐÐõ	Œ
2‰Œ˜
×)Ò)¨"Ñ-Ô-àÐÐré cóć—ˆfd„}tjd d„‰ ¦«D¦«¦«¦«}| ||¦«}|S)Ncó:•—‰| d¦«S)Nr)Úgroup)ÚmatchÚneedles_and_replacementss €rÚreplacerz#_replace_multiple.<locals>.replacerSsø€Ø'¨¯ª°A©¬Ô7Ð7rú|có6—g|]}tj|¦«‘ŒSr)ÚreÚescape)rÚneedles  rú
<listcomp>z%_replace_multiple.<locals>.<listcomp>Ws"€ÐSÐSÐS¨•2”9˜VÑ$Ô$ÐSÐSÐSr)r9ÚcompileÚjoinÚkeysÚsub)rr5r6Úpatternr's `   rÚ_replace_multiplerBRstø€ð8ð8ð8ð8ð8õŒjØ	Š	ÐSÐSÐ3K×3PÒ3PÑ3RÔ3RÐSÑSÔSÑTÔTñô€Gð[Š[˜ 5Ñ
)Ô
)€Fà€Mrcóš—t|tj¦«r| d¦«}t	|t
¦«}|›d|›dS)a±
    Helper function to format and quote a single header parameter using the
    HTML5 strategy.

    Particularly useful for header parameters which might contain
    non-ASCII values, like file names. This follows the `HTML5 Working Draft
    Section 4.10.22.7`_ and matches the behavior of curl and modern browsers.

    .. _HTML5 Working Draft Section 4.10.22.7:
        https://w3c.github.io/html/sec-forms.html#multipart-form-data

    :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``.
    :ret:
        A unicode string, stripped of troublesome characters.
    rrr)rrrrrBÚ_HTML5_REPLACEMENTS)r&rs  rÚformat_header_param_html5rE_sL€õ&%œÑ)Ô)ð&Ø—’˜WÑ%Ô%ˆå˜eÕ%8Ñ9Ô9€Eà˜˜˜u˜u˜uÐ%Ð%rcóV—eZdZdZddefd„Zeefd„¦«Zd„Zd„Z	d„Z
	d	d„ZdS)
ÚRequestFielda
    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.
    :param header_formatter:
        An optional callable that is used to encode and format the headers. By
        default, this is :func:`format_header_param_html5`.
    Ncóx—||_||_||_i|_|rt	|¦«|_||_dSr)Ú_nameÚ	_filenameÚdataÚheadersÚdictÚheader_formatter)Úselfr&rKr
rLrNs      rÚ__init__zRequestField.__init__sC€ðˆŒ
Ø!ˆŒØˆŒ	؈ŒØð	)Ý ™=œ=ˆDŒLØ 0ˆÔÐÐrcóä—t|t¦«r/t|¦«dkr|\}}}n|\}}t|¦«}nd}d}|}|||||¬¦«}| |¬¦«|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.
        éN)r
rN)Úcontent_type)rÚtupleÚlenr
Úmake_multipart)ÚclsÚ	fieldnamerrNr
rKrSÚ
request_params        rÚfrom_tupleszRequestField.from_tuplesŸs™€õ$eUÑ#Ô#ð		ݐ5‰zŒz˜QŠˆØ/4Ñ,˜$  à!&‘˜$Ý1°(Ñ;Ô;àˆH؈L؈Dà˜Øt hÐAQð
ñ
ô
ˆ
ð	×$Ò$°,Ð$Ñ?Ô?Ð?àÐrcó.—| ||¦«S)aI
        Overridable helper function to format a single header parameter. By
        default, this calls ``self.header_formatter``.

        :param name:
            The name of the parameter, a string expected to be ASCII only.
        :param value:
            The value of the parameter, provided as a unicode string.
        )rN)rOr&rs   rÚ_render_partzRequestField._render_partÃs€ð×$Ò$ T¨5Ñ1Ô1Ð1rcóì—g}|}t|t¦«r| ¦«}|D]0\}}|)| | ||¦«¦«Œ1d |¦«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ú; )rrMÚitemsÚappendr\r>)rOÚheader_partsÚpartsÚiterabler&rs      rÚ
_render_partszRequestField._render_partsÐs€ðˆØˆÝl¥DÑ)Ô)ð	,Ø#×)Ò)Ñ+Ô+ˆHà#ð	=ð	=‰KˆD%ØÐ Ø—’˜T×.Ò.¨t°UÑ;Ô;Ñ<Ô<Ð<øàzŠz˜%Ñ Ô Ð rcój—g}gd¢}|D]B}|j |d¦«r%| |›d|j|›¦«ŒC|j ¦«D]%\}}||vr|r| |›d|›¦«Œ&| d¦«d |¦«S)z=
        Renders the headers for this request field.
        )úContent-DispositionúContent-TypeúContent-LocationFz: z
)rLÚgetr`r_r>)rOÚlinesÚ	sort_keysÚsort_keyÚheader_nameÚheader_values      rÚrender_headerszRequestField.render_headersæsà€ðˆàOÐOÐOˆ	Ø!ð	Mð	MˆHØŒ|×Ò ¨%Ñ0Ô0ð
MØ—’¨(¨(¨(°D´LÀÔ4JÐ4JÐKÑLÔLÐLøà)-¬×);Ò);Ñ)=Ô)=ð	Jð	JÑ%ˆK˜Ø )Ð+Ð+ØðJØ—L’L¨k¨k¨k¸<¸<Ð!HÑIÔIÐIøà
ŠWÑÔÐØ|Š|˜EÑ"Ô"Ð"rcóà—|pd|jd<|jdxxd d| d|jfd|jff¦«g¦«z
cc<||jd<||jd<d	S)
a|
        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_type:
            The 'Content-Type' of the request body.
        :param content_location:
            The 'Content-Location' of the request body.

        z	form-datarfr^Úr&r
rgrhN)rLr>rdrIrJ)rOÚcontent_dispositionrSÚcontent_locations    rrVzRequestField.make_multipartùs˜€ð/BÐ.QÀ\ˆŒÐ*Ñ+ØŒÐ*Ð+Ð+Ô+¨u¯zªzàØ×"Ò"ؘtœzÐ*¨[¸$¼.Ð,IÐJñôð
ñ0
ô0
ñ	
Ð+Ð+Ñ+ð(4ˆŒ^Ñ$Ø+;ˆŒÐ'Ñ(Ð(Ð(r)NNN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__rErPÚclassmethodrZr\rdrorVrrrrGrG~s©€€€€€ððð(ØØ2ð
1ð1ð1ð1ð Ø<Uð!ð!ð!ñ„[ð!ðF2ð2ð2ð!ð!ð!ð,#ð#ð#ð(MQð<ð<ð<ð<ð<ð<rrG)r)Ú
__future__rÚemail.utilsr#rr9Úpackagesrr
r(rDÚupdateÚrangerBrEÚformat_header_paramÚobjectrGrrrú<module>r€s)ðØ&Ð&Ð&Ð&Ð&Ð&àÐÐÐØÐÐÐØ	€	€	€	àÐÐÐÐÐððððð'ð'ð'ðVàððÐð×Òððà%˜˜hÑ'Ô'ðñôñôðð
ð
ð
ð&ð&ð&ð80ÐðT<ðT<ðT<ðT<ðT<6ñT<ôT<ðT<ðT<ðT<r