U ÀÒ.eÿã@sÎddlmZddlTddlmZGdd„deddƒƒZddlZej d ¡r`dd l m Z m Z m Z nBzdd l m Z m Z m Z Wn(ek r dd l m Z m Z m Z YnXd d „Zd d„Zdd„ZeZe ZeZeZdS)é)Úversion)Ú*é)Ú namedtuplecs eZdZdZ‡fdd„Z‡ZS)ÚExtTypez'ExtType represents ext type in msgpack.csVt|tƒstdƒ‚t|tƒs$tdƒ‚d|kr8dksBntdƒ‚tt|ƒ |||¡S)Nzcode must be intzdata must be bytesrézcode must be 0~127)Ú isinstanceÚintÚ TypeErrorÚbytesÚ ValueErrorÚsuperrÚ__new__)ÚclsÚcodeÚdata©Ú __class__©ú@/usr/lib/python3.8/site-packages/pip/_vendor/msgpack/__init__.pyr s  zExtType.__new__)Ú__name__Ú __module__Ú __qualname__Ú__doc__rÚ __classcell__rrrrrsrz code dataNZMSGPACK_PUREPYTHON)ÚPackerÚunpackbÚUnpackercKstf|Ž}| | |¡¡dS)zX Pack object `o` and write it to `stream` See :class:`Packer` for options. N)rÚwriteÚpack)ÚoÚstreamÚkwargsZpackerrrrrs rcKstf|Ž |¡S)zW Pack object `o` and return packed bytes See :class:`Packer` for options. )rr)r r"rrrÚpackb(sr#cKs| ¡}t|f|ŽS)zŒ Unpack an object from `stream`. Raises `ExtraData` when `stream` contains extra bytes. See :class:`Unpacker` for options. )Úreadr)r!r"rrrrÚunpack1sr%)Z_versionrÚ exceptionsÚ collectionsrrÚosÚenvironÚgetZfallbackrrrZ _cmsgpackÚ ImportErrorrr#r%ÚloadÚloadsÚdumpÚdumpsrrrrÚs"