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
U
Þ=®dÎeã@s0UdZddlmZddlZddlmZddlmZddlmZddl    m
Z
ej r˜dd    l m Z dd
l mZdd lmZdd lmZdd lmZdd lmZGdd„deƒZGdd„deƒZGdd„deeƒZGdd„deƒZGdd„deƒZGdd„deƒZGdd„deƒZ Gdd„deƒZ!Gdd„deƒZ"Gd d!„d!eƒZ#Gd"d#„d#eƒZ$Gd$d%„d%eƒZ%Gd&d'„d'eƒZ&Gd(d)„d)eƒZ'Gd*d+„d+eƒZ(Gd,d-„d-eƒZ)Gd.d/„d/eƒZ*Gd0d1„d1eƒZ+Gd2d3„d3eƒZ,Gd4d5„d5eƒZ-Gd6d7„d7eƒZ.Gd8d9„d9eƒZ/Gd:d;„d;eƒZ0Gd<d=„d=eƒZ1Gd>d?„d?eƒZ2Gd@dA„dAeƒZ3GdBdC„dCeƒZ4GdDdE„dEe4ƒZ5GdFdG„dGeƒZ6GdHdI„dIeƒZ7GdJdK„dKeƒZ8GdLdM„dMeƒZ9GdNdO„dOeƒZ:GdPdQ„dQe4ƒZ;GdRdS„dSeƒZ<GdTdU„dUeƒZ=iZ>dVe?dW<dXdYœdZd[„Z@e@ƒ[@Gd\d]„d]ƒZAd^d_d_d`daœdbdc„ZBeAƒZCd]e?dd<dS)eaùImplements a number of Python exceptions which can be raised from within
a view to trigger a standard HTTP non-200 response.
 
Usage Example
-------------
 
.. code-block:: python
 
    from werkzeug.wrappers.request import Request
    from werkzeug.exceptions import HTTPException, NotFound
 
    def view(request):
        raise NotFound()
 
    @Request.application
    def application(request):
        try:
            return view(request)
        except HTTPException as e:
            return e
 
As you can see from this example those exceptions are callable WSGI
applications. However, they are not Werkzeug response objects. You
can get a response object by calling ``get_response()`` on a HTTP
exception.
 
Keep in mind that you may have to pass an environ (WSGI) or scope
(ASGI) to ``get_response()`` because some errors fetch additional
information relating to the request.
 
If you want to hook in a different exception page to say, a 404 status
code, you can add a second except for a specific subclass of an error:
 
.. code-block:: python
 
    @Request.application
    def application(request):
        try:
            return view(request)
        except NotFound as e:
            return not_found(request)
        except HTTPException as e:
            return e
 
é)Ú annotationsN)Údatetime)Úescape)ÚMarkupé)Ú _get_environ)Ú StartResponse)ÚWSGIEnvironment©ÚWWWAuthenticate©ÚResponse)ÚRequestcsÖeZdZUdZdZded<dZded<d(dddd    œ‡fd
d „ Zed d œdd„ƒZ    d)ddd dœdd„Z
d*ddd dœdd„Z d+ddddœdd„Z d,ddddœdd„Z ddd d!œd"d#„Zd d œd$d%„Zd d œd&d'„Z‡ZS)-Ú HTTPExceptiona#The base class for all HTTP exceptions. This exception can be called as a WSGI
    application to render a default error page or you can catch the subclasses
    of it independently and render nicer error messages.
 
    .. versionchanged:: 2.1
        Removed the ``wrap`` class method.
    Nú
int | NoneÚcodeú
str | NoneÚ descriptionúResponse | NoneÚNone)rÚresponseÚreturncs"tƒ ¡|dk    r||_||_dS©N)ÚsuperÚ__init__rr)Úselfrr©Ú    __class__©úJd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\werkzeug/exceptions.pyrMs
zHTTPException.__init__Ústr©rcCsddlm}| |jd¡S)zThe status name.r)ÚHTTP_STATUS_CODESz Unknown Error)Úhttpr"Úgetr)rr"rrrÚnameWs zHTTPException.nameúWSGIEnvironment | Noneú dict | None©ÚenvironÚscopercCs6|jdkrd}n|j}t|ƒ dtdƒ¡}d|›dS)zGet the description.NÚÚ
z<br>z<p>z</p>)rrÚreplacer)rr)r*rrrrÚget_description^s
 
