HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //home/arjun/projects/env/lib/python3.10/site-packages/werkzeug/__pycache__/serving.cpython-310.pyc
o

"we8��@s�dZddlmZddlZddlZddlZddlZddlZddlZddl	Z	ddl
ZddlmZ
ddlmZddlmZddlmZddlmZdd	lmZdd
lmZddlmZdd
lmZddlmZddlmZzddlZWney�Gdd�d�Ze�ZYnwdZ ej!dkr�ze"d�Wney�dZ Ynwe#ed�Z$e$r�ej%Z%nGdd�d�Z%zej&Z'Wne(y�dZ'YnwdZ)ej*ej+dej,e-ej*e-fej.dfZ/ej0r�ddl1m2Z2ddl1m3Z3ddl4m5Z5ddl6m7Z7Gd d!�d!ej8�Z9Gd"d#�d#e�Z:dpd(d)�Z;	dqdrd-d.�Z<	dsdtd2d3�Z=dud4d5�Z>	dsdvd:d;�Z?dqdwd?d@�Z@dxdDdE�ZAdydHdI�ZBdzdJdK�ZCGdLdM�dMe�ZDGdNdO�dOejEeD�ZFGdPdQ�dQe%eD�ZG						d{d|d\d]�ZHd}d^d_�ZI							`						d~ddndo�ZJdS)�a�A WSGI and HTTP server for use **during development only**. This
server is convenient to use, but is not designed to be particularly
stable, secure, or efficient. Use a dedicate WSGI server and HTTP
server when deploying to production.

It provides features like interactive debugging and code reloading. Use
``run_simple`` to start the server. Put this in a ``run.py`` script:

.. code-block:: python

    from myapp import create_app
    from werkzeug import run_simple
