HEX
Server: LiteSpeed
System: Linux kapuas.iixcp.rumahweb.net 5.14.0-427.42.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 1 14:58:02 EDT 2024 x86_64
User: mirz4654 (1666)
PHP: 8.1.33
Disabled: system,exec,escapeshellarg,escapeshellcmd,passthru,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,popen,pclose,dl,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setsid,posix_setuid,posix_setpgid,ini_alter,show_source,define_syslog_variables,symlink,syslog,openlog,openlog,closelog,ocinumcols,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dll,ftp,myshellexec,socket_bind,mail,posix_getwpuid
Upload Files
File: //usr/local/lib/python3.9/site-packages/kombu/__pycache__/abstract.cpython-39.pyc
a

X>hJ�@s�dZddlmZddlmZddlmZmZmZmZddl	m
Z
ddlmZddl
mZertdd	lmZdd
lmZdZed�Zed
dd�Zeddd�Zddd
d�dd�Zddd�dd�ZGdd�d�ZGdd�de�ZdS)zObject utilities.�)�annotations)�copy)�
TYPE_CHECKING�Any�Callable�TypeVar�)�
maybe_channel)�
NotBoundError)�ChannelPromise)�
Connection)�Channel)�Object�MaybeChannelBound�_T�_ObjectTyper)�bound�_MaybeChannelBoundTyperztype[_ObjectType]�dict[str, Any])�cls�kwargs�returncCs|fi|��S�N�)rrrr�8/usr/local/lib/python3.9/site-packages/kombu/abstract.py�
unpickle_dictsr)�vrcCs|Srr)rrrr�_any src@sbeZdZUdZdZded<dddd�dd	�Zdddd
�dd�Zddd�dd�Zddd�dd�Z	dS)rzYCommon base class.

    Supports automatic kwargs->attributes handling, and cloning.
    rztuple[tuple[str, Any], ...]�attrsr�None)�argsrrc	Osj|jD]^\}}|�|�}|dur6t|||p,t|��qzt||�Wqtybt||d�Yq0qdSr)r�get�setattrr�getattr�AttributeError)�selfr r�name�type_�valuerrr�__init__,s
zObject.__init__F�boolr)�recursercs.ddddd��fdd�
���fdd��jD�S)	NrzCallable[[Any], Any] | None)�obj�typercs2�rt|t�r|jdd�S|r.|dur.||�S|S)NT�r+)�
isinstancer�as_dict)r,r-r.rr�f8szObject.as_dict.<locals>.fcs"i|]\}}|�t�|�|��qSr)r#)�.0�attrr-)r1r%rr�
<dictcomp><sz"Object.as_dict.<locals>.<dictcomp>)N)r)r%r+r)r1r+r%rr07s�zObject.as_dictrzktuple[Callable[[type[_ObjectType], dict[str, Any]], _ObjectType], tuple[type[_ObjectType], dict[str, Any]]])r%rcCst|j|��ffSr)r�	__class__r0�r%rrr�
__reduce__@szObject.__reduce__cCs|jfi|����Sr)r5r0r6rrr�__copy__FszObject.__copy__N)F)
�__name__�
__module__�__qualname__�__doc__r�__annotations__r)r0r7r8rrrrr$s
	c@s�eZdZUdZdZded<dZdZdddd�d	d
�Zdddd�dd�Z	dddd�d
d�Z
ddd�dd�Zdd�dd�Zdd�dd�Z
d#ddd�dd�Zedd�dd ��Zedd�d!d"��ZdS)$rz7Mixin for classes that can be bound to an AMQP channel.NzChannel | None�_channelFrzChannel | Connection)r%�channelrcCs
|�|�S)z&`self(channel) -> self.bind(channel)`.)�bind�r%r?rrr�__call__SszMaybeChannelBound.__call__cCst|��|�S)z7Create copy of the instance that is bound to a channel.)r�
maybe_bindrArrrr@YszMaybeChannelBound.bindcCs&|js"|r"t|�|_|��d|_|S)z.Bind instance to channel if not already bound.T)�is_boundr	r>�
when_bound�	_is_boundrArrrrC_s


zMaybeChannelBound.maybe_bindr
r)r?rcCs|jr||_|��dS)zyRevive channel after the connection has been re-established.

        Used by :meth:`~kombu.Connection.ensure`.

        N)rDr>rErArrr�reviveiszMaybeChannelBound.revive)rcCsdS)z(Callback called when the class is bound.Nrr6rrrrEsszMaybeChannelBound.when_bound�strcCs|�t|�j�Sr)�_repr_entityr-r9r6rrr�__repr__vszMaybeChannelBound.__repr__�)�itemrcCs:|pt|�j}|jr.d�|p$t|�j|jj�Sd|�d�S)Nz<{} bound to chan:{}>z	<unbound �>)r-r9rD�formatr?Z
channel_id)r%rLrrrrIys�zMaybeChannelBound._repr_entityr*cCs|jo|jduS)z!Flag set if the channel is bound.N)rFr>r6rrrrD�szMaybeChannelBound.is_boundcCs<|j}|dur"td�t|�j���t|t�r8|�}|_|S)z'Current channel if the object is bound.Nz.Can't call method on {} not bound to a channel)r>r
rNr-r9r/rrArrrr?�s��
zMaybeChannelBound.channel)rK)r9r:r;r<r>r=rFZcan_cache_declarationrBr@rCrGrErJrI�propertyrDr?rrrrrJs


N)r<�
__future__rr�typingrrrr�
connectionr	�
exceptionsr
Zutils.functionalrZkombu.connectionrZkombu.transport.virtualr
�__all__rrrrrrrrrrr�<module>s&�&