zHTTPException.get_descriptionc
Cs2d|j›dt|jƒ›dt|jƒ›d| |¡›d    S)zGet the HTML body.z&<!doctype html>
<html lang=en>
<title>ú z </title>
<h1>z</h1>
r,)rrr%r.©rr)r*rrrÚget_bodyls0ÿzHTTPException.get_bodyúlist[tuple[str, str]]cCsdgS)zGet a list of headers.)z Content-Typeztext/html; charset=utf-8rr0rrrÚ get_headerszszHTTPException.get_headersz$WSGIEnvironment | WSGIRequest | Noner cCsNddlm}|jdk    r|jS|dk    r,t|ƒ}| ||¡}|| ||¡|j|ƒS)ahGet a response object.  If one was passed to the exception
        it's returned directly.
 
        :param environ: the optional environ for the request.  This
                        can be used to modify the response depending
                        on how the request looked like.
        :return: a :class:`Response` object or a subclass thereof.
        rr N)Úwrappers.responser rrr3r1r)rr)r*Ú WSGIResponseÚheadersrrrÚ get_response‚s 
 zHTTPException.get_responser    rzt.Iterable[bytes])r)Ústart_responsercCst d| |¡¡}|||ƒS)zÐCall the exception as WSGI application.
 
        :param environ: the WSGI environment.
        :param start_response: the response callable provided by the WSGI
                               server.
        r5)ÚtÚcastr7)rr)r8rrrrÚ__call__˜s    zHTTPException.__call__cCs,|jdk    r|jnd}|›d|j›d|j›S)Nú???r/ú: )rr%r©rrrrrÚ__str__¤szHTTPException.__str__cCs4|jdk    r|jnd}dt|ƒj›d|›d|j›dS)Nr<ú<z 'r=z'>)rÚtypeÚ__name__r%r>rrrÚ__repr__¨szHTTPException.__repr__)NN)NN)NN)NN)NN)rBÚ
__module__Ú __qualname__Ú__doc__rÚ__annotations__rrÚpropertyr%r.r1r3r7r;r?rCÚ __classcell__rrrrrAs.
  ý
ýýý
ý rc@seZdZdZdZdZdS)Ú
BadRequestz‚*400* `Bad Request`
 
    Raise if the browser sends something to the application the application
    or server cannot handle.
    izLThe browser (or proxy) sent a request that this server could not understand.N©rBrDrErFrrrrrrrJ­sÿrJcs^eZdZdZejZdZdddddœ‡fdd„ Ze    d    d
œd d „ƒZej
d    d dœdd „ƒZ‡Z S)ÚBadRequestKeyErrorz€An exception that is used to signal both a :exc:`KeyError` and a
    :exc:`BadRequest`. Used by many of the datastructures.
    FNrút.Any)ÚargÚargsÚkwargscs2tƒj||Ž|dkr"t |¡n t ||¡dSr)rrÚKeyError)rrNrOrPrrrrÆs zBadRequestKeyError.__init__r r!cCs*|jr$|j›dtj›dt |¡›S|jS)Nr,r=)Úshow_exceptionÚ _descriptionrQrBr?)rrrrrÎsÿzBadRequestKeyError.descriptionr)ÚvaluercCs
||_dSr)rS)rrTrrrrØs)N) rBrDrErFrJrrSrRrrHÚsetterrIrrrrrL»s    rLc@seZdZdZdS)ÚClientDisconnecteda)Internal exception that is raised if Werkzeug detects a disconnected
    client.  Since the client is already gone at that point attempting to
    send the error message to the client might not work and might ultimately
    result in another exception in the server.  Mainly this is here so that
    it is silenced by default as far as Werkzeug is concerned.
 
    Since disconnections cannot be reliably detected and are unspecified
    by WSGI to a large extent this might or might not be raised if a client
    is gone.
 
    .. versionadded:: 0.8
    N©rBrDrErFrrrrrVÝsrVc@seZdZdZdS)Ú SecurityErrorz‡Raised if something triggers a security error.  This is otherwise
    exactly like a bad request error.
 
    .. versionadded:: 0.9
    NrWrrrrrXìsrXc@seZdZdZdS)ÚBadHostzSRaised if the submitted host is badly formatted.
 
    .. versionadded:: 0.11.2
    NrWrrrrrYôsrYcsNeZdZdZdZdZdddddd    œ‡fd
