zmc
2023-12-22 9fdbf60165db0400c2e8e6be2dc6e88138ac719a
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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
U
Þ=®d˜ã@sTddlmZddlZddlZddlmZddlmZddl    m
Z
ddlm Z ddl m Zdd    lmZdd
lmZdd lmZdd lmZdd lmZddlmZddlmZddlmZddlmZddlmZddlmZddlm Z ej!r ddl"m#Z#ddl"m$Z$ddl"m%Z%ddl&m'Z'ddddœdd„Z(Gd d!„d!eƒZ Gd"d#„d#ƒZ)dS)$é)Ú annotationsN)Ú
HTTPStatus)Úurljoiné)ÚHeaders)Úremove_entity_headers)ÚResponse)Ú_invalid_iri_to_uri)Ú
iri_to_uri)Úcached_property)ÚClosingIterator)Úget_current_url)Ú _get_environ)Ú generate_etag)Ú    http_date)Úis_resource_modified)Ú parse_etags)Úparse_range_header)Ú _RangeWrapper)Ú StartResponse)ÚWSGIApplication)ÚWSGIEnvironmenté)ÚRequestzt.Iterable[str | bytes]Ústrút.Iterator[bytes])ÚiterableÚcharsetÚreturnccs,|D]"}t|tƒr | |¡Vq|VqdS©N)Ú
isinstancerÚencode)rrÚitem©r#úQd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\werkzeug/wrappers/response.pyÚ _iter_encodeds
r%c    sœeZdZUdZdZdZdZded<drddd    d
d
d d d œ‡fdd„ Zdddœdd„Z    ddœdd„Z
e dsddddœdd„ƒZ e dtddd ddœdd „ƒZ ejdud!d"d#œd$d%„ƒZejd&dd#œd'd%„ƒZdvd d(d#œd)d%„Zd(d d*œd+d,„Zeeed-d.Zd/dœd0d1„Zdwd d d2œd3d4„Zd dœd5d6„Zd7dœd8d9„Zed dœd:d;„ƒZed dœd<d=„ƒZd dœd>d?„Zddœd@dA„ZdBdC„Zd dœdDdE„ZddFdGœdHdI„ZddJdGœdKdL„ZddMdGœdNdO„Z ddPdJdQœdRdS„Z!e"Z#edTdœdUdV„ƒZ"ejdxd d!dXdYœdZd[„ƒZ$ejdyd d dTdYœd\d[„ƒZ$dzd d dTdYœd]d[„Z$e%d^dœd_d`„ƒZ&dadad dbœdcdd„Z'dd dGœdedf„Z(dd/dgd dhœdidj„Z)d{dkdgd/ddlœdmdn„Z*d|d d d doœdpdq„Z+‡Z,S)}ra¤ Represents an outgoing WSGI HTTP response with body, status, and
    headers. Has properties and methods for using the functionality
    defined by various HTTP specs.
 
    The response body is flexible to support different use cases. The
    simple form is passing bytes, or a string which will be encoded as
    UTF-8. Passing an iterable of bytes or strings makes this a
    streaming response. A generator is particularly useful for building
    a CSV file in memory or using SSE (Server Sent Events). A file-like
    object is also iterable, although the
    :func:`~werkzeug.utils.send_file` helper should be used in that
    case.
 
    The response object is itself a WSGI application callable. When
    called (:meth:`__call__`) with ``environ`` and ``start_response``,
    it will pass its status and headers to ``start_response`` then
    return its body as an iterable.
 
    .. code-block:: python
 
        from werkzeug.wrappers.response import Response
 
        def index():
            return Response("Hello, World!")
 
        def application(environ, start_response):
            path = environ.get("PATH_INFO") or "/"
 
            if path == "/":
                response = index()
            else:
                response = Response("Not Found", status=404)
 
            return response(environ, start_response)
 
    :param response: The data for the body of the response. A string or
        bytes, or tuple or list of strings or bytes, for a fixed-length
        response, or any other iterable of strings or bytes for a
        streaming response. Defaults to an empty body.
    :param status: The status code for the response. Either an int, in
        which case the default status message is added, or a string in
        the form ``{code} {message}``, like ``404 Not Found``. Defaults
        to 200.
    :param headers: A :class:`~werkzeug.datastructures.Headers` object,
        or a list of ``(key, value)`` tuples that will be converted to a
        ``Headers`` object.
    :param mimetype: The mime type (content type without charset or
        other parameters) of the response. If the value starts with
        ``text/`` (or matches some other special cases), the charset
        will be added to create the ``content_type``.
    :param content_type: The full content type of the response.
        Overrides building the value from ``mimetype``.
    :param direct_passthrough: Pass the response body directly through
        as the WSGI iterable. This can be used when the body is a binary
        file or other iterator of bytes, to skip some unnecessary
        checks. Use :func:`~werkzeug.utils.send_file` instead of setting
        this manually.
 
    .. versionchanged:: 2.1
        Old ``BaseResponse`` and mixin classes were removed.
 
    .. versionchanged:: 2.0
        Combine ``BaseResponse`` and mixins into a single ``Response``
        class.
 
    .. versionchanged:: 0.5
        The ``direct_passthrough`` parameter was added.
    TFz#t.Iterable[str] | t.Iterable[bytes]ÚresponseNz8t.Iterable[bytes] | bytes | t.Iterable[str] | str | Nonezint | str | HTTPStatus | NonezJt.Mapping[str, str | t.Iterable[str]] | t.Iterable[tuple[str, str]] | Nonez
