HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //lib/python3/dist-packages/blinker/__pycache__/_utilities.cpython-38.pyc
U

��Qi�@s.ddlmZddlmZzeWnek
r<dd�ZYnXzddlmZWnGdd�de�ZYnXzddl	m
Z
Wnek
r�d	d
�Z
YnXGdd�de�Z
d
e
_Gdd
�d
e�ZzeefZWnek
r�eZYnXdd�ZeefZGdd�de�Zddd�Zddd�ZGdd�de�ZdS)�)�ref)�BoundMethodWeakrefcCs
t|d�S)N�__call__)�hasattr)�object�r�4/usr/lib/python3/dist-packages/blinker/_utilities.py�callable	sr	)�defaultdictc@sNeZdZddd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dS)r
NcOs6|dk	rt|d�std��tj|f|�|�||_dS)Nrzfirst argument must be callable)r�	TypeError�dict�__init__�default_factory)�selfr�a�kwrrrr
s�zdefaultdict.__init__cCs2zt�||�WStk
r,|�|�YSXdS�N)r�__getitem__�KeyError�__missing__)r�keyrrrrszdefaultdict.__getitem__cCs&|jdkrt|��|��||<}|Sr)rr)rr�valuerrrrs
zdefaultdict.__missing__cCs0|jdkrt�}n|jf}t|�|dd|��fSr)r�tuple�type�items)r�argsrrr�
__reduce__%s
zdefaultdict.__reduce__cCs|��Sr)�__copy__�rrrr�copy,szdefaultdict.copycCst|�|j|�Sr)rrrrrrr/szdefaultdict.__copy__cCs"ddl}t|�|j|�|����S)Nr)rrr�deepcopyr)r�memorrrr�__deepcopy__2s
�zdefaultdict.__deepcopy__cCsd|jt�|�fS)Nzdefaultdict(%s, %s))rr�__repr__rrrrr#7s�zdefaultdict.__repr__)N)�__name__�
__module__�__qualname__r
rrrrrr"r#rrrrr
s
r
)�contextmanagercCsdd�}|j|_|S)Nc_std��dS)Nz8Python 2.5 or above is required to use context managers.)�RuntimeError)rrrrr�oops@szcontextmanager.<locals>.oops)r$)�fnr)rrrr'?sr'c@s$eZdZdd�Zdd�Zdd�ZdS)�_symbolcCs||_|_dS)zConstruct a new named symbol.N)r$�name)rr,rrrr
Hsz_symbol.__init__cCst|jffSr)�symbolr,rrrrrLsz_symbol.__reduce__cCs|jSr)r,rrrrr#Osz_symbol.__repr__N)r$r%r&r
rr#rrrrr+Fsr+r-c@seZdZdZiZdd�ZdS)r-a?A constant symbol.

    >>> symbol('foo') is symbol('foo')
    True
    >>> symbol('foo')
    foo

    A slight refinement of the MAGICCOOKIE=object() pattern.  The primary
    advantage of symbol() is its repr().  They are also singletons.

    Repeated calls of symbol('name') will all return the same instance.

    cCs8z|j|WStk
r2|j�|t|��YSXdSr)�symbolsr�
setdefaultr+)�clsr,rrr�__new__dszsymbol.__new__N)r$r%r&�__doc__r.r1rrrrr-Ts
cCsVt|d�rt|j�t|j�fSt|d�r<t|j�t|j�fSt|t�rJ|St|�SdS)N�__func__�im_func)r�idr3�__self__r4�im_self�
isinstance�text)�objrrr�hashable_identityqs


r;c@seZdZdZdS)�annotatable_weakrefz7A weakref.ref that supports custom instance attributes.N)r$r%r&r2rrrrr<sr<NcKs@t|�rt||�}n
t||�}|��D]\}}t|||�q&|S)zReturn an annotated weak ref.)r	�callable_referencer<r�setattr)r�callbackZannotationsZweakrrrrr�	reference�s
r@cCsJt|d�r |jdk	r t||d�St|d�r@|jdk	r@t||d�St||�S)z@Return an annotated weak ref, supporting bound instance methods.r7N)�targetZ	on_deleter6)rr7rr6r<)rr?rrrr=�s
r=c@s eZdZdZdd�Zdd�ZdS)�
lazy_propertyz(A @property that is only evaluated once.cCs||_|j|_dSr)�	_deferredr2)rZdeferredrrrr
�szlazy_property.__init__cCs*|dkr|S|�|�}t||jj|�|Sr)rCr>r$)rr:r0rrrr�__get__�s

zlazy_property.__get__N)r$r%r&r2r
rDrrrrrB�srB)N)N)�weakrefrZblinker._saferefrr	�	NameError�collectionsr
r�
contextlibr'�ImportErrorrr+r$r-�strZunicoder9r;Z	WeakTypesr<r@r=rBrrrr�<module>s4,