HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux ip-10-0-8-47 6.8.0-1021-aws #23~22.04.1-Ubuntu SMP Tue Dec 10 16:31:58 UTC 2024 aarch64
User: ubuntu (1000)
PHP: 8.1.2-1ubuntu2.22
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/zope/component/__pycache__/globalregistry.cpython-310.pyc
o

,�W�
�@s�dZddlmZddlmZddlmZddlmZddl	m
Z
dd�ZGd	d
�d
e�Zee�Gdd�de��Z
e
d
�ZzddlmZWn	eyMYnwedd��[eZdd�Zde
fdd�Zdde
fdd�Zddd�Zddd�ZdS)zGlobal components support
�)�implementer)�AdapterRegistry)�
Components)�IComponentLookup)�_BLANKcCs
t||�S�N)�getattr)�
components�registryName�r�?/usr/lib/python3/dist-packages/zope/component/globalregistry.py�GARs
r
cs(eZdZdZ�fdd�Zdd�Z�ZS)�GlobalAdapterRegistryz~A global adapter registry

    This adapter registry's main purpose is to be picklable in combination
    with a site manager.cs||_||_tt|���dSr)�
__parent__�__name__�superr�__init__)�self�parent�name��	__class__rrr szGlobalAdapterRegistry.__init__cCst|j|jffSr)r
rr�rrrr�
__reduce__%sz GlobalAdapterRegistry.__reduce__)r�
__module__�__qualname__�__doc__rr�
__classcell__rrrrrsrc@seZdZdd�Zdd�ZdS)�BaseGlobalComponentscCst|d�|_t|d�|_dS)N�adapters�	utilities)rrr rrrr�_init_registries+sz%BaseGlobalComponents._init_registriescCs|jSr)rrrrrr/szBaseGlobalComponents.__reduce__N)rrrr!rrrrrr(sr�base)�
addCleanUpcCs
t�d�S)Nr")r"rrrrr�<lambda>:s
r$cCstSr)�globalSiteManagerrrrr�getGlobalSiteManager>sr&NcC�tj|||dd�dS�NF)�event)r"�registerUtility)�	component�providesrrrr�provideUtilityE�r-cCstj||||dd�dSr()r"�registerAdapter)�factory�adaptsr,rrrr�provideAdapterHsr2cCr'r()r"�registerSubscriptionAdapter)r0r1r,rrr�provideSubscriptionAdapterKr.r4cCstj||dd�dSr()r"�registerHandler)r0r1rrr�provideHandlerNsr6)NNr)r�zope.interfacer�zope.interface.adapterr�zope.interface.registryr�zope.component.interfacesr�zope.component._compatrr
rrr"�zope.testing.cleanupr#�ImportErrorr%r&r-r2r4r6rrrr�<module>s0