str | NoneÚboolÚNone)r&ÚstatusÚheadersÚmimetypeÚ content_typeÚdirect_passthroughrcsVtƒj||||d||_g|_|dkr0g|_n"t|tttfƒrL|     |¡n||_dS)N)r)r*r+r,)
ÚsuperÚ__init__r-Ú    _on_closer&r rÚbytesÚ    bytearrayÚset_data)Úselfr&r)r*r+r,r-©Ú    __class__r#r$r/s ü  zResponse.__init__zt.Callable[[], t.Any])ÚfuncrcCs|j |¡|S)aAdds a function to the internal list of functions that should
        be called as part of closing down the response.  Since 0.7 this
        function also returns the function that was passed so that this
        can be used as a decorator.
 
        .. versionadded:: 0.6
        )r0Úappend©r4r7r#r#r$Ú call_on_close³s zResponse.call_on_closer©rcCsN|jr ttt| ¡ƒƒ›d}n|jr*dnd}dt|ƒj›d|›d|j›dS)Nz bytesZstreamedzlikely-streamedú<ú z [z]>)    Ú is_sequenceÚsumÚmapÚlenÚ iter_encodedÚ is_streamedÚtypeÚ__name__r))r4Z    body_infor#r#r$Ú__repr__¾szResponse.__repr__zWSGIEnvironment | None)r&ÚenvironrcCs>t|tƒs4|dkrtdƒ‚ddlm}t|||ƒŽ}||_|S)aÌEnforce that the WSGI response is a response object of the current
        type.  Werkzeug will use the :class:`Response` internally in many
        situations like the exceptions.  If you call :meth:`get_response` on an
        exception you will get back a regular :class:`Response` object, even
        if you are using a custom subclass.
 
        This method can enforce a given response type, and it will also
        convert arbitrary WSGI callables into response objects if an environ
        is provided::
 
            # convert a Werkzeug response object into an instance of the
            # MyResponseClass subclass.
            response = MyResponseClass.force_type(response)
 
            # convert any WSGI application into a response object
            response = MyResponseClass.force_type(response, environ)
 
        This is especially useful if you want to post-process responses in
        the main dispatcher and use functionality provided by your subclass.
 
        Keep in mind that this will modify response objects in place if
        possible!
 
        :param response: a response object or wsgi application.
        :param environ: a WSGI environment object.
        :return: a response object.
        NzHcannot convert WSGI application into response objects without an environr©Ú run_wsgi_app)r rÚ    TypeErrorÚtestrIr6)Úclsr&rGrIr#r#r$Ú
force_typeÅs
ÿ zResponse.force_typerr)ÚapprGÚbufferedrcCsddlm}|||||ƒŽS)a—Create a new response object from an application output.  This
        works best if you pass it an application that returns a generator all
        the time.  Sometimes applications may use the `write()` callable
        returned by the `start_response` function.  This tries to resolve such
        edge cases automatically.  But if you don't get the expected output
        you should set `buffered` to `True` which enforces buffering.
 
        :param app: the WSGI application to execute.
        :param environ: the WSGI environment to execute against.
        :param buffered: set to `True` to enforce buffering.
        :return: a response object.
        rrH)rKrI)rLrNrGrOrIr#r#r$Úfrom_appòs zResponse.from_appzt.Literal[False]r1)Úas_textrcCsdSrr#©r4rQr#r#r$Úget_dataszResponse.get_datazt.Literal[True]cCsdSrr#rRr#r#r$rS
