HEX

Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit - prohibited by configuration in /home/u547966/brikov.ru/www/wp-content/plugins/admin-menu-editor/menu-editor.php on line 745
Server: Apache
System: Linux 4.19.0-0.bpo.9-amd64 x86_64 at red40
User: u547966 (5490)
PHP: 5.3.29-mh2
Disabled: syslog, dl, popen, proc_open, proc_nice, proc_get_status, proc_close, proc_terminate, posix_mkfifo, chown, chgrp, accelerator_reset, opcache_reset, accelerator_get_status, opcache_get_status, pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wifcontinued, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_exec, pcntl_getpriority, pcntl_setpriority
Upload Files
File: //usr/lib/python3.7/__pycache__/weakref.cpython-37.pyc
B

{aP
@sdZddlmZmZmZmZmZmZmZm	Z	ddl
mZmZddl
Z
ddlZddlZeefZddddd	d
ddd
ddddg
ZGdddeZGddde
jZGdddeZGdd	d	e
jZGdddZdS)z{Weak reference support for Python.

This module is an implementation of PEP 205:

http://www.python.org/dev/peps/pep-0205/
)getweakrefcountgetweakrefsrefproxyCallableProxyType	ProxyType
ReferenceType_remove_dead_weakref)WeakSet_IterationGuardNrrrrWeakKeyDictionaryrrr
ProxyTypesWeakValueDictionaryr

WeakMethodfinalizecsDeZdZdZdZdddZfddZdd	Zd
dZe	j
Z
ZS)
rz
    A custom `weakref.ref` subclass which simulates a weak reference to
    a bound method, working around the lifetime problem of bound methods.
    )	_func_ref
_meth_type_alive__weakref__Ncs~y|j}|j}Wn(tk
r8tdt|dYnXfdd}t|||}t|||_t||_	d|_
t||S)Nz)argument should be a bound method, not {}cs&}|jr"d|_dk	r"|dS)NF)r)argself)callbackself_wr/usr/lib/python3.7/weakref.py_cb3s
zWeakMethod.__new__.<locals>._cbT)__self____func__AttributeError	TypeErrorformattyper__new__rrr)clsZmethrobjfuncrrr)rrrr",s

zWeakMethod.__new__cs2t}|}|dks"|dkr&dS|||S)N)super__call__rr)rr$r%)	__class__rrr'Bs

zWeakMethod.__call__cCs:t|tr6|jr|js||kSt||o4|j|jkSdS)NF)
isinstancerrr__eq__r)rotherrrrr*Is

zWeakMethod.__eq__cCs:t|tr6|jr|js||k	St||p4|j|jkSdS)NT)r)rrr__ne__r)rr+rrrr,Ps

zWeakMethod.__ne__)N)__name__
__module____qualname____doc__	__slots__r"r'r*r,r__hash__
__classcell__rr)r(rr$s
c@seZdZdZddZddZddZdd	Zd
dZdd
Z	ddZ
ddZddZeZ
ddZd+ddZddZddZeZddZdd Zd!d"Zd#d$Zd,d%d&Zd'd(Zd)d*ZdS)-rzMapping class that references values weakly.

    Entries in the dictionary will be discarded when no strong
    reference to the value exists anymore
    cst|std|^}}t|dkr0tdt|t|tffdd	}||_g|_t|_i|_|j	||dS)NzGdescriptor '__init__' of 'WeakValueDictionary' object needs an argumentz$expected at most 1 arguments, got %dcs4|}|dk	r0|jr$|j|jn||jdS)N)
