IRC log for #storm on 20070814

00:07.02weathermanstorm/store-name r173 committed by jkakar@kakar.ca
00:07.02weatherman- Refactored ZStorm.iterstores to use _name_index (niemeyer-2).
00:14.39weathermanstorm/store-name r174 committed by jkakar@kakar.ca
00:14.40weatherman- Use weak references where possible (niemeyer-1).
00:18.44*** join/#storm jml (n=jml@ppp121-44-210-95.lns1.hba1.internode.on.net)
01:21.44tjsso I have a storm class which has an __name__ attribute which is a Unicode() descriptor
01:22.23tjsthe line is actaully:     __name__ = Unicode(default=u"No Name")
01:22.31tjswhich is on a base class
01:22.45tjsI subclass this base class, and create one
01:23.07tjsthe column contains NULL for a start
01:23.20tjs(shouldn't this be 'No Name' ?)
01:23.58tjsand when I try to access it from the debugger (in a zope process) I get: (Pdb) context.__name__
01:24.01tjs*** KeyError: <storm.properties.PropertyColumn object at 0xb03e154c>
01:35.02radixtjs: by the way, I noticed some of your comments from last night
01:35.12radixtjs: I really don't understand why you'd want __name__ = Unicode()
01:35.22radixtjs: is __name__ something that Zope gets, sets, or both?
01:35.28tjsboth
01:35.54radixtjs: and you want to store this value in the database? do you already have a column that you'd like the value to be?
01:36.11tjsnope
01:36.23radixtjs: I'm also beginning to think that maybe you want to be using an interface at a different layer; you don't really need to deal with this rubbish if you don't, if you use the low level traversal API...
01:36.25tjsI've added a __name__ column
01:36.42radix*if you don't want to
01:36.43tjsradix: yeh?
01:36.57radixwell, if I understand correctly, which I may not
01:37.06tjsradix: I still need to maintain a heirarchy
01:37.22tjswhich my Folder class does happily with a Crossref() attribute
01:37.27tjsand a dict of keys
01:37.48radixbut I certainly never had to deal with it, using the IBrowserPublisher interfac
01:37.49radixe
01:38.01tjsproblem is I -must- support the ZMI views :/
01:38.05radixoh
01:38.07tjsnot just containment
01:38.11radixI guess that is a different kind of hierarchy
01:38.20tjsyeh
01:38.24radixWhat interface is __name__ a part of?
01:38.50tjsILocation
01:39.05tjsand IContained (which just subclasses ILocation)
01:40.32tjsI think the crazy '*** FooException' errors are comming out of the security manager
01:40.45radixjesus that is a horrible interface
01:40.53tjsheh, feel my pain
01:41.45radixI guess you implement the setting of __parent__ with some descriptor that does something like set a parent_id?
01:41.51radixI guess it could be a Reference
01:43.00tjsits a Crossref descriptor
01:43.17tjswhich is my own crazy 'lets keep references to anything anywhere' thingo
01:43.20radixright, ok
01:44.27tjshm
01:45.20tjsso I create an object in the zmi (that is a storm object, with the __name__ = Unicode(default=u"no Name"))
01:45.34tjsand in the db I get NULL in the __name__ column
01:45.55tjswhat happened to my default? let alone it being set by zope
01:46.47radixhm
01:47.11radixare you sure you're seeing the same object in the database?
01:47.16radixis there some other primary key?
01:47.37radixyou might want to set allow_none=False
01:47.41tjs__name__ is not the primary key
01:47.44radixmaybe you'll find out who's setting it to None
01:48.00tjsallow_none on the class?
01:48.08radixin Unicode()
01:48.16radixUnicode(allow_none=False, default=u"no name"))
01:48.16tjsah ok
01:48.18radixs/))/)
01:50.20*** join/#storm jml (n=jml@ppp108-61.static.internode.on.net)
01:50.44tjshork
01:50.58tjsok, new object, still NULL
01:51.05tjsits not getting set
01:51.34radixand no python traceback!?
01:51.36tjsdeven with the default
01:51.38tjsnope
01:51.42radixok, so uh
01:51.45tjss/dev/ev
01:51.47radixmaybe the schema should say NOT NULL :)
01:52.13radixjust an idea, but hopefully you'll see an error *somewhere* if you do that
01:52.13tjsthat should not matter if there is a value to be set though?
01:52.17tjsok
01:52.21tjssec
01:52.47tjsdid you know that rolled back transactions consume auto incrementing ids ?
01:52.55tjsjust an asside
01:52.58tjs:)
01:54.07radixI was a bit surprised to see that
01:54.11radixbut I guess it's not really a big deal
01:54.15radixor at least it shouldn't be :)
01:54.26radixactually, was I surpriseD?
01:54.28radixmaybe I'm not
01:54.34radixI'm trying to remember about the first time I heard about that ;)
01:54.41radixit definitely is the only thing that makes sense
01:58.14tjsargh I'm a spaz
01:58.18tjsedited the wrong table
01:58.20tjssec
02:02.35tjsradix: http://rafb.net/p/oUfVoP90.html
02:03.09radixhuh
02:03.13radixthat looks like an empty string
02:03.56tjsyeh it is now
02:04.04tjsafter adding the NOT NULL
02:04.29tjsits still not the default
02:05.50tjshttp://rafb.net/p/OVGQb328.html
02:06.01tjs^^ the classes in question, from various modules
02:06.14tjsthe last one is the folder I'm adding
02:22.04tjsradix: *argh*
02:22.26tjsok I dropped a set_trace in storm.properties.Property.__set__
02:22.34tjsthen created an object
02:22.51tjsthe table gets populated with the table defaults
02:23.00tjs__set__ does not get called at all
02:29.52tjslunching
04:17.06*** join/#storm oubiwann (n=oubiwann@c-75-71-99-53.hsd1.co.comcast.net)
04:52.43tjsis there some way to use a different column name for an attribute than the attribute's name?
04:53.23tjsie: flibble = Int(really_use_column="blibble")
04:56.16tjsoh
04:56.17tjsname
04:56.20tjs*halo*
04:56.23jkakartjs: I'm not sure if this'll work, but you can pass name I think.
04:56.26jkakartjs: D'oh.
04:56.30jkakartjs: Perfect timing. ;)
04:56.41tjs:)
04:57.04tjsstorm freaks out if I make a property called __name__
04:57.13tjsI can have __anythingelse__
05:19.27jkakarOh, weird.
05:21.17jkakartjs: Is the __name__ you're using clashing with the builtin __class__.__name__, perhaps?
05:22.15tjshttp://rafb.net/p/diFvqQ67.html
05:22.25tjsjkakar: minimal non-working example
05:22.31tjsits ok, I got around it
05:22.46tjsI added a zope_name and made a property for __name__
05:23.19jkakarHuh, weird.
06:21.10*** join/#storm jukart (n=jukart@lsfw01.lovelysystems.com)
07:31.43*** join/#storm mcella (n=michele@ip-132-247.sn2.eutelia.it)
08:09.08*** join/#storm Fujitsu (n=fujitsu@ubuntu/member/fujitsu)
09:15.36*** join/#storm jml_ (n=jml@ppp121-44-210-95.lns1.hba1.internode.on.net)
11:24.29*** join/#storm Fujitsu (n=fujitsu@ubuntu/member/fujitsu)
11:33.11*** join/#storm Fujitsu (n=fujitsu@ubuntu/member/fujitsu)
12:20.02*** join/#storm jml (n=jml@ppp121-44-210-95.lns1.hba1.internode.on.net)
12:37.33*** join/#storm niemeyer (n=niemeyer@modemcable178.77-70-69.static.videotron.ca)
14:25.08*** join/#storm rafael (n=rafael@moinmoin/fan/rafael)
16:47.38weathermanstorm/cambridge-storm-talk r175 committed by radix@twistedmatrix.com
16:47.39weatherman1:N references
17:14.51weathermanstorm/store-name r175 committed by jkakar@kakar.ca
17:14.51weatherman- Replace dict with WeakKeyDictionary to ensure Store instances don't
17:14.51weatherman<PROTECTED>
18:07.56weathermanstorm/store-name r176 committed by jkakar@kakar.ca
18:07.56weatherman- Merged trunk.
18:53.58*** join/#storm rafael (n=rafael@moinmoin/fan/rafael)
19:57.28*** join/#storm ajmitch (n=ajmitch@ubuntu/member/ajmitch)
20:11.10weathermanstorm/cambridge-storm-talk r176 committed by radix@twistedmatrix.com
20:11.10weathermanM:N references and very minor refactoring
21:52.47weathermanstorm/cambridge-storm-talk r177 committed by radix@twistedmatrix.com
21:52.47weathermanadd the .odp file for my slides and also tweak the .txt a bit
22:17.18tjsmorning
22:21.15niemeyertjs: Morning!
22:21.56tjsniemeyer: hey :)
23:10.20*** join/#storm jml (n=jml@ppp121-44-210-95.lns1.hba1.internode.on.net)
23:27.32tjscan default arg be a callable?
23:27.42tjsthat would be kinda nice
23:28.37radixyes
23:28.45tjscool
23:28.57tjsso DateTime(default=time.now)
23:29.02tjsor something
23:29.04radixyep
23:29.08tjsgroovy
23:35.03tjser..
23:35.12tjsguys
23:35.21tjsOperationalError: (2006, 'MySQL server has gone away')
23:35.33tjsZStorm does not try to reconnect?
23:37.04tjsthat is kinda an issue

Generated by irclog2html.pl Modified by Tim Riker to work with infobot.