sz bytes | strcCs*| ¡d | ¡¡}|r&| |j¡S|S)a¹The string representation of the response body.  Whenever you call
        this property the response iterable is encoded and flattened.  This
        can lead to unwanted behavior if you stream big data.
 
        This behavior can be disabled by setting
        :attr:`implicit_sequence_conversion` to `False`.
 
        If `as_text` is set to `True` the return value will be a decoded
        string.
 
        .. versionadded:: 0.9
        ó)Ú_ensure_sequenceÚjoinrBÚdecodeÚ_charset)r4rQÚrvr#r#r$rSs
 ©ÚvaluercCs:t|tƒr| |j¡}|g|_|jr6tt|ƒƒ|jd<dS)zÏSets a new string as response.  The value must be a string or
        bytes. If a string is set it's encoded to the charset of the
        response (utf-8 by default).
 
        .. versionadded:: 0.9
        úContent-LengthN)r rr!rXr&Ú automatically_set_content_lengthrAr*©r4r[r#r#r$r3#s
 
 zResponse.set_dataz>A descriptor that calls :meth:`get_data` and :meth:`set_data`.)Údocz
int | NonecCs:z | ¡Wntk
r"YdSXtdd„| ¡DƒƒS)z<Returns the content length if available or `None` otherwise.Ncss|]}t|ƒVqdSr©rA©Ú.0Úxr#r#r$Ú    <genexpr><sz4Response.calculate_content_length.<locals>.<genexpr>)rUÚ RuntimeErrorr?rB©r4r#r#r$Úcalculate_content_length6s
 z!Response.calculate_content_length)ÚmutablercCsN|jr&|r"t|jtƒs"t|jƒ|_dS|jr4tdƒ‚|jsBtdƒ‚| ¡dS)zÓThis method can be called by methods that need a sequence.  If
        `mutable` is true, it will also ensure that the response sequence
        is a standard Python list.
 
        .. versionadded:: 0.6
        Nz]Attempted implicit sequence conversion but the response object is in direct passthrough mode.z„The response object required the iterable to be a sequence, but the implicit conversion was disabled. Call make_sequence() yourself.)r>r r&Úlistr-reÚimplicit_sequence_conversionÚ make_sequence)r4rhr#r#r$rU>s ÿÿzResponse._ensure_sequencecCs8|js4t|jddƒ}t| ¡ƒ|_|dk    r4| |¡dS)aCConverts the response iterator in a list.  By default this happens
        automatically if required.  If `implicit_sequence_conversion` is
        disabled, this method is not automatically called and some properties
        might raise exceptions.  This also encodes all the items.
 
        .. versionadded:: 0.6
        ÚcloseN)r>Úgetattrr&rirBr:)r4rlr#r#r$rkWs
zResponse.make_sequencercCst|j|jƒS)aIter the response encoded with the encoding of the response.
        If the response object is invoked as WSGI application the return
        value of this method is used as application iterator unless
        :attr:`direct_passthrough` was activated.
        )r%r&rXrfr#r#r$rBhs    zResponse.iter_encodedc    Cs.zt|jƒWnttfk
r(YdSXdS)a¿If the response is streamed (the response is not an iterable with
        a length information) this property is `True`.  In this case streamed
        means that there is no information about the number of iterations.
        This is usually `True` if a generator is passed to the response object.
 
        This is useful for checking before applying some sort of post
        filtering that should not take place for streamed responses.
        TF)rAr&rJÚAttributeErrorrfr#r#r$rCss
 
zResponse.is_streamedcCst|jttfƒS)zÜIf the iterator is buffered, this property will be `True`.  A
        response object will consider an iterator to be buffered if the
        response attribute is a list or tuple.
 
        .. versionadded:: 0.6
        )r r&Útuplerirfr#r#r$r>ƒszResponse.is_sequencecCs,t|jdƒr|j ¡|jD]
}|ƒqdS)zÛClose the wrapped response if possible.  You can also use the object
        in a with statement which will automatically close it.
 
        .. versionadded:: 0.9
           Can now be used in a with statement.
        rlN)Úhasattrr&rlr0r9r#r#r$rls 
 
