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.5/__pycache__/weakref.cpython-35.pyc


FaO
@s(dZddlmZmZmZmZmZmZmZm	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

WeakMethodfinalizecs^eZdZdZdZdddZfd	d
ZddZd
dZe	j
Z
S)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__Ncsy|j}|j}Wn0tk
rHtdjt|dYnXfdd}tj|||}t|||_t||_	d|_
t||S)Nz)argument should be a bound method, not {}cs5}|jr1d|_dk	r1|dS)NF)r)argself)callbackself_wr/usr/lib/python3.5/weakref.py_cb3s
			zWeakMethod.__new__.<locals>._cbT)__self____func__AttributeError	TypeErrorformattyper__new__rrr)clsmethrobjfuncrrr)rrrr",s	

		zWeakMethod.__new__csGtj}|j}|dks3|dkr7dS|j||S)N)super__call__rr)rr%r&)	__class__rrr(Bs
zWeakMethod.__call__cCsSt|trO|js#|jr-||kStj||oN|j|jkSdS)NF)
isinstancerrr__eq__r)rotherrrrr+Is

"zWeakMethod.__eq__cCsSt|trO|js#|jr-||k	Stj||pN|j|jkSdS)NT)r*rrr__ne__r)rr,rrrr-Ps

"zWeakMethod.__ne__)rrrr)__name__
__module____qualname____doc__	__slots__r"r(r+r-r__hash__rr)r)rr$sc@seZdZdZddZddZddZdd	Zd
dZdd
Z	ddZ
ddZddZeZ
ddZdddZddZddZeZddZdd Zd!d"Zd#d$Zdd%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
    cs|std|^}}t|dkrFtdt|t|fdd}||_g|_t|_i|_|j||dS)NzGdescriptor '__init__' of 'WeakValueDictionary' object needs an argumentz$expected at most 1 arguments, got %dcsH|}|dk	rD|jr4|jj|jnt|jdS)N)
_iterating_pending_removalsappendkeyr	)wrselfrefr)drrremovems
		z,WeakValueDictionary.__init__.<locals>.remove)	rlenr_remover6setr5dataupdate)argskwrr<r)r;r__init__fs			
zWeakValueDictionary.__init__cCs<|j}|j}x#|r7|j}t||qWdS)N)r6r@popr	)rlr;r8rrr_commit_removals}s
			z$WeakValueDictionary._commit_removalscCsF|jr|j|j|}|dkr>t|n|SdS)N)r6rGr@KeyError)rr8orrr__getitem__s	
zWeakValueDictionary.__getitem__cCs!|jr|j|j|=dS)N)r6rGr@)rr8rrr__delitem__s	
zWeakValueDictionary.__delitem__cCs |jr|jt|jS)N)r6rGr=r@)rrrr__len__s	
zWeakValueDictionary.__len__cCsJ|jr|jy|j|}Wntk
r?dSYnX|dk	S)NF)r6rGr@rH)rr8rIrrr__contains__s	

	z WeakValueDictionary.__contains__cCsd|jjt|fS)Nz<%s at %#x>)r)r.id)rrrr__repr__szWeakValueDictionary.__repr__cCs3|jr|jt||j||j|<dS)N)r6rGKeyedRefr>r@)rr8valuerrr__setitem__s	
zWeakValueDictionary.__setitem__cCs_|jr|jt}x<|jjD]+\}}|}|dk	r,|||<q,W|S)N)r6rGrr@items)rnewr8r9rIrrrcopys	
		zWeakValueDictionary.copycCs{ddlm}|jr#|j|j}xE|jjD]4\}}|}|dk	r?|||||<q?W|S)Nr)deepcopy)rUrVr6rGr)r@rS)rmemorVrTr8r9rIrrr__deepcopy__s	
	z WeakValueDictionary.__deepcopy__NcCs^|jr|jy|j|}Wntk
r<|SYnX|}|dkrV|S|SdS)N)r6rGr@rH)rr8defaultr9rIrrrgets	

		zWeakValueDictionary.getc
csk|jr|jt|Ex=|jjD],\}}|}|dk	r0||fVq0WWdQRXdS)N)r6rGrr@rS)rkr9vrrrrSs	

	zWeakValueDictionary.itemsc
