B
[y @ sz d dl mZ d dlZd dlmZ d dlmZmZ d dlmZ d dl m
Z
eeZ
daG dd deZG d d
d
eZdS ) )pickleN)datetime)OpenResourceNamespaceManager Container)InvalidCacheBackendError)null_synchronizerc @ sv e Zd Zi Zedd ZdddZdd Zdd Zd
d Z dd
Z
dd Zdd Zdd Z
dd Zdd Zdd ZdS )GoogleNamespaceManagerc C s@ t d k rd S ytdjjj a W n tk
r: tdY nX d S )Nzgoogle.appengine.ext.dbzCDatastore cache backend requires the 'google.appengine.ext' library)db
__import__Z appengineextImportErrorr )cls r B/opt/alt/python37/lib/python3.7/site-packages/beaker/ext/google.py_init_dependencies s z)GoogleNamespaceManager._init_dependenciesbeaker_cachec sb t | | fdd} | _tj | | _i | _d| _d| _ t
jt
k| _d| j | _dS )z%Creates a datastore namespace managerc s. t t t t d} t tjf| }|S )N)createdaccesseddata)dictr ZDateTimePropertyZBlobPropertytypeZModel)Z
table_dicttable)
table_namer r
make_cache! s
z3GoogleNamespaceManager.__init__.<locals>.make_cacheFzp%sN)r __init__r r tables
setdefaultcachehash_is_newloadedloggingDEBUGlogZgetEffectiveLevel log_debug namespace)selfr% r paramsr r )r r r s zGoogleNamespaceManager.__init__c C s t S )N)r )r&