d „ Zdd d ddœ‡fdd„ Z‡ZS)Ú Unauthorizedaz*401* ``Unauthorized``
 
    Raise if the user is not authorized to access a resource.
 
    The ``www_authenticate`` argument should be used to set the
    ``WWW-Authenticate`` header. This is used for HTTP basic auth and
    other schemes. Use :class:`~werkzeug.datastructures.WWWAuthenticate`
    to create correctly formatted values. Strictly speaking a 401
    response is invalid if it doesn't provide at least one value for
    this header, although real clients typically don't care.
 
    :param description: Override the default message used for the body
        of the response.
    :param www-authenticate: A single value, or list of values, for the
        WWW-Authenticate header(s).
 
    .. versionchanged:: 2.0
        Serialize multiple ``www_authenticate`` items into multiple
        ``WWW-Authenticate`` headers, rather than joining them
        into a single value, for better interoperability.
 
    .. versionchanged:: 0.15.3
        If the ``www_authenticate`` argument is not set, the
        ``WWW-Authenticate`` header is not set.
 
    .. versionchanged:: 0.15.3
        The ``response`` argument was restored.
 
    .. versionchanged:: 0.15.1
        ``description`` was moved back as the first argument, restoring
         its previous position.
 
    .. versionchanged:: 0.15.0
        ``www_authenticate`` was added as the first argument, ahead of
        ``description``.
    i‘zÜThe server could not verify that you are authorized to access the URL requested. You either supplied the wrong credentials (e.g. a bad password), or your browser doesn't understand how to supply the credentials required.Nrrz6None | (WWWAuthenticate | t.Iterable[WWWAuthenticate])r)rrÚwww_authenticatercs4tƒ ||¡ddlm}t||ƒr*|f}||_dS)Nrr
)rrÚdatastructuresr Ú
isinstancer[)rrrr[r rrrr)s
 
zUnauthorized.__init__r&r'r2r(cs.tƒ ||¡}|jr*| dd„|jDƒ¡|S)Ncss|]}dt|ƒfVqdS)zWWW-AuthenticateN)r )Ú.0ÚxrrrÚ    <genexpr>?sz+Unauthorized.get_headers.<locals>.<genexpr>)rr3r[Úextend©rr)r*r6rrrr38szUnauthorized.get_headers)NNN)NN©    rBrDrErFrrrr3rIrrrrrZûs%ÿ    üýrZc@seZdZdZdZdZdS)Ú    Forbiddenz*403* `Forbidden`
 
    Raise if the user doesn't have the permission for the requested resource
    but was authenticated.
    i“zzYou don't have the permission to access the requested resource. It is either read-protected or not readable by the server.NrKrrrrrdCsÿrdc@seZdZdZdZdZdS)ÚNotFoundzQ*404* `Not Found`
 
    Raise if a resource does not exist and never existed.
    i”zxThe requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.NrKrrrrreRsÿrecsNeZdZdZdZdZdddddd    œ‡fd
d „ Zdd d ddœ‡fdd„ Z‡ZS)ÚMethodNotAlloweda‘*405* `Method Not Allowed`
 
    Raise if the server used a method the resource does not handle.  For
    example `POST` if the resource is view only.  Especially useful for REST.
 
    The first argument for this exception should be a list of allowed methods.
    Strictly speaking the response would be invalid if you don't provide valid
    methods in the header which you can do with that list.
    i•z0The method is not allowed for the requested URL.Nzt.Iterable[str] | Nonerrr)Ú valid_methodsrrrcstƒj||d||_dS)zkTakes an optional list of valid http methods
        starting with werkzeug 0.3 the list will be mandatory.©rrN)rrrg)rrgrrrrrrmszMethodNotAllowed.__init__r&r'r2r(cs.tƒ ||¡}|jr*| dd |j¡f¡|S)NZAllowz, )rr3rgÚappendÚjoinrbrrrr3xszMethodNotAllowed.get_headers)NNN)NNrcrrrrrf_s