�)�annotationsN)�datetime)�	timedelta)�timezone)�BaseHTTPRequestHandler)�
HTTPServer)�unquote)�urlsplit���_log)�_wsgi_encoding_dance)�InternalServerError)�
uri_to_iric@seZdZddd�ZdS)	�	_SslDummy�name�str�return�t.AnycCstd��)NzUSSL is unavailable because this Python runtime was not compiled with SSL/TLS support.)�RuntimeError��selfr�r�I/home/arjun/projects/env/lib/python3.10/site-packages/werkzeug/serving.py�__getattr__*s�z_SslDummy.__getattr__N�rrrr)�__name__�
__module__�__qualname__rrrrrr)srT�nt�coloramaF�forkc@seZdZdS)�ForkingMixInN)rrrrrrrr"@sr"��ssl.SSLContext�adhoc)�WSGIApplication)�WSGIEnvironment)�RSAPrivateKeyWithSerialization)�Certificatec@s8eZdZdZddd�Zdd	d
�Zddd
�Zddd�ZdS)�DechunkedInputz8An input stream that handles Transfer-Encoding 'chunked'�rfile�t.IO[bytes]r�NonecCs||_d|_d|_dS)NFr)�_rfile�_done�_len)rr+rrr�__init__[s
zDechunkedInput.__init__�boolcC�dS)NTr�rrrr�readable`szDechunkedInput.readable�intc
CsZz|j���d�}t|��d�}Wnty"}ztd�|�d}~ww|dkr+td��|S)N�latin1�zInvalid chunk headerrz!Negative chunk length not allowed)r.�readline�decoder6�strip�
ValueError�OSError)r�liner0�errr�read_chunk_lencs
��zDechunkedInput.read_chunk_len�buf�	bytearraycCsd}|js�|t|�kr�|jdkr|��|_|jdkrd|_|jdkrgtt|�|j�}||t|�krP|j�t|�|�||d�<|jt|�|8_t|�}n|j�|�||||�<|j|8_||7}|jdkry|j��}|dvrytd��|js�|t|�ks|S)NrT)�
�
�
z!Missing chunk terminating newline)	r/�lenr0r@�minr.�readr9r=)rrArH�n�
terminatorrrr�readintoms*






�$zDechunkedInput.readintoN)r+r,rr-�rr2�rr6)rArBrr6)rrr�__doc__r1r5r@rKrrrrr*Xs



r*cs�eZdZUdZded<ed7dd��Zd8d	d
�Zd9dd
�Zd9�fdd�Z		d:d;dd�Z
d<�fdd�Zd7dd�Zd=dd�Z
e�d d!�ged"��ed#d$��D��Zd%eed&�<d>d?d+d,�Zd@d/d0�Zd@d1d2�ZdAd5d6�Z�ZS)B�WSGIRequestHandlerz3A request handler that implements WSGI dispatching.�BaseWSGIServer�serverrrcCsddlm}d|��S)Nr
)�__version__z	Werkzeug/)�rR)rrRrrr�server_version�s
z!WSGIRequestHandler.server_versionr'cCsNt|j�}|jjdur
dnd}|jsd|_nt|jt�r"|jdf|_|js2|jr2d|j�|j��}n|j}t	|�}idd�d|�d	|j
�d
tj�d|jj
�d|jj�d
d�d|j�d|j�d|j�dd�dt|��dt|j��dt|j��dt|j��d|���d|���|jjdt|jjd�|jd��}|j��D]1\}}d|vr�q�|���dd�}|�dd�}|dvr�d |��}||vr�||�d!|��}|||<q�|�d"d�����d#kr�d$|d%<t|d	�|d	<|jr�|jr�|j|d&<z|jj d$d'�}|du�rt!�"|�|d(<W|SW|St#�y|j�$d)d*�Y|St%�y&Y|Sw)+N�http�https)�<local>rr�/zwsgi.version)r
rzwsgi.url_schemez
wsgi.inputzwsgi.errorszwsgi.multithreadzwsgi.multiprocessz
wsgi.run_onceFzwerkzeug.socket�SERVER_SOFTWARE�REQUEST_METHOD�SCRIPT_NAMErS�	PATH_INFO�QUERY_STRING�REQUEST_URI�RAW_URI�REMOTE_ADDR�REMOTE_PORTr
)�SERVER_NAME�SERVER_PORT�SERVER_PROTOCOL�_�-z
)�CONTENT_TYPE�CONTENT_LENGTH�HTTP_�,�HTTP_TRANSFER_ENCODING�chunkedTzwsgi.input_terminated�	HTTP_HOST)�binary_form�SSL_CLIENT_CERT�errorz&Cannot fetch SSL peer certificate info)&r	�pathrQ�ssl_context�client_address�
isinstancer�scheme�netlocrr+�sys�stderr�multithread�multiprocess�
connectionrT�commandr
�query�address_string�port_integer�server_address�request_version�headers�items�upper�replace�getr;�lowerr*�getpeercert�ssl�DER_cert_to_PEM_certr<�log�AttributeError)r�request_url�
url_scheme�	path_info�environ�key�value�	peer_certrrr�make_environ�s�
��������	�
���

�
�
���
�



�
���zWSGIRequestHandler.make_environr-csx�j�dd�����dkr�j�d�����_�d�d�d�d�d�d�������fd
d��d����fdd
�	�d������fdd�}z	|�jj	�WdSt
tjfyl}z
��
|��WYd}~dSd}~wty�}zD�jjrx��dur��r�d�_z�dur�d�d�|t��Wn	ty�Ynwddlm}||���}�j�dd|���WYd}~dSd}~ww)N�ExpectrSz100-continuesHTTP/1.1 100 Continue

F�data�bytesrr-cst�dusJd���dusJd���dur�����z
��dd�\}}Wnty0�d}}Ynwt|�}��||�t�}�D]\}}��||�|�|���q@d|vsx�ddksxd|krfdksxn|d	vsx�jd
krxd���dd
���dd���	�t
|t�s�Jd��|r��r��j�
tt|��dd�����j�
d��j�
|��r��j�
d��j��dS)Nzwrite() before start_responser
rSzcontent-lengthrZ�HEAD�d��>�0���HTTP/1.1TzTransfer-Encodingrl�
Connection�closezapplications must write bytes�rD)�splitr<r6�
send_response�set�send_header�addr��protocol_version�end_headersrtr��wfile�write�hexrF�encode�flush)r��code_str�msg�code�header_keysr�r�)�chunk_responser��headers_sent�headers_setr�status_sent�
status_setrrr��sD�

 z*WSGIRequestHandler.run_wsgi.<locals>.writecsB|rz�r|d�|d��Wd}n	d}w�rtd��|�|��S)Nr
r�zHeaders already set)�with_traceback�AssertionError)�statusr��exc_info)r�r�r�r�rr�start_response6s�z3WSGIRequestHandler.run_wsgi.<locals>.start_response�appr&c
sX|���}z`|D]}�|�q�s�d��r�j�d�Wt��}|��jtj�d}d}|jdd�rU�j�	d�}|t
|�7}|d7}|rN|dksN|d	krOn|jdd�s4|��t|d
�rd|��dSdSt��}|��jtj�d}d}|jdd�r��j�	d�}|t
|�7}|d7}|r�|dks�|d	kr�n|jdd�s||��t|d
�r�|��ww)N�s0