zResponse.closecCs|Srr#rfr#r#r$Ú    __enter__™szResponse.__enter__cCs | ¡dSr)rl)r4Úexc_typeÚ    exc_valueÚtbr#r#r$Ú__exit__œszResponse.__exit__cCs4t| ¡ƒ|_tttt|jƒƒƒ|jd<| ¡dS)aMMake the response object ready to be pickled. Does the
        following:
 
        *   Buffer the response into a list, ignoring
            :attr:`implicity_sequence_conversion` and
            :attr:`direct_passthrough`.
        *   Set the ``Content-Length`` header.
        *   Generate an ``ETag`` header if one is not already set.
 
        .. versionchanged:: 2.1
            Removed the ``no_etag`` parameter.
 
        .. versionchanged:: 2.0
            An ``ETag`` header is always added.
 
        .. versionchanged:: 0.6
            The ``Content-Length`` header is set.
        r\N)    rirBr&rr?r@rAr*Úadd_etagrfr#r#r$ÚfreezeŸszResponse.freezer)rGrc CsHt|jƒ}d}d}d}|j}|D]8\}}| ¡}    |    dkr>|}q |    dkrL|}q |    dkr |}q |dk    r–t|ƒ}|jrŽt|dd}
t|
ƒ}
t|
|ƒ}||d<|dk    rªt|ƒ|d<d    |kr¾d
ksÈn|d krÔ|     d ¡n|d krät
|ƒ|j rD|j rD|dkrD|dkrDd    |kr d
ksDnt dd„| ¡Dƒƒ}t|ƒ|d <|S)akThis is automatically called right before the response is started
        and returns headers modified for the given environment.  It returns a
        copy of the headers from the response with some modifications applied
        if necessary.
 
        For example the location header (if present) is joined with the root
        URL of the environment.  Also the content length is automatically set
        to zero here for certain status codes.
 
        .. versionchanged:: 0.6
           Previously that function was called `fix_headers` and modified
           the response object in place.  Also since 0.6, IRIs in location
           and content-location headers are handled properly.
 
           Also starting with 0.6, Werkzeug will attempt to set the content
           length if it is able to figure it out on its own.  This is the
           case if all the strings in the response iterable are already
           encoded and the iterable is buffered.
 
        :param environ: the WSGI environment of the request.
        :return: returns a new :class:`~werkzeug.datastructures.Headers`
                 object.
        NÚlocationzcontent-locationúcontent-lengthT)Zstrip_querystringZLocationzContent-LocationédéÈéÌr\é0©r|r}css|]}t|ƒVqdSrr`rar#r#r$rdsz,Response.get_wsgi_headers.<locals>.<genexpr>)rr*Ú status_codeÚlowerr    Úautocorrect_location_headerr r
rÚremoverr]r>r?rBr) r4rGr*rxÚcontent_locationÚcontent_lengthr)Úkeyr[ÚikeyZ current_urlr#r#r$Úget_wsgi_headers¸sT
 
  ÿþýüû
û
 zResponse.get_wsgi_headersút.Iterable[bytes]cCsV|j}|ddks0d|kr&dks0n|dkr6d}n|jrB|jS| ¡}t||jƒS)aReturns the application iterator for the given environ.  Depending
        on the request method and the current status code the return value
        might be an empty response rather than the one from the response.
 
        If the request method is `HEAD` or the status code is in a range
        where the HTTP specification requires an empty response, an empty
        iterable is returned.
 
        .. versionadded:: 0.6
 
        :param environ: the WSGI environment of the request.
        :return: a response iterable.
        ÚREQUEST_METHODÚHEADrzr{r~r#)rr-r&rBr rl)r4rGr)rr#r#r$Ú get_app_iter
s
ÿþþýzResponse.get_app_iterz4tuple[t.Iterable[bytes], str, list[tuple[str, str]]]cCs$| |¡}| |¡}||j| ¡fS)aFReturns the final WSGI response as tuple.  The first item in
        the tuple is the application iterator, the second the status and
        the third the list of headers.  The response returned is created
        specially for the given environment.  For example if the request
        method in the WSGI environment is ``'HEAD'`` the response will
        be empty and only the headers and status code will be present.
 
        .. versionadded:: 0.6
 
        :param environ: the WSGI environment of the request.
        :return: an ``(app_iter, status, headers)`` tuple.
        )r‡r‹r)Z to_wsgi_list)r4rGr*Úapp_iterr#r#r$Úget_wsgi_response%s
 
zResponse.get_wsgi_responser)rGÚstart_responsercCs| |¡\}}}|||ƒ|S)züProcess this response as WSGI application.
 
        :param environ: the WSGI environment.
        :param start_response: the response callable provided by the WSGI
                               server.
        :return: an application iterator
        )r)r4rGrŽrŒr)r*r#r#r$Ú__call__8s
 
zResponse.__call__z t.Any | NonecCs| ¡S)zµThe parsed JSON data if :attr:`mimetype` indicates JSON
        (:mimetype:`application/json`, see :attr:`is_json`).
 
        Calls :meth:`get_json` with default arguments.
        )Úget_jsonrfr#r#r$ÚjsonLsz Response.json.zt.Any)ÚforceÚsilentrcCsdSrr#©r4r’r“r#r#r$rUszResponse.get_jsoncCsdSrr#r”r#r#r$rYscCsF|s|jsdS| ¡}z|j |¡WStk
r@|s:‚YdSXdS)a«Parse :attr:`data` as JSON. Useful during testing.
 
        If the mimetype does not indicate JSON
        (:mimetype:`application/json`, see :attr:`is_json`), this
        returns ``None``.
 
        Unlike :meth:`Request.get_json`, the result is not cached.
 
        :param force: Ignore the mimetype and always try to parse JSON.
        :param silent: Silence parsing errors and return ``None``
            instead.
        N)Zis_jsonrSÚ json_moduleÚloadsÚ
ValueError)r4r’r“Údatar#r#r$r]s
ÚResponseStreamcCst|ƒS)z+The response iterable as write-only stream.)r™rfr#r#r$ÚstreamyszResponse.streamÚint)ÚstartÚlengthrcCs|jdkrt|j||ƒ|_dS)z8Wrap existing Response in case of Range Request context.éÎN)rrr&)r4rœrr#r#r$Ú_wrap_range_response~s
zResponse._wrap_range_responsecCs4d|ks,t||j d¡d|j d¡dd o2d|kS)z–Return ``True`` if `Range` header is present and if underlying
        resource is considered unchanged when compared with `If-Range` header.
        Z HTTP_IF_RANGEÚetagNú last-modifiedF)Zignore_if_rangeÚ
HTTP_RANGE)rr*Úget)r4rGr#r#r$Ú_is_range_request_processableƒs
 
ûþ    ÷z&Response._is_range_request_processablez
bool | str)rGÚcomplete_lengthÚ accept_rangesrc    CsÌddlm}|r*|dks*|dks*| |¡s.dS|dkr:d}t| d¡ƒ}|dkrX||ƒ‚| |¡}| |¡}|dks||dkr„||ƒ‚|d    |d}t|ƒ|jd
<||jd <||_    d |_
|  |d|¡dS) a.Handle Range Request related headers (RFC7233).  If `Accept-Ranges`
        header is valid, and Range Request is processable, we set the headers
        as described by the RFC, and wrap the underlying response in a
        RangeWrapper.
 
        Returns ``True`` if Range Request can be fulfilled, ``False`` otherwise.
 
        :raises: :class:`~werkzeug.exceptions.RequestedRangeNotSatisfiable`
                 if `Range` header could not be parsed or satisfied.
 
        .. versionchanged:: 2.0
            Returns ``False`` if the length is 0.
        r)ÚRequestedRangeNotSatisfiableNrFTr1r¢rr\z Accept-Rangesrž) Ú
exceptionsr§r¤rr£Zrange_for_lengthZto_content_range_headerrr*Z content_rangerrŸ)    r4rGr¥r¦r§Z parsed_rangeZ range_tupleZcontent_range_headerr„r#r#r$Ú_process_range_request’s4 ÿþýü
 
 
zResponse._process_range_requestzWSGIEnvironment | Request)Úrequest_or_environr¦r¥rcCs¨t|ƒ}|ddkr¤d|jkr*tƒ|jd<| |||¡}|svt||j d¡d|j d¡ƒsvt| d¡ƒrpd    |_nd
|_|jr¤d |jkr¤|     ¡}|dk    r¤t
|ƒ|jd <|S) abMake the response conditional to the request.  This method works
        best if an etag was defined for the response already.  The `add_etag`
        method can be used to do that.  If called without etag just the date
        header is set.
 
        This does nothing if the request method in the request or environ is
        anything but GET or HEAD.
 
        For optimal performance when handling range requests, it's recommended
        that your response data object implements `seekable`, `seek` and `tell`
        methods as described by :py:class:`io.IOBase`.  Objects returned by
        :meth:`~werkzeug.wsgi.wrap_file` automatically implement those methods.
 
        It does not remove the body of the response because that's something
        the :meth:`__call__` function does for us automatically.
 
        Returns self so that you can do ``return resp.make_conditional(req)``
        but modifies the object in-place.
 
        :param request_or_environ: a request object or WSGI environment to be
                                   used to make the response conditional
                                   against.
        :param accept_ranges: This parameter dictates the value of
                              `Accept-Ranges` header. If ``False`` (default),
                              the header is not set. If ``True``, it will be set
                              to ``"bytes"``. If it's a string, it will use this
                              value.
        :param complete_length: Will be used only in valid Range Requests.
                                It will set `Content-Range` complete length
                                value and compute `Content-Length` real value.
                                This parameter is mandatory for successful
                                Range Requests completion.
        :raises: :class:`~werkzeug.exceptions.RequestedRangeNotSatisfiable`
                 if `Range` header could not be parsed or satisfied.
 
        .. versionchanged:: 2.0
            Range processing is skipped if length is 0 instead of
            raising a 416 Range Not Satisfiable error.
        r‰)ÚGETrŠÚdateÚDater Nr¡Z HTTP_IF_MATCHiœr}ryr\) rr*rr©rr£rrr]rgr)r4rªr¦r¥rGZis206rr#r#r$Úmake_conditionalÅs,- 
 
 
üÿþzResponse.make_conditional)Ú    overwriteÚweakrcCs&|sd|jkr"| t| ¡ƒ|¡dS)zÐAdd an etag for the current response if there is none yet.
 
        .. versionchanged:: 2.0
            SHA-1 is used to generate the value. MD5 may not be
            available in some environments.
        r N)r*Zset_etagrrS)r4r¯r°r#r#r$rvszResponse.add_etag)NNNNNF)N)F)F)F)F)..)..)FF)FN)FF)-rEÚ
__module__Ú __qualname__Ú__doc__rjrr]Ú__annotations__r/r:rFÚ classmethodrMrPÚtÚoverloadrSr3Úpropertyr˜rgrUrkrBrCr>rlrqrurwr‡r‹rrr‘r•rr ršrŸr¤r©r®rvÚ __classcell__r#r#r5r$r's€
M
    ÷ # ÿ,ÿ ý      R6üIrc@sŒeZdZdZdZddœdd„Zddd    œd
d „Zd d dœdd„Zd dœdd„Zd dœdd„Z    ddœdd„Z
ddœdd„Z e ddœdd„ƒZ dS)r™zµA file descriptor like object used by :meth:`Response.stream` to
    represent the body of the stream. It directly pushes into the
    response iterable of the response object.
    zwb+r)r&cCs||_d|_dS)NF)r&Úclosed)r4r&r#r#r$r/!szResponseStream.__init__r1r›rZcCsB|jrtdƒ‚|jjdd|jj |¡|jj dd¡t|ƒS)NúI/O operation on closed fileT)rhr\)rºr—r&rUr8r*ÚpoprAr^r#r#r$Úwrite%s zResponseStream.writerˆr()ÚseqrcCs|D]}| |¡qdSr)r½)r4r¾r"r#r#r$Ú
writelines-szResponseStream.writelinesr;cCs
d|_dS)NT)rºrfr#r#r$rl1szResponseStream.closecCs|jrtdƒ‚dS)Nr»©rºr—rfr#r#r$Úflush4szResponseStream.flushr'cCs|jrtdƒ‚dS)Nr»FrÀrfr#r#r$Úisatty8szResponseStream.isattycCs|j ¡ttt|jjƒƒSr)r&rUr?r@rArfr#r#r$Útell=s
zResponseStream.tellrcCs|jjSr)r&rXrfr#r#r$ÚencodingAszResponseStream.encodingN)rEr±r²r³Úmoder/r½r¿rlrÁrÂrÃr¸rÄr#r#r#r$r™sr™)*Ú
__future__rr‘Útypingr¶ÚhttprÚ urllib.parserZdatastructuresrrZsansio.responserZ_SansIOResponseÚurlsr    r
Úutilsr Zwsgir r Zwerkzeug._internalrZ werkzeug.httprrrrrZ werkzeug.wsgirÚ TYPE_CHECKINGZ_typeshed.wsgirrrÚrequestrr%r™r#r#r#r$Ú<module>s@                      w