ü ýrfc@seZdZdZdZdZdS)Ú NotAcceptablezƒ*406* `Not Acceptable`
 
    Raise if the server can't return any content conforming to the
    `Accept` headers of the client.
    i–z½The resource identified by the request is only capable of generating response entities which have content characteristics not acceptable according to the accept headers sent in the request.NrKrrrrrkƒsÿrkc@seZdZdZdZdZdS)ÚRequestTimeoutz?*408* `Request Timeout`
 
    Raise to signalize a timeout.
    i˜zqThe server closed the network connection because the browser didn't finish the request within the specified time.NrKrrrrrl“sÿrlc@seZdZdZdZdZdS)ÚConflictz§*409* `Conflict`
 
    Raise to signal that a request cannot be completed because it conflicts
    with the current state on the server.
 
    .. versionadded:: 0.7
    i™z~A conflict happened while processing the request. The resource might have been modified while the request was being processed.NrKrrrrrm sÿrmc@seZdZdZdZdZdS)ÚGoneza*410* `Gone`
 
    Raise if a resource existed previously and went away without new location.
    išz¯The requested URL is no longer available on this server and there is no forwarding address. If you followed a link from a foreign page, please contact the author of this page.NrKrrrrrn±sÿrnc@seZdZdZdZdZdS)ÚLengthRequiredz¨*411* `Length Required`
 
    Raise if the browser submitted data but no ``Content-Length`` header which
    is required for the kind of processing the server does.
    i›zOA request with this method requires a valid <code>Content-Length</code> header.NrKrrrrro¿sÿroc@seZdZdZdZdZdS)ÚPreconditionFailedz‹*412* `Precondition Failed`
 
    Status code used in combination with ``If-Match``, ``If-None-Match``, or
    ``If-Unmodified-Since``.
    iœzGThe precondition on the request for the URL failed positive evaluation.NrKrrrrrpÍsÿrpc@seZdZdZdZdZdS)ÚRequestEntityTooLargez~*413* `Request Entity Too Large`
 
    The status code one should return if the data submitted exceeded a given
    limit.
    iz6The data value transmitted exceeds the capacity limit.NrKrrrrrqÚsrqc@seZdZdZdZdZdS)ÚRequestURITooLargezI*414* `Request URI Too Large`
 
    Like *413* but for too long URLs.
    ižzlThe length of the requested URL exceeds the capacity limit for this server. The request cannot be processed.NrKrrrrrråsÿrrc@seZdZdZdZdZdS)ÚUnsupportedMediaTypezŽ*415* `Unsupported Media Type`
 
    The status code returned if the server is unable to handle the media type
    the client transmitted.
    iŸzFThe server does not support the media type transmitted in the request.NrKrrrrrsòsÿrscsPeZdZdZdZdZddddd    d
d œ‡fd d „ Zdddddœ‡fdd„ Z‡ZS)ÚRequestedRangeNotSatisfiablez~*416* `Requested Range Not Satisfiable`
 
    The client asked for an invalid part of the file.
 
    .. versionadded:: 0.7
    i z.The server cannot provide the requested range.NÚbytesrr rrr)ÚlengthÚunitsrrrcs tƒj||d||_||_dS)z^Takes an optional `Content-Range` header value based on ``length``
        parameter.
        rhN)rrrvrw)rrvrwrrrrrr
