IRC log of #zodb for Thursday, 2013-10-03

*** J1m_ has quit IRC00:39
*** fdrake has quit IRC02:10
*** agroszer has joined #zodb08:53
*** JaRoel|4D has quit IRC08:57
*** JaRoel|4D has joined #zodb09:43
*** MtEverest has joined #zodb12:57
MtEverestMy question is:12:57
MtEverestIn a persistent class if I have an attribute which is a simple Python list12:58
MtEverestso any changes made to that list will requirep_changed to be set or not12:58
MtEverestI mean if my class is persistent then everything inside that is automatically persistent or not12:59
agroszernope, you need to set _p_changed=True12:59
agroszeror use PersistentList12:59
agroszerinstead of a simple []12:59
MtEverestso even if my class is persistent ?12:59
agroszeryes, those are the rules13:00
MtEverestI have seen some weird behavior...some of my lists are persisted and some of them are not13:00
agroszersame goes with a dict or any muteable attribute13:00
MtEverestI mean if my list simply consists of strings then it is perissted if my class is a persistent class13:00
agroszeryeah because if the object itself gets changed, then tada _p_changed is set13:00
MtEverestbut if my list consists of some other user defined class instances then it is not13:01
agroszerthat's not because of that13:01
MtEverestthen ?13:01
agroszerif you set obj.list_attr = [yadayada]13:01
agroszerthat sets obj._p_changed = True13:01
MtEverestyes.. but in both the cases I'm using append13:02
agroszerif you do obj.list_attr.append()13:02
agroszerthat won't set _p_changed13:02
agroszerthat's how it works13:02
MtEverestbut if obj is persistent it should copy the whole object again13:02
agroszeruse simply PersistentList and be done with it13:03
MtEverestthat is what storage unit section in zodb wikipedia pge says13:03
MtEverestevery object whose class derives from Persistent is the atomic unit of storage (the whole object is copied to the storage when a field is modified).13:03
agroszeruse just PersistentList and be done with it13:08
agroszerpersistent.list.PersistentList it is13:08
MtEverestok, I defined a repoze index on one of the lists and that index doesn't work with persistent objects, I guess..13:09
MtEverestAnyway will change everything and have a relook on this13:09
MtEverestthanks agroszer13:09
agroszerpersistent/non persistent should not be an issue, unless the index looks up the class13:10
agroszerclass PersistentList(UserList, persistent.Persistent):13:11
MtEverestok, will retry13:11
*** MtEverest has quit IRC13:14
*** MtEverest_ has joined #zodb13:14
*** MtEverest_ is now known as MtEverest13:14
*** MtEverest_ has joined #zodb13:18
*** MtEverest has quit IRC13:18
*** MtEverest_ is now known as MtEverest13:18
*** JaRoel|4D has quit IRC13:27
*** JaRoel|4d has joined #zodb13:29
*** JaRoel|4d has quit IRC13:45
*** JaRoel|4d has joined #zodb13:46
*** JaRoel|4d has quit IRC13:50
*** yvl has joined #zodb14:20
*** yvl has left #zodb14:22
*** roelbruggink has joined #zodb14:31
*** J1m has quit IRC15:37
*** J1m has joined #zodb15:40
*** fdrake has joined #zodb16:05
*** agroszer has quit IRC16:39
*** roelbruggink is now known as JaRoel|4D17:38
*** JaRoel|4D has quit IRC18:39
*** JaRoel|4D has joined #zodb18:39
*** JaRoel|4D has quit IRC18:43
*** JaRoel|4D has joined #zodb19:26
*** agroszer has joined #zodb20:11
*** agroszer has quit IRC20:30
J1mGaaa, the ZEO stoage server code is just so needlessly inflexible.20:32
J1mI'm so sick of writing ZEO tests with multiple processes cuz the storage server can't run in a fricking thread.20:33
*** JaRoel|4D has quit IRC20:43
aclarkJ1m: who wrote it?21:52
J1mI'd rather not name names.21:52
*** JaRoel|4D has joined #zodb23:27

Generated by 2.15.1 by Marius Gedminas - find it at!