hyb
2026-01-30 44480e71b27aa9d4cb8441f50c873f1b110e9691
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
Ë
ê^iM*ãóΗddlmZddlZddlZddlZej eefZ    ej e    e
ee    fe
ee    effZ     d
                    d d„Z d d„Z d d„Zd d„Zd d„ZGd„d    «Zy) é)Ú annotationsNcóB—|rtj|«dxs|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  õaH:\项目\archive\测试组\脚本\Change_password\venv_build\Lib\site-packages\urllib3/fields.pyÚguess_content_typer
s'€ñÜ×#Ñ# HÓ-¨aÑ0Ò;°GÐ;Ø €NócóZ‡—ddl}|jdtd¬«t‰t«r‰j d«Št ˆfd„dD««s|›d    ‰›d
}    |jd «|Stjj‰d«Š|›d ‰›Š‰S#ttf$rYŒ:wxYw) 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'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.é©Ú
stacklevelúutf-8c3ó&•K—|]}|‰v–—Œ
y­w©N©)Ú.0ÚchÚvalues  €r    ú    <genexpr>z.format_header_param_rfc2231.<locals>.<genexpr>@søèø€Ò/˜rˆrUŒ{Ñ/ùsƒz"\
ú="ú"Úasciiz*=) ÚwarningsÚwarnÚDeprecationWarningÚ
isinstanceÚbytesÚdecodeÚanyÚencodeÚUnicodeEncodeErrorÚUnicodeDecodeErrorÚemailÚutilsÚencode_rfc2231)ÚnamerrÚresults `  r    Úformat_header_param_rfc2231r*s½ø€ó(à ‡MMð    1ô    Øð ôô%œÔØ— ‘ ˜WÓ%ˆä Ó/ YÔ/Ô /ؐ6˜˜E˜7 !Ð$ˆð    Ø M‰M˜'Ô "ðˆMä K‰K× &Ñ & u¨gÓ 6€E؈fBugÐ €Eà €Løô#Ô$6Ð7ò    Ù ð    úsÁBÂB*Â)B*có~—t|t«r|jd«}|jddddœ«}|›d|›d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)é
é é"rr)rrr Ú    translate)r(rs  r    Úformat_multipart_header_paramr0OsF€ô<%œÔØ— ‘ ˜WÓ%ˆð O‰O ¨E°uÑ=Ó >€E؈V2eW˜AÐ Ðr cóR—ddl}|jdtd¬«t||«S)ú„
    .. deprecated:: 2.0.0
        Renamed to :func:`format_multipart_header_param`. Will be
        removed in urllib3 v2.1.0.
    rNz€'format_header_param_html5' has been renamed to 'format_multipart_header_param'. The old name will be removed in urllib3 v2.1.0.r r©rrrr0©r(rrs   r    Úformat_header_param_html5r5uó4€ó à ‡MMð    %ô    Øð ôô )¨¨uÓ 5Ð5r cóR—ddl}|jdtd¬«t||«S)r2rNzz'format_header_param' has been renamed to 'format_multipart_header_param'. The old name will be removed in urllib3 v2.1.0.r rr3r4s   r    Úformat_header_paramr8‡r6r có”—eZdZdZ            d                                        d
d„Ze    d                             d d„«Zd d„Z                dd„Zdd„Z                d                                dd„Z
y)Ú 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.
 
    .. versionchanged:: 2.0.0
        The ``header_formatter`` parameter is deprecated and will
        be removed in urllib3 v2.1.0.
    Ncó—||_||_||_i|_|rt    |«|_|$ddl}|j dtd¬«||_yt|_y)NrzUThe 'header_formatter' parameter is deprecated and will be removed in urllib3 v2.1.0.r r)
Ú_nameÚ    _filenameÚdataÚheadersÚdictrrrÚheader_formatterr0)Úselfr(r>rr?rArs       r    Ú__init__zRequestField.__init__«se€ðˆŒ
Ø!ˆŒØˆŒ    Ø.0ˆŒ Ù Ü ›=ˆDŒLà Ð 'Û à M‰Mð5ä"Øð     ô ð %5ˆDÕ !ä$AˆDÕ !r cóº—t|t«r&t|«dk(r|\}}}n|\}}t|«}nd}d}|}|||||¬«}|j    |¬«|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)rrA)Ú content_type)rÚtupleÚlenr
Úmake_multipart)ÚclsÚ    fieldnamerrArr>rFÚ request_params        r    Ú from_tupleszRequestField.from_tuplesÇst€ô6 eœUÔ #ܐ5‹z˜QŠØ/4Ñ,˜$¡ à!&‘˜$Ü1°(Ó;‘ àˆH؈L؈DáØ t hÐAQô
ˆ ð    ×$Ñ$°,Ð$Ô?àÐr có&—|j||«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:
        )rA)rBr(rs   r    Ú _render_partzRequestField._render_partôs€ð×$Ñ$ T¨5Ó1Ð1r cóʗg}t|t«r|j«}n|}|D])\}}|€Œ    |j|j    ||««Œ+dj |«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"; ...`.
        ú; )rr@ÚitemsÚappendrOÚjoin)rBÚ header_partsÚpartsÚiterabler(rs      r    Ú _render_partszRequestField._render_partssi€ð&ˆÜ l¤DÔ )Ø#×)Ñ)Ó+‰Hà#ˆHà#ò    =‰KˆD%ØÑ Ø— ‘ ˜T×.Ñ.¨t°UÓ;Õ<ð    =ðy‰y˜ÓÐr có`—g}gd¢}|D]B}|jj|d«sŒ |j|›d|j|›«ŒD|jj«D]#\}}||vsŒ |sŒ|j|›d|›«Œ%|jd«dj    |«S)z=
        Renders the headers for this request field.
        )úContent-Dispositionú Content-TypeúContent-LocationFz: z
)r?ÚgetrSrRrT)rBÚlinesÚ    sort_keysÚsort_keyÚ header_nameÚ header_values      r    Úrender_headerszRequestField.render_headers#s¸€ðˆâOˆ    Ø!ò    FˆH؏|‰|×Ñ ¨%Õ0Ø— ‘  ˜z¨¨D¯L©L¸Ñ,BÐ+CÐDÕEð    Fð*.¯©×);Ñ);Ó)=ò    CÑ %ˆK˜Ø )Ò+ÚØ—L‘L K =°°<°.Ð!AÕBð    Cð
     ‰ VÔØ{‰{˜5Ó!Ð!r c    óä—|xsddjd|jd|jfd|jff«g«z}||jd<||jd<||jd<y    )
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_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-datarQÚr(rrZr[r\N)rTrXr<r=r?)rBÚcontent_dispositionrFÚcontent_locations    r    rIzRequestField.make_multipart6s€ð( 3ÒA°kÀTÇYÁYàØ×"Ñ"ؘdŸj™jÐ)¨J¸¿¹Ð+GÐHóð óF
ñ
Ðð/Bˆ ‰ Ð*Ñ+Ø'3ˆ ‰ ^Ñ$Ø+;ˆ ‰ Ð'Ò(r )NNN)
r(Ústrr>Ú_TYPE_FIELD_VALUErú
str | Noner?ztyping.Mapping[str, str] | NonerAú5typing.Callable[[str, _TYPE_FIELD_VALUE], str] | Noner)rKrhrÚ_TYPE_FIELD_VALUE_TUPLErArkÚreturnr:©r(rhrrirmrh)rUz[dict[str, _TYPE_FIELD_VALUE | None] | typing.Sequence[tuple[str, _TYPE_FIELD_VALUE | None]]rmrh)rmrh)rfrjrFrjrgrjrmÚNone) Ú__name__Ú
__module__Ú __qualname__Ú__doc__rCÚ classmethodrMrOrXrcrIrr r    r:r:™së„ñð* $Ø37ØRVð BàðBð ðBðð    Bð
1ð Bð Pó Bð8ð
SWð    *àð*ð'ð*ðPð    *ð
 
ò *óð*óX2ð  ð Dð ð
ó  ó>"ð*+/Ø#'Ø'+ð    <à'ð<ð!ð<ð%ð    <ð
 
ô <r r:)zapplication/octet-stream)rrjrrhrmrhrn)Ú
__future__rÚ email.utilsr%rÚtypingÚUnionrhrrirGrlr
r*r0r5r8r:rr r    ú<module>rysžðÝ"ãÛÛ à—L‘L  e Ñ,ÐØ Ÿ,™,ØØ    ˆ#РÐ
 Ñ!Ø    ˆ#Р #Ð
%Ñ&ð(ñÐð*Dð Øð Ø#&ð àó ó -ó`#óL6ó$6÷$|<ò|<r