File: //lib/python3.6/site-packages/zope/component/__pycache__/globalregistry.cpython-36.pyc
3
,�W�
� @ s� d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl m
Z
dd� ZG d d
� d
e�Zee�G dd� de��Z
e
d
�ZyddlmZ W n ek
r� Y nX edd� � [eZdd� Zde
fdd�Zdde
fdd�Zddd�Zddd�ZdS )zGlobal components support
� )�implementer)�AdapterRegistry)�
Components)�IComponentLookup)�_BLANKc C s
t | |�S )N)�getattr)Z
componentsZregistryName� r �$/usr/lib/python3.6/globalregistry.py�GAR s r
c s( e Zd ZdZ� 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.c s || _ || _tt| �j� d S )N)�
__parent__�__name__�superr �__init__)�self�parent�name)� __class__r r r s zGlobalAdapterRegistry.__init__c C s t | j| jffS )N)r
r r
)r r r r �
__reduce__% s z GlobalAdapterRegistry.__reduce__)r
�
__module__�__qualname__�__doc__r r �
__classcell__r r )r r r s r c @ s e Zd Zdd� Zdd� ZdS )�BaseGlobalComponentsc C s t | d�| _t | d�| _d S )N�adapters� utilities)r r r )r r r r �_init_registries+ s z%BaseGlobalComponents._init_registriesc C s | j S )N)r
)r r r r r / s zBaseGlobalComponents.__reduce__N)r
r r r r r r r r r ( s r �base)�
addCleanUpc C s
t jd�S )Nr )r r r r r r �<lambda>: s r c C s t S )N)�globalSiteManagerr r r r �getGlobalSiteManager>