diff --git a/VERSION b/VERSION index 55b1bcfc..c1f5b7e4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.00.0 (2012-07-16 22:48:56) dev +Version 2.00.0 (2012-07-17 10:35:39) dev diff --git a/gluon/cache.py b/gluon/cache.py index a2c68164..14006087 100644 --- a/gluon/cache.py +++ b/gluon/cache.py @@ -381,6 +381,8 @@ class CacheOnDisk(CacheAbstract): class CacheAction(object): def __init__(self,func,key,time_expire,cache,cache_model): + self.__name__ = func.__name__ + self.__doc__ = func.__doc__ self.func = func self.key = key self.time_expire = time_expire @@ -388,9 +390,9 @@ class CacheAction(object): self.cache_model = cache_model def __call__(self,*a,**b): if not self.key: - key2 = self.func.__name__+':'+repr(a)+':'+repr(b) + key2 = self.__name__+':'+repr(a)+':'+repr(b) else: - key2 = self.key.replace('%(name)s',self.func.__name__)\ + key2 = self.key.replace('%(name)s',self.__name__)\ .replace('%(args)s',str(a)).replace('%(vars)s',str(b)) cache_model = self.cache_model if not cache_model or isinstance(cache_model,str): @@ -473,11 +475,7 @@ class Cache(object): """ def tmp(func,cache=self,cache_model=cache_model): - action = CacheAction(func,key,time_expire,self,cache_model) - action.__name___ = func.__name__ - action.__doc__ = func.__doc__ - return action - + return CacheAction(func,key,time_expire,self,cache_model) return tmp def lazy_lazy_cache(key=None,time_expire=None,cache_model='ram'): diff --git a/gluon/dal.py b/gluon/dal.py index 2b2d412c..f6bb3f5e 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -2170,6 +2170,8 @@ class PostgreSQLAdapter(BaseAdapter): return varquote_aux(name,'"%s"') def adapt(self,obj): + #if self.driver == self.drivers.get('pg8000'): + # obj = str(obj).replace('%','%%') return psycopg2_adapt(obj).getquoted() def sequence_name(self,table):