_iterating_pending_removalsappendkey)wrselfrefZ_atomic_removalr)drrremovems
z,WeakValueDictionary.__init__.<locals>.remove)
rlenrr	_remover6setr5dataupdate)argskwrr<r)r;r__init__fs	
zWeakValueDictionary.__init__cCs,|j}|j}x|r&|}t||qWdS)N)r6r@popr	)rlr;r8rrr_commit_removals}s
z$WeakValueDictionary._commit_removalscCs4|jr||j|}|dkr,t|n|SdS)N)r6rGr@KeyError)rr8orrr__getitem__s
zWeakValueDictionary.__getitem__cCs|jr||j|=dS)N)r6rGr@)rr8rrr__delitem__szWeakValueDictionary.__delitem__cCs|jr|t|jS)N)r6rGr=r@)rrrr__len__szWeakValueDictionary.__len__cCs<|jr|y|j|}Wntk
r2dSX|dk	S)NF)r6rGr@rH)rr8rIrrr__contains__sz WeakValueDictionary.__contains__cCsd|jjt|fS)Nz<%s at %#x>)r(r-id)rrrr__repr__szWeakValueDictionary.__repr__cCs&|jr|t||j||j|<dS)N)r6rGKeyedRefr>r@)rr8valuerrr__setitem__szWeakValueDictionary.__setitem__c	CsZ|jr|t}t|4x,|jD]\}}|}|dk	r*|||<q*WWdQRX|S)N)r6rGrrr@items)rnewr8r9rIrrrcopys
zWeakValueDictionary.copyc	Csnddlm}|jr||}t|:x2|jD]$\}}|}|dk	r8|||||<q8WWdQRX|S)Nr)deepcopy)rUrVr6rGr(rr@rS)rmemorVrTr8r9rIrrr__deepcopy__s
z WeakValueDictionary.__deepcopy__NcCsL|jr|y|j|}Wntk
r0|SX|}|dkrD|S|SdS)N)r6rGr@rH)rr8defaultr9rIrrrgetszWeakValueDictionary.getc	csV|jr|t|6x.|jD] \}}|}|dk	r$||fVq$WWdQRXdS)N)r6rGrr@rS)rkr9vrrrrSs
zWeakValueDictionary.itemsc	csN|jr|t|.x&|jD]\}}|dk	r$|Vq$WWdQRXdS)N)r6rGrr@rS)rr[r9rrrkeyss

zWeakValueDictionary.keysc	cs6|jr|t||jEdHWdQRXdS)aReturn an iterator that yields the weak references to the values.

        The references are not guaranteed to be 'live' at the time
        they are used, so the result of calling the references needs
        to be checked before being used.  This can be used to avoid
        creating references that will cause the garbage collector to
        keep the values around longer than needed.

        N)r6rGrr@values)rrrr
itervaluerefss

z!WeakValueDictionary.itervaluerefsc	csN|jr|t|.x&|jD]}|}|dk	r$|Vq$WWdQRXdS)N)r6rGrr@r^)rr9r$rrrr^s
zWeakValueDictionary.valuescCs<|jr|x(|j\}}|}|dk	r||fSqWdS)N)r6rGr@popitem)rr8r9rIrrrr`szWeakValueDictionary.popitemcGs`|jr|y|j|}Wntk
r8d}YnX|dkrX|rN|dSt|n|SdS)Nr)r6rGr@rErH)rr8rBrIrrrrEs

zWeakValueDictionary.popcCs`y|j|}Wntk
r(d}YnX|dkrX|jr@|t||j||j|<|S|SdS)N)r@rHr6rGrPr>)rr8rYrIrrr
setdefaults
zWeakValueDictionary.setdefaultcOs|std|^}}t|dkr0tdt||r<|dnd}|jrN||j}|dk	rt|dsrti|}x&|D]\}}t||j	|||<q|Wt|r|
|dS)NzEdescriptor 'update' of 'WeakValueDictionary' object needs an argumentr4z$expected at most 1 arguments, got %drrS)rr=r6rGr@hasattrr!rSrPr>rA)rBkwargsrdictr;r8rIrrrrA"s 
zWeakValueDictionary.updatecCs|jr|t|jS)a~Return a list of weak references to the values.

        The references are not guaranteed to be 'live' at the time
        they are used, so the result of calling the references needs
        to be checked before being used.  This can be used to avoid
        creating references that will cause the garbage collector to
        keep the values around longer than needed.

        )r6rGlistr@r^)rrrr	valuerefs5s
zWeakValueDictionary.valuerefs)N)N)r-r.r/r0rDrGrJrKrLrMrOrRrU__copy__rXrZrSr]__iter__r_r^r`rErarArfrrrrrZs.			
			

