Turns out the deepcopy has some problems:
1) breaks backward compatibility
2) it is limiting because people may want to cache live objects
3) it cannot work unless we deepcopy no storage and retrival which
would make things slow.

Please check trunk again. I think the release is back.


On Nov 7, 10:19 am, Iceberg <[email protected]> wrote:
> Wow, the shallowcopy old days come back!  ^o^
>
> One more typo. You forgot the "self.locker.release()" in line 181 of
> cache.py in latest fix. I tried put it back and then everything is
> smooth again.
>
> On Nov7, 11:32pm, mdipierro <[email protected]> wrote:
>
> > OK. Please try trunk again.
>
> > On Nov 7, 12:20 am, Iceberg <[email protected]> wrote:
>
> > > Bad news. My app is still broken with the latest trunk, when using
> > > reference field. Put the following code in your model.
>
> > > db.define_table('task',
> > >   Field('name'),
> > >   )
>
> > > db.define_table('schedule',
> > >   Field('task',db.task,
> > >     represent=lambda value,tasks=dict([x.id, x.name]
> > >       for x in db().select(db.task.ALL,cache=(cache.ram,3600*24))
> > >       ):tasks.get(value,'')
> > >     ),
> > >   )
>
> > > Then access the table "schedule" in admin. You will encounter the
> > > "KeyError: '0'" again. :-(
>
> > > Apart from the deepcopy issue, why recent feature need to somehow
> > > change the cached object? I am missing the old days... :-(
>
> > > Regards,
> > > Iceberg
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to