cs_|jr|jt|9x1|jjD] \}}|dk	r0|Vq0WWdQRXdS)N)r6rGrr@rS)rr[r9rrrkeyss	

zWeakValueDictionary.keysc	cs=|jr|jt||jjEdHWdQRXdS)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
cs_|jr|jt|9x1|jjD] }|}|dk	r0|Vq0WWdQRXdS)N)r6rGrr@r^)rr9r%rrrr^s	

	zWeakValueDictionary.valuescCsR|jr|jx8|jj\}}|}|dk	r||fSqWdS)N)r6rGr@popitem)rr8r9rIrrrr`s	
	zWeakValueDictionary.popitemcGsx|jr|jy|jj|}Wntk
rFd}YnX|dkrp|ra|dSt|n|SdS)Nr)r6rGr@rErH)rr8rBrIrrrrEs	

zWeakValueDictionary.popcCsvy|j|}Wntk
r.d}YnX|dkrn|jrN|jt||j||j|<|S|SdS)N)r@rHr6rGrPr>)rr8rYrIrrr
setdefaults
	
zWeakValueDictionary.setdefaultcOs|std|^}}t|dkrFtdt||rV|dnd}|jro|j|j}|dk	rt|dsti|}x3|jD]%\}}t||j	|||<qWt|r|j
|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|jt|jjS)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	valuerefs3s
	
zWeakValueDictionary.valuerefs)r.r/r0r1rDrGrJrKrLrMrOrRrU__copy__rXrZrSr]__iter__r_r^r`rErarArfrrrrrZs.			
			
cs:eZdZdZdZddZfddZS)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.

    r8cCs"tj|||}||_|S)N)rr"r8)r!obrr8rrrrr"Ns	zKeyedRef.__new__cstj||dS)N)r'rD)rrirr8)r)rrrDSszKeyedRef.__init__)r8)r.r/r0r1r2r"rDrr)r)rrPBsrPc@seZdZdZdddZddZddZd	d
ZddZd
dZ	ddZ
ddZddZeZ
ddZdddZddZddZddZeZdd Zd!d"Zd#d$Zd%d&Zdd'd(Zdd)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.
    NcCsbi|_t|dd}||_g|_t|_d|_|dk	r^|j|dS)NcSs?|}|dk	r;|jr1|jj|n
|j|=dS)N)r5r6r7r@)r[r:rrrrr<ds
		z*WeakKeyDictionary.__init__.<locals>.removeF)r@rr>r6r?r5
_dirty_lenrA)rrdr<rrrrDbs				zWeakKeyDictionary.__init__cCsI|j}|j}x0|rDy||j=Wqtk
r@YqXqWdS)N)r6r@rErH)rrFr;rrrrGss			
z"WeakKeyDictionary._commit_removalscs5|jfdd|jD|_d|_dS)Ncs"g|]}|kr|qSrr).0r[)r;rr
<listcomp>s	z5WeakKeyDictionary._scrub_removals.<locals>.<listcomp>F)r@r6rj)rr)r;r_scrub_removalss	z!WeakKeyDictionary._scrub_removalscCsd|_|jt|=dS)NT)rjr@r)rr8rrrrKs	zWeakKeyDictionary.__delitem__cCs|jt|S)N)r@r)rr8rrrrJszWeakKeyDictionary.__getitem__cCs6|jr|jr|jt|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__cCsLt}x<|jjD]+\}}|}|dk	r|||<qW|S)N)rr@rS)rrTr8rQrIrrrrUs		zWeakKeyDictionary.copycCshddlm}|j}xE|jjD]4\}}|}|dk	r,|||||<q,W|S)Nr)rV)rUrVr)r@rS)rrWrVrTr8rQrIrrrrXs	zWeakKeyDictionary.__deepcopy__cCs|jjt||S)N)r@rZr)rr8rYrrrrZszWeakKeyDictionary.getcCs6yt|}Wntk
r(dSYnX||jkS)NF)rrr@)rr8r9rrrrMs

	zWeakKeyDictionary.__contains__c