rg{�G�z�?)�timeouti���r
ld(	i�r�)
r�r��	selectors�DefaultSelector�registerr{�
EVENT_READ�selectr+rHrFr��hasattr)r��application_iterr��selector�
total_size�total_reads)r�r�r�rr�r�rr�executeDsN

��
���

�z,WSGIRequestHandler.run_wsgi.<locals>.executeTr
)�DebugTracebackrpzError on request:
)r�r�rr-�N)r�r&rr-)r�r�r�r;r�r�r�r�rQr��ConnectionError�socketr��connection_dropped�	Exception�passthrough_errors�close_connectionr�
debug.tbtoolsr��render_traceback_textr�)rr�r?r�r�r)	r�r�r�r�rr�r�r�r�r�run_wsgi�sD9'��"��zWSGIRequestHandler.run_wsgic
s�zt���WdSttjfy#}z|�|�WYd}~dSd}~wtyG}z|jjdur;t	|�r;|�
d|�n�WYd}~dSd}~ww)z/Handles a request ignoring dropped connections.NzSSL error occurred: %s)�super�handler�r�r�r�r�rQrr�is_ssl_error�	log_error)rr?��	__class__rrr��s����zWSGIRequestHandler.handleNrp�
BaseExceptionr��WSGIEnvironment | NonecCr3)z`Called if the connection was closed by the client.  By default
        nothing happens.
        Nr)rrpr�rrrr��sz%WSGIRequestHandler.connection_droppedrrcs|�d�r|jStt�|�S)N�do_)�
startswithr��getattrr�rr�rrr�s
zWSGIRequestHandler.__getattr__cCs*t|dd�r|jdS|jsdS|jdS)Nr�r`rWr)r�r�rsr4rrrr~�s


z!WSGIRequestHandler.address_stringr6cCs
|jdS)Nr
)rsr4rrrr�s
zWSGIRequestHandler.port_integercCsi|]	}|d|d���qS)z\x�02xr)�.0�crrr�
<dictcomp>�szWSGIRequestHandler.<dictcomp>� ��z\\�\rfr��	int | str�sizecCs�zt|j�}|j�d|�d|j��}Wnty|j}Ynw|�|j�}t|�}|ddkr6t	|d�}n8|dkr;n3|dkrEt	|d�}n)|ddkrQt	|d	�}n|d
kr[t	|d�}n|ddkrht	|dd
�}nt	|dd�}|�
dd|||�dS)N� r�1�bold�200�304�cyan�3�green�404�yellow�4�red�magenta�infoz
"%s" %s %s)rrqr|r�r��requestline�	translate�_control_char_tabler�_ansi_styler�)rr�r�rqr�rrr�log_request�s,

�zWSGIRequestHandler.log_request�format�argscG�|jd|g|�R�dS)Nrp�r��rr�r�rrrr���zWSGIRequestHandler.log_errorcGr�)Nr�r�rrrr�log_message�rzWSGIRequestHandler.log_message�type�messagecGs0t||���d|���d|�d�g|�R�dS)Nz - - [z] �
)rr~�log_date_time_string�rrrr�rrrr��s��zWSGIRequestHandler.log)rr)rr'�rr-r�)rpr�r�r�rr-rrM)rfrf)r�r�r�r�rr-)r�rr�rrr-�rrrrr�rrr-)rrrrN�__annotations__�propertyrTr�r�r�r�rr~rr�	maketrans�ranger��ordr�r�rr��
__classcell__rrr�rrO�s,


