HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.104.1.lve.el8.x86_64 #1 SMP Tue Feb 10 20:07:30 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.29
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/__pycache__/msgpack.cpython-310.pyc
o

�N�g��@s0dZddlZe�e�ZdZzddlZejejgd�dd�dd�dur$e	�dZWne	yBzddl
ZdZWn	e	y?YnwYnwerNeed�rNejZnGd	d
�d
e
�ZGdd�d�Ze�ZejZejZesjd
nejZdd�Zdd�ZGdd�dej�Zdd�Zdd�Zdd�Zdd�ZeZeZeZeZdS)z$
Functions to work with MessagePack
�NF)���)Zuse_bin_typeT)Zuse_list�
exceptionsc@seZdZdZdS)�PackValueErrorzF
        older versions of msgpack do not have PackValueError
        N)�__name__�
__module__�__qualname__�__doc__�rr�F/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/msgpack.pyr"src@seZdZdZe�ZdS)�_exceptionszL
        older versions of msgpack do not have an exceptions module
        N)rrr	r
rrrrrr
's
r
)rrrcCs,t|t�sJ�|�dd�durt�d�|S)z�
    Clean up msgpack keyword arguments based on the version
    https://github.com/msgpack/msgpack-python/blob/master/ChangeLog.rst
    �encodingNz:removing unsupported `encoding` argument from msgpack call)�
isinstance�dict�pop�log�debug��kwargsrrr�_sanitize_msgpack_kwargs6s
rcCs.t|t�sJ�|�dd�|�dd�t|�S)z�
    Clean up msgpack keyword arguments for unpack operations, based on
    the version
    https://github.com/msgpack/msgpack-python/blob/master/ChangeLog.rst
    �rawTZstrict_map_keyF)rr�
setdefaultrrrrr�_sanitize_msgpack_unpack_kwargsBsrc@seZdZdZdd�ZdS)�UnpackerzG
    Wraps the msgpack.Unpacker and removes non-relevant arguments
    cOs"tjj|g|�Rit|���dS)N)�msgpackr�__init__r)�self�argsrrrrrSs��
�zUnpacker.__init__N)rrr	r
rrrrrrNsrcKstj||fit|���dS)z�
    .. versionadded:: 2018.3.4

    Wraps msgpack.pack and ensures that the passed object is unwrapped if it is
    a proxy.

    By default, this function uses the msgpack module and falls back to
    msgpack_pure, if the msgpack is not available.
    N)r�packr)�o�streamrrrrrYsrcK�tj|fit|���S)z�
    .. versionadded:: 2018.3.4

    Wraps msgpack.packb and ensures that the passed object is unwrapped if it
    is a proxy.

    By default, this function uses the msgpack module and falls back to
    msgpack_pure, if the msgpack is not available.
    )r�packbr)r rrrrr#gs
r#cKr")z�
    .. versionadded:: 2018.3.4

    Wraps msgpack.unpack.

    By default, this function uses the msgpack module and falls back to
    msgpack_pure, if the msgpack is not available.
    )r�unpackr)r!rrrrr$t�	r$cKr")z�
    .. versionadded:: 2018.3.4

    Wraps msgpack.unpack.

    By default, this function uses the msgpack module and falls back to
    msgpack_pure.
    )r�unpackbr)�packedrrrrr&�r%r&)r
�logging�	getLoggerrrZHAS_MSGPACKr�loads�dumps�ImportErrorZmsgpack_pure�hasattrr�	Exceptionrr
ZPackerZExtType�versionrrrrr#r$r&�load�dumprrrr�<module>sN
����