s
z%RequestedRangeNotSatisfiable.__init__r&r'r2r(cs8tƒ ||¡}|jdk    r4| d|j›d|j›f¡|S)Nz Content-Rangez */)rr3rvrirwrbrrrr3s
z(RequestedRangeNotSatisfiable.get_headers)NruNN)NNrcrrrrrtÿsûýrtc@seZdZdZdZdZdS)ÚExpectationFailedz…*417* `Expectation Failed`
 
    The server cannot meet the requirements of the Expect request-header.
 
    .. versionadded:: 0.7
    i¡z?The server could not meet the requirements of the Expect headerNrKrrrrrx#srxc@seZdZdZdZdZdS)Ú    ImATeapotz›*418* `I'm a teapot`
 
    The server should return this if it is a teapot and someone attempted
    to brew coffee with it.
 
    .. versionadded:: 0.7
    i¢z-This server is a teapot, not a coffee machineNrKrrrrry/sryc@seZdZdZdZdZdS)ÚUnprocessableEntityz|*422* `Unprocessable Entity`
 
    Used if the request is well formed, but the instructions are otherwise
    incorrect.
    i¦zQThe request was well-formed but was unable to be followed due to semantic errors.NrKrrrrrz<sÿrzc@seZdZdZdZdZdS)ÚLockedzO*423* `Locked`
 
    Used if the resource that is being accessed is locked.
    i§z.The resource that is being accessed is locked.NrKrrrrr{Jsr{c@seZdZdZdZdZdS)ÚFailedDependencyz±*424* `Failed Dependency`
 
    Used if the method could not be performed on the resource
    because the requested action depended on another action and that action failed.
    i¨zThe method could not be performed on the resource because the requested action depended on another action and that action failed.NrKrrrrr|Tsÿr|c@seZdZdZdZdZdS)ÚPreconditionRequireda*428* `Precondition Required`
 
    The server requires this request to be conditional, typically to prevent
    the lost update problem, which is a race condition between two or more
    clients attempting to update a resource through PUT or DELETE. By requiring
    each client to include a conditional header ("If-Match" or "If-Unmodified-
    Since") with the proper value retained from a recent GET request, the
    server ensures that each client has at least seen the previous revision of
    the resource.
    i¬zZThis request is required to be conditional; try using "If-Match" or "If-Unmodified-Since".NrKrrrrr}cs ÿr}csFeZdZdZddddddœ‡fdd    „ Zdd
d d d œ‡fdd„ Z‡ZS)Ú _RetryAfterz­Adds an optional ``retry_after`` parameter which will set the
    ``Retry-After`` header. May be an :class:`int` number of seconds or
    a :class:`~datetime.datetime`.
    Nrrzdatetime | int | Noner)rrÚ retry_afterrcstƒ ||¡||_dSr)rrr)rrrrrrrr|sz_RetryAfter.__init__r&r'r2r(csTtƒ ||¡}|jrPt|jtƒr8ddlm}||jƒ}n
t|jƒ}| d|f¡|S)Nr)Ú    http_datez Retry-After)    rr3rr]rr#r€r ri)rr)r*r6r€rTrrrr3…s   
z_RetryAfter.get_headers)NNN)NN)rBrDrErFrr3rIrrrrr~vsü ýr~c@seZdZdZdZdZdS)ÚTooManyRequestsaO*429* `Too Many Requests`
 
    The server is limiting the rate at which this user receives
    responses, and this request exceeds that rate. (The server may use
    any convenient method to identify users and their request rates).
    The server may include a "Retry-After" header to indicate how long
    the user should wait before retrying.
 
    :param retry_after: If given, set the ``Retry-After`` header to this
        value. May be an :class:`int` number of seconds or a
        :class:`~datetime.datetime`.
 
    .. versionchanged:: 1.0
        Added ``retry_after`` parameter.
    i­zBThis user has exceeded an allotted request count. Try again later.NrKrrrrr™src@seZdZdZdZdZdS)ÚRequestHeaderFieldsTooLargezä*431* `Request Header Fields Too Large`
 
    The server refuses to process the request because the header fields are too
    large. One or more individual fields may be too large, or the set of all
    headers is too large.
    i¯z3One or more header fields exceeds the maximum size.NrKrrrrr‚®sr‚c@seZdZdZdZdZdS)ÚUnavailableForLegalReasonsz¤*451* `Unavailable For Legal Reasons`
 
    This status code indicates that the server is denying access to the
    resource as a consequence of a legal demand.
    iÃzUnavailable for legal reasons.NrKrrrrrƒºsrƒcs6eZdZdZdZdZd ddddd    œ‡fd
d „ Z‡ZS) ÚInternalServerErrorz÷*500* `Internal Server Error`
 
    Raise if an internal server error occurred.  This is a good fallback if an
    unknown error occurred in the dispatcher.
 
    .. versionchanged:: 1.0.0
        Added the :attr:`original_exception` attribute.
    iôzšThe server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.NrrzBaseException | Noner)rrÚoriginal_exceptionrcs||_tƒj||ddS)Nrh)r…rr)rrrr…rrrrÖs    zInternalServerError.__init__)NNN)rBrDrErFrrrrIrrrrr„Ås    ÿür„c@seZdZdZdZdZdS)ÚNotImplementedzt*501* `Not Implemented`
 
    Raise if the application does not support the action requested by the
    browser.
    iõz@The server does not support the action requested by the browser.NrKrrrrr†ãsr†c@seZdZdZdZdZdS)Ú