csXt|Ex=|jjD],\}}|}|dk	r||fVqWWdQRXdS)N)rr@rS)rr9rQr8rrrrSs

	zWeakKeyDictionary.itemsc
csFt|3x+|jD] }|}|dk	r|VqWWdQRXdS)N)rr@)rr9r%rrrr]s

	zWeakKeyDictionary.keysc
csLt|9x1|jjD] \}}|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.keyrefscCsHd|_x8|jj\}}|}|dk	r||fSqWdS)NT)rjr@r`)rr8rQrIrrrr`s		zWeakKeyDictionary.popitemcGs"d|_|jjt||S)NT)rjr@rEr)rr8rBrrrrEs	zWeakKeyDictionary.popcCs|jjt||j|S)N)r@rarr>)rr8rYrrrraszWeakKeyDictionary.setdefaultcKs|j}|dk	rit|ds6ti|}x0|jD]"\}}||t||j<qCWt|r|j|dS)NrS)r@rbr!rSrr>r=rA)rrdrcr;r8rQrrrrAs	zWeakKeyDictionary.update)r.r/r0r1rDrGrmrKrJrLrOrRrUrgrXrZrMrSr]rhr^rnr`rErarArrrrrWs.	
	c@seZdZdZfZiZdZejZ	dZ
dZGdddZddZ
ddd	Zd
dZdd
ZeddZeddZejddZddZeddZeddZdS)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.
    Fc@seZdZdZdS)	zfinalize._Infoweakrefr&rBrcatexitindexN)ror&rBrcrprq)r.r/r0r2rrrr_InfosrrcOs|js.ddl}|j|jdt_|j}t|||_||_||_	|pgd|_
d|_t|j|_
||j|<dt_dS)NrT)_registered_with_atexitrpregister	_exitfuncrrrrror&rBrcnext_index_iterrq	_registry_dirty)rr%r&rBrcrpinforrrrDs					
zfinalize.__init__NcCsE|jj|d}|rA|jrA|j|j|jp=iSdS)zZIf alive then mark as dead and return func(*args, **kwargs);
        otherwise return NoneN)rxrE	_shutdownr&rBrc)r_rzrrrr(szfinalize.__call__cCsh|jj|}|o!|j}|dk	rd|jj|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.detachcCsS|jj|}|o!|j}|dk	rO||j|j|jpKifSdS)zMIf alive then return (obj, func, args, kwargs);
        otherwise return NoneN)rxrZror&rBrc)rrzr%rrrpeek.sz
finalize.peekcCs
||jkS)zWhether finalizer is alive)rx)rrrralive6szfinalize.alivecCs%|jj|}t|o$|jS)z*Whether finalizer should be called at exit)rxrZboolrp)rrzrrrrp;szfinalize.atexitcCs+|jj|}|r't||_dS)N)rxrZrrp)rrQrzrrrrpAscCs|jj|}|o!|j}|dkrMdt|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%rrrrOGszfinalize.__repr__cCsCdd|jjD}|jddddd|DS)NcSs+g|]!\}}|jr||fqSr)rp)rkfirrrrlSs	z-finalize._select_for_exit.<locals>.<listcomp>r8cSs|djS)Nr4)rq)itemrrr<lambda>Tsz+finalize._select_for_exit.<locals>.<lambda>cSsg|]\}}|qSrr)rkrrrrrrlUs	)rxrSsort)r#Lrrr_select_for_exitPszfinalize._select_for_exitcCsd}z|jrddl}|jr:d}|jd}x|dksXtjrm|j}dt_|stP|j}y|Wn%tk
rt	j
t	jYnX||jksCtqCWWddt_
|r|jXdS)NFrT)rxgc	isenableddisablerryrrE	Exceptionsys
excepthookexc_infoAssertionErrorr{enable)r#reenable_gcrpendingrrrrruWs.	
	
	zfinalize._exitfunc)r.r/r0r1r2rxr{	itertoolscountrwryrsrrrDr(r}r~propertyrrpsetterrOclassmethodrrurrrrrs$	)r1_weakrefrrrrrrrr	_weakrefsetr
rcollectionsrrr
__all__rMutableMappingrrPrrrrrr<module>s:
		6