@derek : request.now is just a field that represents the row that needs to 
go to the db. is then either inserted or updated accordingly to the 
record_id found (more precisely, it tries to update and then if no updates 
are detected it inserts it). at the beginning of the try_store_whatever 
there's the self._unchanged() check, that is the one "producing" the issue.

@massimo and devs: apparently this is not solvable empirically basing our 
unchanged check on the hash of the pickled string (even if deepcopying 
seems to return consistent behaviour). Given that the pickle docs doesn't 
assure that consistent strings are generated, I think the only way is to 
create a slightly different implementation of Storage for session (or just 
change the Storage implementation) to keep a record of the Storage actually 
being changed. If I'm not mistaken, it's a dict, so every call to
__setitem__
__delitem__
pop (if key exists)
setdefault (if key does not exists)
update
clear ?
needs to flip a "something" (boolean) that gets checked in the _unchanged() 
function.

On Tuesday, June 11, 2013 11:14:06 PM UTC+2, Niphlod wrote:
>
> apparently "the issue" (i.e. different strings can be generated for the 
> same object) is documented at 
> http://docs.python.org/2/library/pickle.html#id10
>>
>>
>>>>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to