BadGatewayzÞ*502* `Bad Gateway`
 
    If you do proxying in your application you should return this status code
    if you received an invalid response from the upstream server it accessed
    in attempting to fulfill the request.
    iözFThe proxy server received an invalid response from an upstream server.NrKrrrrr‡îsÿr‡c@seZdZdZdZdZdS)ÚServiceUnavailableab*503* `Service Unavailable`
 
    Status code you should return if a service is temporarily
    unavailable.
 
    :param retry_after: If given, set the ``Retry-After`` header to this
        value. May be an :class:`int` number of seconds or a
        :class:`~datetime.datetime`.
 
    .. versionchanged:: 1.0
        Added ``retry_after`` parameter.
    i÷z‚The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.NrKrrrrrˆüs ÿrˆc@seZdZdZdZdZdS)ÚGatewayTimeoutzt*504* `Gateway Timeout`
 
    Status code you should return if a connection to an upstream server
    times out.
    iøz/The connection to an upstream server timed out.NrKrrrrr‰sr‰c@seZdZdZdZdZdS)ÚHTTPVersionNotSupportedzw*505* `HTTP Version Not Supported`
 
    The server does not support the HTTP protocol version used in the request.
    iùzJThe server does not support the HTTP protocol version used in the request.NrKrrrrrŠsÿrŠzdict[int, type[HTTPException]]Údefault_exceptionsrr!c    Csxtƒ ¡D]h}zt|tƒ}Wntk
r4d}YnX|r
|jdkrFq
t |jd¡}|dk    rht||ƒrhq
|t|j<q
dS)NF)ÚglobalsÚvaluesÚ
issubclassrÚ    TypeErrorrr‹r$)ÚobjZis_http_exceptionZold_objrrrÚ_find_exceptions,s
r‘c@s8eZdZdZdddddœdd„Zdd    d    d
d œd d „ZdS)ÚAborteraYWhen passed a dict of code -> exception items it can be used as
    callable that raises exceptions.  If the first argument to the
    callable is an integer it will be looked up in the mapping, if it's
    a WSGI application it will be raised in a proxy exception.
 
    The rest of the arguments are forwarded to the exception constructor.
    Nz%dict[int, type[HTTPException]] | Noner)ÚmappingÚextrarcCs.|dkr t}t|ƒ|_|dk    r*|j |¡dSr)r‹Údictr“Úupdate)rr“r”rrrrGs
 
zAborter.__init__úint | ResponserMú
t.NoReturn)rrOrPrcOsLddlm}t||ƒr t|d‚||jkr8td|›ƒ‚|j|||Ž‚dS)Nrr )rzno exception for )Úsansio.responser r]rr“Ú LookupError)rrrOrPr rrrr;Rs  
 
 
zAborter.__call__)NN)rBrDrErFrr;rrrrr’>s
 
ý r’r—rMr˜)ÚstatusrOrPrcOst|f|ž|ŽdS)atRaises an :py:exc:`HTTPException` for the given status code or WSGI
    application.
 
    If a status code is given, it will be looked up in the list of
    exceptions and will raise that exception.  If passed a WSGI application,
    it will wrap it in a proxy WSGI exception and raise that::
 
       abort(404)  # 404 Not Found
       abort(Response('Hello World'))
 
    N)Ú_aborter)r›rOrPrrrÚabort`s rrœ)DrFÚ
__future__rÚtypingr9rZ
markupsaferrÚ    _internalrÚ TYPE_CHECKINGZ_typeshed.wsgirr    r\r r™r Zwrappers.requestrZ WSGIRequestr4r5Ú    ExceptionrrJrQrLrVrXrYrZrdrerfrkrlrmrnrorprqrrrsrtrxryrzr{r|r}r~rr‚rƒr„r†r‡rˆr‰rŠr‹rGr‘r’rrœrrrrÚ<module>sp-           l"H $     $  
#     "