????

Your IP : 216.73.216.152


Current Path : /proc/self/root/proc/self/root/lib/python2.7/site-packages/pip/_vendor/msgpack/
Upload File :
Current File : //proc/self/root/proc/self/root/lib/python2.7/site-packages/pip/_vendor/msgpack/fallback.pyc

�
}�\]c@sEdZddlZddlZddlZejddkr[eZeefZ	d�Z
n!eZeZ	eZ
eZd�Z
ejddfkr�eZd	�Zn	d
�Zeed�r"ddlmZydd
lmZWn!ek
rddlmZnXeZdefd��YZneZddlmZd�Zddlm Z m!Z!m"Z"m#Z#m$Z$ddl%m&Z&dZ'dZ(dZ)dZ*dZ+dZ,dZ-dZ.dZ/dZ0dZ1e2e3d�Z4d�Z5d�Z6d�Z7ejdddfkrdd�Z8n	ej9Z8defd ��YZ:d!efd"��YZ;dS(#s.Fallback pure Python implementation of msgpacki����NiicCs
|j�S(N(t	iteritems(td((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pytdict_iteritemsscCs
|j�S(N(titems(R((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pyRsiicCs?t|j�dko>t|jdt�o>|jdjd�S(Niis maximum recursion depth exceeded(tlentargst
isinstancetstrt
startswith(te((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pyt_is_recursionerrors+cCstS(N(tTrue(R	((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pyR
stpypy_version_info(tnewlist_hint(tBytesBuilder(t
StringBuildertStringIOcBs&eZdd�Zd�Zd�ZRS(tcCs>|r.tt|��|_|jj|�nt�|_dS(N(RRtbuildertappend(tselfts((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pyt__init__*scCsPt|t�r|j�}nt|t�r<t|�}n|jj|�dS(N(Rt
memoryviewttobytest	bytearraytbytesRR(RR((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pytwrite0s
cCs
|jj�S(N(Rtbuild(R((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pytgetvalue6s(t__name__t
__module__RRR(((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pyR)s	(tBytesIOcCsgS(N((tsize((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pyt<lambda>;s(t
BufferFullt	OutOfDatat	ExtraDatatFormatErrort
StackError(tExtTypeiii�cCs6||�|kr"||�|kS||�|kSdS(N((tobjttttypettuple((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pyt_check_type_strictXscCs�yt|�}WnOtk
ratr[tt|��}tjdt|�tdd�qb�nX|jdkr�t	d��n|S(Ns�using old buffer interface to unpack %s; this leads to unpacking errors if slicing is used and will be removed in a future versiont
stackleveliis$cannot unpack from multi-byte object(
Rt	TypeErrortPY2tbuffertwarningstwarnR+tRuntimeWarningtitemsizet
ValueError(R)tview((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pyt_get_data_from_buffer_s
	
cKs/tjdtdd�|j�}t||�S(NsbDirect calling implementation's unpack() is deprecated, Use msgpack.unpack() or unpackb() instead.R.i(R2R3tDeprecationWarningtreadtunpackb(tstreamtkwargstdata((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pytunpackqs

cKs�tddt|�|�}|j|�y|j�}WnGtk
rWtd��n+tk
r�}t|�r{t	�n�nX|j
�r�t||j���n|S(sw
    Unpack an object from `packed`.

    Raises ``ExtraData`` when *packed* contains extra bytes.
    Raises ``ValueError`` when *packed* is incomplete.
    Raises ``FormatError`` when *packed* is not valid msgpack.
    Raises ``StackError`` when *packed* contains too nested.
    Other exceptions can be raised during unpacking.

    See :class:`Unpacker` for options.
    tmax_buffer_sizesUnpack failed: incomplete inputN(
tUnpackertNoneRtfeedt_unpackR$R6tRecursionErrorR
R't_got_extradataR%t_get_extradata(tpackedR=tunpackertretR	((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pyR;ys

	iicCstj|t|�|�S(s.Explicit typcast for legacy struct.unpack_from(tstructtunpack_fromR(tftbto((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pyt_unpack_from�sRAcBs�eZdZddeeeddddddedddddd�Zd�Zd�Z	d�Z
d�Zd�Zd	�Z
d
�Zed�Zed�Zd
�Zd�ZeZd�Zd�Zd�Zd�Zd�ZRS(s�
Streaming unpacker.

    arguments:

    :param file_like:
        File-like object having `.read(n)` method.
        If specified, unpacker reads serialized data from it and :meth:`feed()` is not usable.

    :param int read_size:
        Used as `file_like.read(read_size)`. (default: `min(16*1024, max_buffer_size)`)

    :param bool use_list:
        If true, unpack msgpack array to Python list.
        Otherwise, unpack to Python tuple. (default: True)

    :param bool raw:
        If true, unpack msgpack raw to Python bytes (default).
        Otherwise, unpack to Python str (or unicode on Python 2) by decoding
        with UTF-8 encoding (recommended).
        Currently, the default is true, but it will be changed to false in
        near future.  So you must specify it explicitly for keeping backward
        compatibility.

        *encoding* option which is deprecated overrides this option.

    :param bool strict_map_key:
        If true, only str or bytes are accepted for map (dict) keys.
        It's False by default for backward-compatibility.
        But it will be True from msgpack 1.0.

    :param callable object_hook:
        When specified, it should be callable.
        Unpacker calls it with a dict argument after unpacking msgpack map.
        (See also simplejson)

    :param callable object_pairs_hook:
        When specified, it should be callable.
        Unpacker calls it with a list of key-value pairs after unpacking msgpack map.
        (See also simplejson)

    :param str encoding:
        Encoding used for decoding msgpack raw.
        If it is None (default), msgpack raw is deserialized to Python bytes.

    :param str unicode_errors:
        (deprecated) Used for decoding msgpack raw with *encoding*.
        (default: `'strict'`)

    :param int max_buffer_size:
        Limits size of data waiting unpacked.  0 means system's INT_MAX (default).
        Raises `BufferFull` exception when it is insufficient.
        You should set this parameter when unpacking data from untrusted source.

    :param int max_str_len:
        Deprecated, use *max_buffer_size* instead.
        Limits max length of str. (default: max_buffer_size or 1024*1024)

    :param int max_bin_len:
        Deprecated, use *max_buffer_size* instead.
        Limits max length of bin. (default: max_buffer_size or 1024*1024)

    :param int max_array_len:
        Limits max length of array.
        (default: max_buffer_size or 128*1024)

    :param int max_map_len:
        Limits max length of map.
        (default: max_buffer_size//2 or 32*1024)

    :param int max_ext_len:
        Deprecated, use *max_buffer_size* instead.
        Limits max size of ext type.  (default: max_buffer_size or 1024*1024)

    Example of streaming deserialize from file-like object::

        unpacker = Unpacker(file_like, raw=False, max_buffer_size=10*1024*1024)
        for o in unpacker:
            process(o)

    Example of streaming deserialize from socket::

        unpacker = Unpacker(raw=False, max_buffer_size=10*1024*1024)
        while True:
            buf = sock.recv(1024**2)
            if not buf:
                break
            unpacker.feed(buf)
            for o in unpacker:
                process(o)

    Raises ``ExtraData`` when *packed* contains extra bytes.
    Raises ``OutOfData`` when *packed* is incomplete.
    Raises ``FormatError`` when *packed* is not valid msgpack.
    Raises ``StackError`` when *packed* contains too nested.
    Other exceptions can be raised during unpacking.
    ii����c
Cs�|	dk	r%tjdtdd�n|
dkr:d}
n|dkrRt|_n0t|j�sptd��n||_	t
|_t�|_d|_
d|_|
dkr�|p�d}
n|dkr�|p�d}n|dkr�|p�d}n|dkr|dp
d}n|dkr+|p%d}n|p4d|_||jkrXtd
��n|pmt|jd�|_t|�|_t|�|_|	|_|
|_||_||_||_||_||_|
|_||_||_||_ ||_!d|_"|dk	r.t|�r.td��n|dk	rVt|�rVtd��n|dk	r~t|�r~td��n|dk	r�|dk	r�td��nt|�s�td��ndS(Ns.encoding is deprecated, Use raw=False instead.R.itstricts!`file_like.read` must be callableii����ii�i iis.read_size must be smaller than max_buffer_sizeis`list_hook` is not callables`object_hook` is not callables#`object_pairs_hook` is not callables8object_pairs_hook and object_hook are mutually exclusives`ext_hook` is not callableiiii�iI�i���i@(#RBR2R3R9Rt_feedingtcallableR:R/t	file_liketFalseRt_buffert_buff_it_buf_checkpointt_max_buffer_sizeR6tmint
_read_sizetboolt_rawt_strict_map_keyt	_encodingt_unicode_errorst	_use_listt
_list_hookt_object_hookt_object_pairs_hookt	_ext_hookt_max_str_lent_max_bin_lent_max_array_lent_max_map_lent_max_ext_lent_stream_offset(RRTt	read_sizetuse_listtrawtstrict_map_keytobject_hooktobject_pairs_hookt	list_hooktencodingtunicode_errorsR@text_hooktmax_str_lentmax_bin_lent
max_array_lentmax_map_lentmax_ext_len((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pyR�sl																				cCs�|jst�t|�}t|j�|jt|�|jkrMt�n|jdkr�|j|j4|j|j8_d|_n|jj	|�dS(Ni(
RRtAssertionErrorR8RRVRWRYR#RXtextend(Rt
next_bytesR7((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pyRCPs)	
cCs)|j|j|j7_|j|_dS(s+ Gets rid of the used parts of the buffer. N(RkRWRX(R((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pyt_consume_scCs|jt|j�kS(N(RWRRV(R((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pyRFdscCs|j|jS(N(RVRW(R((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pyRGgscCs
|j|�S(N(t_read(Rtn((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pyt
read_bytesjscCs5|j|�|j}|||_|j|||!S(N(t_reserveRWRV(RR�ti((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pyRms
	
cCs0t|j�|j|}|dkr*dS|jrH|j|_t�n|jdkr�|j|j4|j|j8_d|_n|}xr|dkr�t|j|�}|jj	|�}|s�Pnt
|t�s�t�|j|7_|t|�8}q�Wt|j�||jkr,d|_t�ndS(Ni(
RRVRWRRRXR$tmaxR[RTR:RRR{(RR�tremain_bytest
to_read_bytest	read_data((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pyR�ts,		
	cCsH
t}d}d}|jd�|j|j}|jd7_|d@dkrW|}n�|d@dkrxd|dA}n�|d@dkr�|d@}t}||jkr�td	||j��n|j|�}nj|d
@dkr|d@}t	}||j
kr;
td
||j
��q;
n |d
@dkre|d@}t}||jkr;
td||j��q;
n�|dkrzd}n�|dkr�t
}n�|dkr�t}n�|dkrt}|jd�|j|j}|jd7_||jkr
td||jf��n|j|�}n|dkr�t}|jd�td|j|j�d}|jd7_||jkr�td||jf��n|j|�}n�
|dkr-t}|jd�td|j|j�d}|jd7_||jkrtd||jf��n|j|�}n
|dkr�t}|jd�td|j|j�\}}|jd7_||jkr�td||jf��n|j|�}n�	|dkr?t}|jd�td|j|j�\}}|jd7_||jkr-td||jf��n|j|�}n�|d kr�t}|jd!�td"|j|j�\}}|jd!7_||jkr�td||jf��n|j|�}ns|d#kr|jd�td$|j|j�d}|jd7_n,|d%krV|jd&�td'|j|j�d}|jd&7_n�|d(kr�|jd�|j|j}|jd7_n�|d)kr�|jd�td|j|j�d}|jd7_nc|d*kr|jd�td|j|j�d}|jd7_n|d+krf|jd&�td,|j|j�d}|jd&7_n�|d-kr�|jd�td.|j|j�d}|jd7_n�|d/kr�|jd�td0|j|j�d}|jd7_nG|d1kr;|jd�td2|j|j�d}|jd7_n|d3kr�|jd&�td4|j|j�d}|jd&7_n�|d5kr�t}|jdkr�tdd|jf��n|jd�td6|j|j�\}}|jd7_n?|d7krvt}|jdkr9tdd|jf��n|jd�td8|j|j�\}}|jd7_n�|d9kr�t}|jdkr�tdd|jf��n|jd!�td:|j|j�\}}|jd!7_nK|d;krj	t}|jd&kr-	tdd&|jf��n|jd<�td=|j|j�\}}|jd<7_n�|d>kr�	t}|jd?kr�	tdd?|jf��n|jd@�tdA|j|j�\}}|jd@7_nW|dBkr[
t}|jd�|j|j}|jd7_||jkrI
td	||j��n|j|�}n�|dCkr�
t}|jd�td|j|j�\}|jd7_||jkr�
td	||j��n|j|�}n^|dDkr_t}|jd�td|j|j�\}|jd7_||jkrMtd	||j��n|j|�}n�|dEkr�t	}|jd�td|j|j�\}|jd7_||j
kr;
td
||j
��q;
ni|dFkrEt	}|jd�td|j|j�\}|jd7_||j
kr;
td
||j
��q;
n�|dGkr�|jd�td|j|j�\}|jd7_||jkr�td||j��nt}n�|dHkr+
|jd�td|j|j�\}|jd7_||jkr"
td||j��nt}ntdI|��|||fS(JNiii�i�i����i�i�is%s exceeds max_str_len(%s)i�i�is%s exceeds max_array_len(%s)s%s exceeds max_map_len(%s)i�i�i�i�s%s exceeds max_bin_len(%s)i�is>Hi�is>Ii�tBbs%s exceeds max_ext_len(%s)i�is>Hbi�is>Ibi�s>fi�is>di�i�i�i�s>Qi�RNi�s>hi�s>ii�s>qi�tb1si�tb2si�tb4si�i	tb8si�iitb16si�i�i�i�i�i�i�sUnknown header: 0x%x(tTYPE_IMMEDIATERBR�RVRWtTYPE_RAWRfR6Rt
TYPE_ARRAYRhtTYPE_MAPRiRURtTYPE_BINRgRPtTYPE_EXTRjR&(RtexecutettypR�R)RNtL((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pyt_read_header�s�
	


			


























	
	c	s�j|�\}}}|tkrC|tkr?td��n|S|tkrn|tkrjtd��n|S|tkr|tkr�x!t|�D]}�jt�q�WdSt	|�}x*t|�D]}|j
�jt��q�W�jdk	r�j|�}n�jr|St|�S|tkrG|tkrlx.t|�D] }�jt��jt�qDWdS�jdk	r��j�fd�t|�D��}n�i}xvt|�D]h}�jt�}�jrt|�ttfkrtdtt|����n�jt�||<q�W�jdk	rC�j|�}n|S|tkrWdS|tkr��jdk	r�|j�j�j�}n'�jr�t|�}n|jd�}|S|tkr��j|t|��S|tkr�t|�S|tkst �|S(NsExpected arraysExpected mapc3s-|]#}�jt��jt�fVqdS(N(RDtEX_CONSTRUCT(t.0t_(R(s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pys	<genexpr>�ss%s is not allowed for map keytutf_8(!R�tEX_READ_ARRAY_HEADERR�R6tEX_READ_MAP_HEADERR�tEX_SKIPtxrangeRDR
RR�RbRBRaR,RdR^R+tunicodeRRRcR�R_tdecodeR`R]R�ReR�R�R{(	RR�R�R�R)R�RJR�tkey((Rs;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pyRDhsl
!	
cCs|S(N((R((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pyt__iter__�scCs_y!|jt�}|j�|SWn7tk
rD|j�t�ntk
rZt�nXdS(N(RDR�R~R$t
StopIterationRER'(RRJ((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pyt__next__�s


	
cCs|jt�|j�dS(N(RDR�R~(R((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pytskip�s
cCs;y|jt�}Wntk
r,t�nX|j�|S(N(RDR�RER'R~(RRJ((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pyR?�s


cCs|jt�}|j�|S(N(RDR�R~(RRJ((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pytread_array_header�s
cCs|jt�}|j�|S(N(RDR�R~(RRJ((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pytread_map_header�s
cCs|jS(N(Rk(R((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pyttell�sN(RRt__doc__RBRRUR(RRCR~RFRGR�RR�R�R�RDR�R�tnextR�R?R�R�R�(((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pyRA�s6`		J							 �@						tPackercBs�eZdZdddeeeed�Zeee	d�Z
d�Zd�Zd�Z
d�Zd�Zd�Zd	�Zed
�Zd�Zd�Zd
�Zd�Zd�ZRS(sh
    MessagePack Packer

    usage:

        packer = Packer()
        astream.write(packer.pack(a))
        astream.write(packer.pack(b))

    Packer's constructor has some keyword arguments:

    :param callable default:
        Convert user type to builtin type that Packer supports.
        See also simplejson's document.

    :param bool use_single_float:
        Use single precision float type for float. (default: False)

    :param bool autoreset:
        Reset buffer after each pack and return its content as `bytes`. (default: True).
        If set this to false, use `bytes()` to get content and `.reset()` to clear buffer.

    :param bool use_bin_type:
        Use bin type introduced in msgpack spec 2.0 for bytes.
        It also enables str8 type for unicode.

    :param bool strict_types:
        If set to true, types will be checked to be exact. Derived classes
        from serializeable types will not be serialized and will be
        treated as unsupported type and forwarded to default.
        Additionally tuples will not be serialized as lists.
        This is useful when trying to implement accurate serialization
        for python types.

    :param str encoding:
        (deprecated) Convert unicode to bytes with this encoding. (default: 'utf-8')

    :param str unicode_errors:
        Error handler for encoding unicode. (default: 'strict')
    cCs�|dkrd}ntjdtdd�|dkr@d}n||_||_||_||_||_||_	t
�|_|dk	r�t|�s�t
d��q�n||_dS(NR�s.encoding is deprecated, Use raw=False instead.R.iRQsdefault must be callable(RBR2R3R9t
_strict_typest
_use_floatt
_autoresett
_use_bin_typeR_R`RRVRSR/t_default(RtdefaultRsRttuse_single_floatt	autoresettuse_bin_typetstrict_types((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pyR�s$	
							cCsKt}|jr|}t}nttf}xtrF|dkrNtd��n|dkrj|jjd�S||t	�r�|r�|jjd�S|jjd�S||t
�r6d|ko�dknr�|jjtjd|��Sd|ko�dknr|jjtjd	|��Sd|ko5d
knrY|jjtjdd|��Sd
|kopdknr�|jjtjdd|��Sd
|ko�dknr�|jjtjdd|��Sd|ko�d
knr
|jjtjdd|��Sd|ko!dknrE|jjtjdd|��Sd|ko\dknr�|jjtjdd|��Sd|ko�dknr�|jjtjdd|��Sd|ko�dknr�|jjtjd d!|��S|r'|j
dk	r'|j
|�}t}q-ntd"��n||ttf�r�t|�}|d;krtd%t|�j��n|j|�|jj|�S||t�r%|jdkr�td&��n|j|j|j�}t|�}|d<krtd'��n|j|�|jj|�S||t�rt|�|j}|d=krbtd(��n|j|�|jj|�S||t�r�|jr�|jjtjd)d*|��S|jjtjd+d,|��S||t�rr|j }|j!}	t"|t#�st$�t"|	t�s t$�t|	�}
|
d-krK|jjd.�n�|
d#krj|jjd/�n�|
d0kr�|jjd1�n�|
d2kr�|jjd3�n�|
d4kr�|jjd5�n{|
d
kr�|jjtjd6d7|
��nM|
dkr#|jjtjdd8|
��n|jjtjdd9|
��|jjtjd	|��|jj|	�dS|||�r�t|�}|j%|�x,t&|�D]}|j'|||d-�q�WdS||t(�r�|j)t|�t*|�|d-�S|r0|j
dk	r0|j
|�}d-}q-ntd:|f��q-WdS(>Nisrecursion limit exceededs�s�s�i�tBi��RNi�tBBi�i����s>Bbi�i��s>BHi�i���s>Bhi�I����s>BIi�i�s>Bii�l����s>BQi�I�s>Bqi�sInteger value out of rangeii s%s is too larges5Can't encode unicode string: no encoding is specifiedsString is too largesMemoryview is too larges>Bfi�s>Bdi�is�s�is�is�is�s>BBi�i�i�sCannot serialize %rIII(+RUR�tlistR,RR6RBRVRR\t	int_typesRKtpackR�t
OverflowErrorRRRR+Rt_pack_bin_headerR�R_R/tencodeR`t_pack_raw_headerRR5tfloatR�R(tcodeR>RtintR{t_pack_array_headerR�t_packtdictt_pack_map_pairsR(RR)t
nest_limittchecktcheck_type_stricttdefault_usedt
list_typesR�R�R>R�R�((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pyR�s�			


			""
cCsVy|j|�Wnt�|_�nX|jrR|jj�}t�|_|SdS(N(R�RRVR�R(RR)RJ((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pyR��s	cCsB|jt|�|�|jr>|jj�}t�|_|SdS(N(R�RR�RVRR(RtpairsRJ((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pytpack_map_pairs�s
	cCsN|dkrt�n|j|�|jrJ|jj�}t�|_|SdS(Nii I(R6R�R�RVRR(RR�RJ((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pytpack_array_header�s	
	cCsN|dkrt�n|j|�|jrJ|jj�}t�|_|SdS(Nii I(R6t_pack_map_headerR�RVRR(RR�RJ((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pytpack_map_header�s	
	cCs�t|t�std��nd|ko5dknsItd��nt|t�sgtd��nt|�}|dkr�td��n|dkr�|jjd	�n�|d
kr�|jjd�n�|dkr�|jjd
�n�|dkr
|jjd�n�|dkr)|jjd�n~|dkrX|jjdtj	d|��nO|dkr�|jjdtj	d|��n |jjdtj	d|��|jjtj	d|��|jj|�dS(Nstypecode must have int type.iistypecode should be 0-127sdata must have bytes typeI����sToo large datais�is�is�is�is�i�s�R�i��s�s>Hs�s>I(
RR�R/R6RRRVRRKR�(RttypecodeR>R�((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pyt
pack_ext_type�s4## cCs�|dkr,|jjtjdd|��S|dkrW|jjtjdd|��S|dkr�|jjtjdd	|��Std
��dS(NiR�i�i��s>BHi�I����s>BIi�sArray is too large(RVRRKR�R6(RR�((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pyR��s cCs�|dkr,|jjtjdd|��S|dkrW|jjtjdd|��S|dkr�|jjtjdd	|��Std
��dS(NiR�i�i��s>BHi�I����s>BIi�sDict is too large(RVRRKR�R6(RR�((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pyR��s cCsP|j|�x<|D]4\}}|j||d�|j||d�qWdS(Ni(R�R�(RR�R�R�tktv((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pyR��s
cCs�|dkr/|jjtjdd|��n�|jrf|dkrf|jjtjdd|��nh|dkr�|jjtjdd	|��n:|d
kr�|jjtjdd|��ntd
��dS(NiR�i�i�s>BBi�i��s>BHi�I����s>BIi�sRaw is too large(RVRRKR�R�R6(RR�((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pyR��s#"""cCs�|js|j|�S|dkrA|jjtjdd|��S|dkrl|jjtjdd|��S|dkr�|jjtjdd	|��Std
��dS(Ni�s>BBi�i��s>BHi�I����s>BIi�sBin is too large(R�R�RVRRKR�R6(RR�((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pyR��s	
cCs
|jj�S(s/Return internal buffer contents as bytes object(RVR(R((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pyR�scCst�|_dS(sYReset internal buffer.

        This method is usaful only when autoreset=False.
        N(RRV(R((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pytreset�scCs-tstrt|j��S|jj�SdS(sReturn view of internal buffer.N(tUSING_STRINGBUILDERR0RRRVt	getbuffer(R((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pyR��sN(RRR�RBRURRtDEFAULT_RECURSE_LIMITRR-R�R�R�R�R�R�R�R�R�R�R�RR�R�(((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pyR��s&(		m															(<R�tsysRKR2tversion_infoRR0R�tlongR�RRURR�trangeR�tRuntimeErrorRER
thasattrt__pypy__R
t__pypy__.buildersRRtImportErrorR�tobjectRtioR tpip._vendor.msgpack.exceptionsR#R$R%R&R'tpip._vendor.msgpackR(R�R�R�R�R�R�R�R�R�R�R�R+R,R-R8R?R;RPRLRAR�(((s;/tmp/pip-install-ewDPok/pip/pip/_vendor/msgpack/fallback.pyt<module>sf		
	(				��8