Your IP : 216.73.216.213


Current Path : /opt/alt/python37/lib/python3.7/site-packages/webob/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib/python3.7/site-packages/webob/__pycache__/util.cpython-37.pyc

B

�b O�3@s�ddlZddlmZmZmZmZddlmZdd�Zdd�Z	dd	�Z
d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<�2Zd
d=dd>d?d@�ZdS)A�N)�escape�string_types�text_�	text_type)�
_trans_keycCs�|dkrdSt|dd�}|dk	r0t|�r0|��St|t�sht|dd�}|dk	r`t|�r`|��}nt|�}t|d�}t|t�r�|�	dd�}t
|�S)a9HTML-escape a string or object

    This converts any non-string objects passed into it to strings
    (actually, using ``unicode()``).  All values returned are
    non-unicode strings (using ``&#num;`` entities for all non-ASCII
    characters).

    None is treated specially, and returns the empty string.
    N��__html__�__unicode__T�ascii�xmlcharrefreplace)�getattr�callabler�
isinstancerr	�strrr�encoder)�srr	�r�;/opt/alt/python37/lib/python3.7/site-packages/webob/util.py�html_escapes




rcCs8|��rt|�}|�d�d}d||f}d|||fS)N�.rz<http://www.w3.org/Protocols/rfc2616/rfc2616-sec%s.html#sec%sz?Gets and sets the ``%s`` header (`HTTP spec section %s <%s>`_).)�isupperr�split)�headerZrfc_sectionZ
major_section�linkrrr�header_docstring&s
rcCsP|dkrt|��n&|dkr t}nt}tjd|tdd�tj|||dd�dS)Nz1.2z1.3z(Unknown warn_deprecation version arg: %r�)�
stacklevel)�DeprecationWarning�warnings�warn�RuntimeWarning)�text�versionr�clsrrr�warn_deprecation0s

r$ZContinuezSwitching ProtocolsZ
ProcessingZOKZCreatedZAcceptedzNon-Authoritative Informationz
No Contentz
Reset ContentzPartial ContentzMulti StatuszIM UsedzMultiple ChoiceszMoved PermanentlyZFoundz	See OtherzNot Modifiedz	Use ProxyzTemporary RedirectzBad RequestZUnauthorizedzPayment RequiredZ	Forbiddenz	Not FoundzMethod Not AllowedzNot AcceptablezProxy Authentication RequiredzRequest TimeoutZConflictZGonezLength RequiredzPrecondition FailedzRequest Entity Too LargezRequest URI Too LongzUnsupported Media TypezRequested Range Not SatisfiablezExpectation FailedzI'm a teapotzUnprocessable EntityZLockedzFailed DependencyzUpgrade RequiredzInternal Server ErrorzNot ImplementedzBad GatewayzService UnavailablezGateway TimeoutzHTTP Version Not SupportedzInsufficient StoragezNot Extended)2�d�e�f������������������i,i-i.i/i0i1i3i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�ZSuccesszUnknown Client ErrorzUnknown Server Error)r����)
rZwebob.compatrrrrZ
webob.headersrrrr$Zstatus_reasonsZstatus_generic_reasonsrrrr�<module>sx