cs,eZdZdZdZddZfddZZS)rPa[Specialized reference that includes a key corresponding to the value.

    This is used in the WeakValueDictionary to avoid having to create
    a function object for each key stored in the mapping.  A shared
    callback object can use the 'key' attribute of a KeyedRef instead
    of getting a reference to the key from an enclosing scope.

    )r8cCst|||}||_|S)N)rr"r8)r!obrr8rrrrr"PszKeyedRef.__new__cst||dS)N)r&rD)rrirr8)r(rrrDUszKeyedRef.__init__)r-r.r/r0r1r"rDr3rr)r(rrPDsrPc@seZdZdZd+ddZddZddZd	d
ZddZd
dZ	ddZ
ddZddZeZ
ddZd,ddZddZddZddZeZdd Zd!d"Zd#d$Zd%d&Zd-d'd(Zd.d)d*ZdS)/ra Mapping class that references keys weakly.

    Entries in the dictionary will be discarded when there is no
    longer a strong reference to the key. This can be used to
    associate additional data with an object owned by other parts of
    an application without adding attributes to those objects. This
    can be especially useful with objects that override attribute
    accesses.
    NcCsFi|_t|fdd}||_g|_t|_d|_|dk	rB||dS)NcSs.|}|dk	r*|jr"|j|n|j|=dS)N)r5r6r7r@)r[r:rrrrr<fs