Q
�

	�

rOr�r�stylesrcGsBts|Sddddddd�}|D]}d||�d	|��}q|�d
�S)Nr
�r��!�#�$)r�r�r�r�r�r�z[�mz)�_log_add_style)r�r�codes�stylerrrr��s�	
r��cn�
str | None�2tuple[Certificate, RSAPrivateKeyWithSerialization]c
Cs4z ddlm}ddlm}ddlm}ddlm}ddlm	}Wnt
y,td�d�w|�}|jdd	|d
�}|dur>d}|�
|�|jd�|�|j|�g�}|�}|���|��|��|����|����t�tj���t�tj�td
d��j|�|j g�dd�j|�!|�"|�g�dd��#||�$�|�}	|	|fS)Nr)�x509)�NameOID)�default_backend)�hashes)�rsaz<Using ad-hoc certificates requires the cryptography library.ii)�public_exponent�key_size�backend�*zDummy Certificateim)�daysF)�critical)%�cryptographyr�cryptography.x509.oidr�cryptography.hazmat.backendsr�cryptography.hazmat.primitivesr�)cryptography.hazmat.primitives.asymmetricr �ImportError�	TypeError�generate_private_key�Name�
NameAttribute�ORGANIZATION_NAME�COMMON_NAME�CertificateBuilder�subject_name�issuer_name�
public_key�
serial_number�random_serial_number�not_valid_before�dt�nowr�utc�not_valid_afterr�
add_extension�ExtendedKeyUsage�OID_SERVER_AUTH�SubjectAlternativeName�DNSName�sign�SHA256)
rrrrrr r#�pkey�subject�certrrr�generate_adhoc_ssl_pair�sN������

��	�rH�	base_path�host�tuple[str, str]c	Cs�|durd|�d|��}t|d�\}}ddlm}|�d�}|�d�}t|d	��}|�|�|jj��Wd�n1s=wYt|d	��}|�|j|jj|j	j
|��d
��Wd�||fS1sfwY||fS)a�Creates an SSL key for development.  This should be used instead of
    the ``'adhoc'`` key which generates a new cert on each server start.
    It accepts a path for where it should store the key and cert and
    either a host or CN.  If a host is given it will use the CN
    ``*.host/CN=host``.

    For more information see :func:`run_simple`.

    .. versionadded:: 0.9

    :param base_path: the path to the certificate and key.  The extension
                      ``.crt`` is added for the certificate, ``.key`` is
                      added for the key.
    :param host: the name of the host.  This can be used as an alternative
                 for the `cn`.
    :param cn: the `CN` to use.
    Nz*.z/CN=)rr��
serializationz.crtz.key�wb��encodingr��encryption_algorithm)rHr*rM�openr��public_bytes�Encoding�PEM�
private_bytes�
PrivateFormat�TraditionalOpenSSL�NoEncryption)	rIrJrrGrErM�	cert_file�	pkey_file�frrr�make_ssl_devcerts*

���
�	�	r]c
Cs�ddl}ddl}t�\}}ddlm}|��\}}|��\}}|�tj|�|�tj|�t�	||�
|jj��t�	||j
|jj|jj|��d��t�|�t�|�t||�}	|	S)z:Generates an adhoc SSL context for the development server.rNrLrO)�tempfile�atexitrHr*rM�mkstempr��os�remover�rSrTrUrVrWrXrYr��load_ssl_context)
r^r_rGrErM�cert_handlerZ�pkey_handler[�ctxrrr�generate_adhoc_ssl_contextJs*
��
	

rgrZr[�protocol�
int | NonecCs(|durtj}t�|�}|�||�|S)a�Loads SSL context from cert/private key files and optional protocol.
    Many parameters are directly taken from the API of
    :py:class:`ssl.SSLContext`.

    :param cert_file: Path of the certificate to use.
    :param pkey_file: Path of the private key to use. If not given, the key
                      will be obtained from the certificate file.
    :param protocol: A ``PROTOCOL`` constant from the :mod:`ssl` module.
        Defaults to :data:`ssl.PROTOCOL_TLS_SERVER`.
    N)r��PROTOCOL_TLS_SERVER�
SSLContext�load_cert_chain)rZr[rhrfrrrrchs


rcrp�Exception | Noner2cCs(|durt�tt��d�}t|tj�S)z?Checks if the given error (or the current one) is an SSL error.Nr
)�t�castr�rwr�rtr��SSLError)rprrrr�}sr��portr6�socket.AddressFamilycCs.|�d�rtjSd|vrttd�rtjStjS)zUReturn ``AF_INET4``, ``AF_INET6``, or ``AF_UNIX`` depending on
    the host and port.zunix://�:�AF_INET6)r�r��AF_UNIXr�rt�AF_INET)rJrqrrr�select_address_family�s

rw�family�tuple[str, int] | strcCsb|tkrtj�|�d�d�Sz
t�|||tjtj�}Wntj	y*||fYSw|ddS)zVReturn a fully qualified socket address that can be passed to
    :func:`socket.bind`.�://r�r�)
�af_unixrarq�abspath�	partitionr��getaddrinfo�SOCK_STREAM�IPPROTO_TCP�gaierror)rJrqrx�resrrr�get_sockaddr�s��r�c	Cs�|tjkrdnd}t�|tj��1}z	|�|df�Wnty3|tjkr(dndYWd�Sw|��dWd�S1sDwYdS)z�Get the IP address of an external interface. Used when binding to
    0.0.0.0 or ::1 to show a more useful URL.

    :meta private:
    zfd31:f903:5ab5:1::1z10.253.155.219i2�z::1�	127.0.0.1Nr)r�rt�
SOCK_DGRAM�connectr=�getsockname)rxrJ�srrr�get_interface_ip�s�
$�r�csneZdZdZdZdZeZdZ				d)d*�fdd�
Z	d+dd�Z
d,d-�fd d!�
Zd.�fd%d&�Zd/d'd(�Z
�ZS)0rPzuA WSGI server that that handles one request at a time.

    Use :func:`make_server` to create a server instance.
    FTNrJrrqr6r�r&�handler�type[WSGIRequestHandler] | Noner�r2rr�_TSSLContextArg | None�fdrirr-c
s�|durt}dt|�vr|js|jrd|_||_||_||_||_t	||�|_
}t|t|�|�}	|t
krJ|durJt�t|	�}	tj�|	�rJt�|	�t�j|	|dd�|dur�z
|��|��Wnbty�}
z8|��t|
jtjd�|
jtj kr�td|�d�tjd�tj!dkr�|d	kr�td
tjd�t�"d�WYd}
~
n#d}
~
wt#y�|���w|��t$�%||t$j&�|_$|j$�'�|_(|t
kr�|j(d|_|dur�t)|t*�r�t+|�}n|dkr�t,�}|j-|j$d
d�|_$||_.dSd|_.dS)Nr�r�F)�bind_and_activate)�filezPort zp is in use by another program. Either identify and stop that program, or start the server with a different port.�darwini�zZOn macOS, try disabling the 'AirPlay Receiver' service from System Preferences -> Sharing.r
r%T)�server_side)/rO�varsryrzr�rJrqr�r�rw�address_familyr�r6r|rnrorrarq�exists�unlinkr�r1�server_bind�server_activater=�server_close�print�strerrorrwrx�errno�
EADDRINUSE�platform�exitr�r��fromfdr�r�r�rt�tuplercrg�wrap_socketrr)rrJrqr�r�r�rrr�r�r�r?r�rrr1�sv
��
�
����



zBaseWSGIServer.__init__rrr�rcGst||g|�R�dSr�rrrrrr�szBaseWSGIServer.log��?�
poll_interval�floatcsNz!z	t�j|d�Wn	tyYnwW|��dSW|��dS|��w)N)r�)r��
serve_forever�KeyboardInterruptr�)rr�r�rrr�"s���zBaseWSGIServer.serve_forever�requestrsrycs|jr�t��||�Sr�)r�r��handle_error)rr�rsr�rrr�*szBaseWSGIServer.handle_errorcCs�d}t|dd�}|g}|jtkr|�d|j���nW|jdur!dnd}|j}|jdvrX|�d	|j�d
��|jdkrBd}ttj�}nd
}ttj	�}|�d|�d|�d|j
���d|vrbd|�d�}|�d|�d|�d|j
���tdd�|��dS)z<Show information about the address when starting the server.zvWARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.r�r�z * Running on NrUrV>�::�0.0.0.0z * Running on all addresses (�)r�r�z[::1]rzrs�[�]r�r)
r�r�r|�appendrJrrr�r�rvrtrqr�join)r�dev_warning�messagesru�display_hostname�	localhostrrr�log_startup2s(�



zBaseWSGIServer.log_startup)NFNN)rJrrqr6r�r&r�r�r�r2rrr�r�rirr-r	)r�)r�r�rr-)r�rrsryrr-r)rrrrNryrz�LISTEN_QUEUE�request_queue_size�allow_reuse_addressr1r�r�r�r�rrrr�rrP�s�
crPc@seZdZdZdZdZdS)�ThreadedWSGIServerz�A WSGI server that handles concurrent requests in separate
    threads.

    Use :func:`make_server` to create a server instance.
    TN)rrrrNry�daemon_threadsrrrrr�Usr�cs2eZdZdZdZ					dd�fdd�
Z�ZS)�ForkingWSGIServerz�A WSGI server that handles concurrent requests in separate forked
    processes.

    Use :func:`make_server` to create a server instance.
    T�(NFrJrrqr6r�r&�	processesr�r�r�r2rrr�r�rirr-c			s.tstd��t��|||||||�||_dS)Nz'Your platform does not support forking.)�can_forkr<r�r1�max_children)	rrJrqr�r�r�r�rrr�r�rrr1is
