CasperSecurity

Current Path : /lib/python3/dist-packages/zope/component/__pycache__/
Upload File :
Current File : //lib/python3/dist-packages/zope/component/__pycache__/hooks.cpython-310.pyc

o

,�W��@s
dZdZddlZddlZzddlmZWn
ey!dd�ZYnwddlmZddl	m
Z
dd	l	mZGd
d�de�Z
Gdd
�d
ej�Ze�Zddd�Zdd�Zejdd��Zddd�Zddd�Zdd�Zdd�ZeZzddlmZWn
ey~YdSwee�dS) zEHooks for getting and setting a site in the thread global namespace.
�restructuredtext�N)�removeSecurityProxycCs|S�N�)�xrr�6/usr/lib/python3/dist-packages/zope/component/hooks.pyrsr)�getGlobalSiteManager)�ComponentLookupError)�IComponentLookupc@s eZdZdZdd�Zdd�ZdS)�
read_propertyz�Descriptor for property-like computed attributes.

    Unlike the standard 'property', this descriptor allows assigning a
    value to the instance, shadowing the property getter function.
    cCs
||_dSr��func)�selfr
rrr�__init__&s
zread_property.__init__cCs|dur|S|�|�Srr)r�inst�clsrrr�__get__)s
zread_property.__get__N)�__name__�
__module__�__qualname__�__doc__rrrrrrr src@s"eZdZdZe�Zedd��ZdS)�SiteInfoNcCs|jjj}||_|Sr)�sm�adapters�adapter_hook)rrrrrr3s
zSiteInfo.adapter_hook)rrr�siterrrrrrrrr/s
rcCsL|durt�}nt|�}|��}|t_|t_zt`WdSty%YdSwr)rr�getSiteManager�siteinforrr�AttributeError)rrrrr�setSite;s

�rcCstjSr)rrrrrr�getSiteRsr ccs0�t�}t|�z
dVWt|�dSt|�wr)r r)r�old_siterrrrVs�rcCs&|durtjSt|t��}t|�}|S)z�A special hook for getting the site manager.

    Here we take the currently set site into account to find the appropriate
    site manager.
    N)rrr
rr)�contextrrrrr`s�r�cCs*z	t�||||�WSty|YSwr)rrr	)�	interface�object�name�defaultrrrrus
�rcCs(ddlm}|j�t�|j�t�dS�Nr��_api)�zope.componentr*r�sethookrr)rrr�setHooks|sr-cCs@ddlm}|j��|j��zt`WdStyYdSwr()r+r*r�resetrrrr)rrr�
resetHooks�s


�r/)�
addCleanUpr)r#N)r�
__docformat__�
contextlib�	threading�zope.security.proxyr�ImportError�zope.component.globalregistryr�zope.component.interfacesr	r
r%r�localrrrr �contextmanagerrrrr-r/�	clearSite�zope.testing.cleanupr0rrrr�<module>s<
�



	

�
Hacker Blog, Shell İndir, Sql İnjection, XSS Attacks, LFI Attacks, Social Hacking, Exploit Bot, Proxy Tools, Web Shell, PHP Shell, Alfa Shell İndir, Hacking Training Set, DDoS Script, Denial Of Service, Botnet, RFI Attacks, Encryption
Telegram @BIBIL_0DAY