z*WeakKeyDictionary.__init__.<locals>.removeF)r@rr>r6r?r5
_dirty_lenrA)rrdr<rrrrDdszWeakKeyDictionary.__init__cCs>|j}|j}x,|r8y||=Wqtk
r4YqXqWdS)N)r6r@rErH)rrFr;rrrrGusz"WeakKeyDictionary._commit_removalscs&|jfdd|jD|_d|_dS)Ncsg|]}|kr|qSrr).0r[)r;rr
<listcomp>sz5WeakKeyDictionary._scrub_removals.<locals>.<listcomp>F)r@r6rj)rr)r;r_scrub_removalssz!WeakKeyDictionary._scrub_removalscCsd|_|jt|=dS)NT)rjr@r)rr8rrrrKszWeakKeyDictionary.__delitem__cCs|jt|S)N)r@r)rr8rrrrJszWeakKeyDictionary.__getitem__cCs(|jr|jr|t|jt|jS)N)rjr6rmr=r@)rrrrrLszWeakKeyDictionary.__len__cCsd|jjt|fS)Nz<%s at %#x>)r(r-rN)rrrrrOszWeakKeyDictionary.__repr__cCs||jt||j<dS)N)r@rr>)rr8rQrrrrRszWeakKeyDictionary.__setitem__c	CsLt}t|4x,|jD]\}}|}|dk	r|||<qWWdQRX|S)N)rrr@rS)rrTr8rQrIrrrrUs
zWeakKeyDictionary.copyc	Cs`ddlm}|}t|:x2|jD]$\}}|}|dk	r*|||||<q*WWdQRX|S)Nr)rV)rUrVr(rr@rS)rrWrVrTr8rQrIrrrrXs
zWeakKeyDictionary.__deepcopy__cCs|jt||S)N)r@rZr)rr8rYrrrrZszWeakKeyDictionary.getcCs,yt|}Wntk
r dSX||jkS)NF)rrr@)rr8r9rrrrMs
zWeakKeyDictionary.__contains__c	csHt|6x.|jD] \}}|}|dk	r||fVqWWdQRXdS)N)rr@rS)rr9rQr8rrrrSs

zWeakKeyDictionary.itemsc	cs<t|*x"|jD]}|}|dk	r|VqWWdQRXdS)N)rr@)rr9r$rrrr]s

zWeakKeyDictionary.keysc	cs@t|.x&|jD]\}}|dk	r|VqWWdQRXdS)N)rr@rS)rr9rQrrrr^s

zWeakKeyDictionary.valuescCs
t|jS)azReturn a list of weak references to the keys.

        The references are not guaranteed to be 'live' at the time
        they are used, so the result of calling the references needs
        to be checked before being used.  This can be used to avoid
        creating references that will cause the garbage collector to
        keep the keys around longer than needed.

        )rer@)rrrrkeyrefss
zWeakKeyDictionary.keyrefscCs4d|_x(|j\}}|}|dk	r||fSqWdS)NT)rjr@r`)rr8rQrIrrrr`szWeakKeyDictionary.popitemcGsd|_|jjt|f|S)NT)rjr@rEr)rr8rBrrrrEszWeakKeyDictionary.popcCs|jt||j|S)N)r@rarr>)rr8rYrrrraszWeakKeyDictionary.setdefaultcKs`|j}|dk	rJt|ds$ti|}x$|D]\}}||t||j<q.Wt|r\||dS)NrS)r@rbr!rSrr>r=rA)rrdrcr;r8rQrrrrAs
zWeakKeyDictionary.update)N)N)N)N)r-r.r/r0rDrGrmrKrJrLrOrRrUrgrXrZrMrSr]rhr^rnr`rErarArrrrrYs.	

	


c@seZdZdZdZiZdZeZ	dZ
dZGdddZddZ
dd	d
ZddZd
dZeddZeddZejddZddZeddZeddZdS)raClass for finalization of weakrefable objects

    finalize(obj, func, *args, **kwargs) returns a callable finalizer
    object which will be called when obj is garbage collected. The
    first time the finalizer is called it evaluates func(*arg, **kwargs)
    and returns the result. After this the finalizer is dead, and
    calling it just returns None.

    When the program exits any remaining finalizers for which the
    atexit attribute is true will be run in reverse order of creation.
    By default atexit is true.
    rFc@seZdZdZdS)zfinalize._Info)weakrefr%rBrcatexitindexN)r-r.r/r1rrrr_InfosrrcOsp|js ddl}||jdt_|}t|||_||_||_	|pFd|_
d|_t|j|_
||j|<dt_dS)NrT)_registered_with_atexitrpregister	_exitfuncrrrrror%rBrcnext_index_iterrq	_registry_dirty)rr$r%rBrcrpinforrrrDs

zfinalize.__init__NcCs0|j|d}|r,|js,|j|j|jp(iSdS)zZIf alive then mark as dead and return func(*args, **kwargs);
        otherwise return NoneN)rxrE	_shutdownr%rBrc)r_rzrrrr'#s
zfinalize.__call__cCsH|j|}|o|}|dk	rD|j|drD||j|j|jp@ifSdS)z^If alive then mark as dead and return (obj, func, args, kwargs);
        otherwise return NoneN)rxrZrorEr%rBrc)rrzr$rrrdetach*szfinalize.detachcCs:|j|}|o|}|dk	r6||j|j|jp2ifSdS)zMIf alive then return (obj, func, args, kwargs);
        otherwise return NoneN)rxrZror%rBrc)rrzr$rrrpeek2sz
finalize.peekcCs
||jkS)zWhether finalizer is alive)rx)rrrralive:szfinalize.alivecCs|j|}t|o|jS)z*Whether finalizer should be called at exit)rxrZboolrp)rrzrrrrp?szfinalize.atexitcCs|j|}|rt||_dS)N)rxrZrrp)rrQrzrrrrpEscCs^|j|}|o|}|dkr6dt|jt|fSdt|jt|t|jt|fSdS)Nz<%s object at %#x; dead>z!<%s object at %#x; for %r at %#x>)rxrZror!r-rN)rrzr$rrrrOKszfinalize.__repr__cCs2dd|jD}|jddddd|DS)NcSsg|]\}}|jr||fqSr)rp)rkfirrrrlWsz-finalize._select_for_exit.<locals>.<listcomp>cSs
|djS)Nr4)rq)itemrrr<lambda>Xz+finalize._select_for_exit.<locals>.<lambda>)r8cSsg|]\}}|qSrr)rkrrrrrrlYs)rxrSsort)r#Lrrr_select_for_exitTszfinalize._select_for_exitcCsd}z|jrddl}|r(d}|d}xj|dks<tjrJ|}dt_|sPP|}y
|Wn"tk
rt	j
t	YnX||jks.tq.WWddt_
|r|XdS)NFrT)rxgcZ	isenabledZdisablerryrrE	Exceptionsys
excepthookexc_infoAssertionErrorr{Zenable)r#Zreenable_gcrZpendingrrrrru[s.
zfinalize._exitfunc)N)r-r.r/r0r1rxr{	itertoolscountrwryrsrrrDr'r}r~propertyrrpsetterrOclassmethodrrurrrrrs$
	)r0_weakrefrrrrrrrr	Z_weakrefsetr
r_collections_abcrrr
__all__rMutableMappingrrPrrrrrr<module>s"(

6k