zForkingWSGIServer.__init__)r�NFNN)rJrrqr6r�r&r�r6r�r�r�r2rrr�r�rirr-)rrrrNrzr1rrrr�rr�`s�r�r�r&�threadedr��request_handlerr�r�rrr�r�c		
Csd|r
|dkr
td��|rt|||||||d�S|dkr't||||||||d�St|||||||d�S)a6Create an appropriate WSGI server instance based on the value of
    ``threaded`` and ``processes``.

    This is called from :func:`run_simple`, but can be used separately
    to have access to the server object, such as to run it in a separate
    thread.

    See :func:`run_simple` for parameter docs.
    r
z4Cannot have a multi-thread and multi-process server.�r�)r<r�r�rP)	rJrqr�r�r�r�r�rrr�rrr�make_server{s(���r�cCstj�d�dkS)zqCheck if the server is running as a subprocess within the
    Werkzeug reloader.

    .. versionadded:: 0.10
    �WERKZEUG_RUN_MAIN�true)rar�r�rrrr�is_running_from_reloader�sr��auto�hostname�application�use_reloader�use_debugger�
use_evalex�extra_files�t.Iterable[str] | None�exclude_patterns�reloader_interval�
reloader_type�static_files�'dict[str, str | tuple[str, str]] | Noner-cCst|t�s	td��|
rddlm}|||
�}|r$ddlm}|||d�}t�s*d}nttj	d�}t
||||
|||||d�	}|j�d	�t
|���tj	d<t�s\|��td
tdd��|r{dd
lm}z||j||||	d�W|��dS|��w|��dS)aStart a development server for a WSGI application. Various
    optional features can be enabled.

    .. warning::

        Do not use the development server when deploying to production.
        It is intended for use only during local development. It is not
        designed to be particularly efficient, stable, or secure.

    :param hostname: The host to bind to, for example ``'localhost'``.
        Can be a domain, IPv4 or IPv6 address, or file path starting
        with ``unix://`` for a Unix socket.
    :param port: The port to bind to, for example ``8080``. Using ``0``
        tells the OS to pick a random free port.
    :param application: The WSGI application to run.
    :param use_reloader: Use a reloader process to restart the server
        process when files are changed.
    :param use_debugger: Use Werkzeug's debugger, which will show
        formatted tracebacks on unhandled exceptions.
    :param use_evalex: Make the debugger interactive. A Python terminal
        can be opened for any frame in the traceback. Some protection is
        provided by requiring a PIN, but this should never be enabled
        on a publicly visible server.
    :param extra_files: The reloader will watch these files for changes
        in addition to Python modules. For example, watch a
        configuration file.
    :param exclude_patterns: The reloader will ignore changes to any
        files matching these :mod:`fnmatch` patterns. For example,
        ignore cache files.
    :param reloader_interval: How often the reloader tries to check for
        changes.
    :param reloader_type: The reloader to use. The ``'stat'`` reloader
        is built in, but may require significant CPU to watch files. The
        ``'watchdog'`` reloader is much more efficient but requires
        installing the ``watchdog`` package first.
    :param threaded: Handle concurrent requests using threads. Cannot be
        used with ``processes``.
    :param processes: Handle concurrent requests using up to this number
        of processes. Cannot be used with ``threaded``.
    :param request_handler: Use a different
        :class:`~BaseHTTPServer.BaseHTTPRequestHandler` subclass to
        handle requests.
    :param static_files: A dict mapping URL prefixes to directories to
        serve static files from using
        :class:`~werkzeug.middleware.SharedDataMiddleware`.
    :param passthrough_errors: Don't catch unhandled exceptions at the
        server level, let the server crash instead. If ``use_debugger``
        is enabled, the debugger will still catch such errors.
    :param ssl_context: Configure TLS to serve over HTTPS. Can be an
        :class:`ssl.SSLContext` object, a ``(cert_file, key_file)``
        tuple to create a typical context, or the string ``'adhoc'`` to
        generate a temporary self-signed certificate.

    .. versionchanged:: 2.1
        Instructions are shown for dealing with an "address already in
        use" error.

    .. versionchanged:: 2.1
        Running on ``0.0.0.0`` or ``::`` shows the loopback IP in
        addition to a real IP.

    .. versionchanged:: 2.1
        The command-line interface was removed.

    .. versionchanged:: 2.0
        Running on ``0.0.0.0`` or ``::`` shows a real IP address that
        was bound as well as a warning not to run the development server
        in production.

    .. versionchanged:: 2.0
        The ``exclude_patterns`` parameter was added.

    .. versionchanged:: 0.15
        Bind to a Unix socket by passing a ``hostname`` that starts with
        ``unix://``.

    .. versionchanged:: 0.10
        Improved the reloader and added support for changing the backend
        through the ``reloader_type`` parameter.

    .. versionchanged:: 0.9
        A command-line interface was added.

    .. versionchanged:: 0.8
        ``ssl_context`` can be a tuple of paths to the certificate and
        private key files.

    .. versionchanged:: 0.6
        The ``ssl_context`` parameter was added.

    .. versionchanged:: 0.5
       The ``static_files`` and ``passthrough_errors`` parameters were
       added.
    zport must be an integerr
)�SharedDataMiddleware)�DebuggedApplication)�evalexN�WERKZEUG_SERVER_FDr�Tr�zPress CTRL+C to quitr�)�run_with_reloader)r�r��intervalr�)rtr6r-�middleware.shared_datar��debugr�r�rar�r�r��set_inheritabler�filenor�rr��	_reloaderr�r�r�)r�rqr�r�r�r�r�r�r�r�r�r�r�r�r�rrr�r�r��srvr�rrr�
run_simple�sN
p
��r�)r�rrrrrr�)rrrr)NN)rIrrJrrrrrK)rr$)rZrr[rrhrirr$)rprmrr2)rJrrqr6rrr)rJrrqr6rxrrrry)rxrrrr)Fr
NFNN)rJrrqr6r�r&r�r2r�r6r�r�r�r2rrr�r�rirrPrL)
FFTNNr
r�Fr
NNFN)"r�rrqr6r�r&r�r2r�r2r�r2r�r�r�r�r�r6r�rr�r2r�r6r�r�r�r�r�r2rrr�rr-)KrN�
__future__rr��iorar�r��socketserverrw�typingrnrr:rr�http.serverrr�urllib.parserr	�	_internalrr
�
exceptionsr�urlsrr�r,rrr�
__import__r�r�r"rur|r�r��Optional�Union�Tupler�Literal�_TSSLContextArg�
TYPE_CHECKING�_typeshed.wsgir&r'�-cryptography.hazmat.primitives.asymmetric.rsar(�cryptography.x509r)�	RawIOBaser*rOr�rHr]rgrcr�rwr�r�rP�ThreadingMixInr�r�r�r�r�rrrr�<module>s�

�
�

�$�>
I�/�
,�



%�
-
