3
,W
@ s d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl m
Z
dd ZG d d
d
eZeeG dd deZ
e
d
ZyddlmZ W n ek
r Y nX edd [eZdd Zde
fddZdde
fddZdddZdddZdS )zGlobal components support
)implementer)AdapterRegistry)
Components)IComponentLookup)_BLANKc C s
t | |S )N)getattr)Z
componentsZregistryName r $/usr/lib/python3.6/globalregistry.pyGAR s r
c s( e Zd ZdZ fddZdd 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__)selfparentname) __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 )Nadapters 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 jdS )Nr )r r r r r r