IRC log of #zope3-dev for Tuesday, 2005-04-19

*** RaFromBRC is now known as RaFromBRC|afk00:09
*** ccrownhart has quit IRC00:38
*** ccrownhart has joined #zope3-dev00:39
*** Theuni has quit IRC01:00
*** bskahan has joined #zope3-dev01:29
*** yota has quit IRC01:42
*** mohsen has joined #zope3-dev01:43
*** tvon has joined #zope3-dev01:44
*** bskahan has quit IRC02:21
*** dtremea has joined #zope3-dev02:23
*** deo has quit IRC02:25
*** dtremea is now known as deo02:26
*** RaFromBRC|afk is now known as RaFromBRC02:34
*** bradb has quit IRC02:49
*** mohsen has quit IRC02:55
*** bskahan has joined #zope3-dev03:07
*** vlado has joined #zope3-dev03:22
*** bskahan has quit IRC03:38
*** BjornT has quit IRC03:46
*** ignas has joined #zope3-dev03:57
*** philiKON has quit IRC04:26
*** hazmat has quit IRC04:45
*** BjornT has joined #zope3-dev04:57
*** vlado has quit IRC05:01
*** stub has joined #zope3-dev05:07
*** tvon has quit IRC05:20
*** ignas has quit IRC05:21
*** hazmat has joined #zope3-dev05:31
*** bradb has joined #zope3-dev05:37
*** philiKON has joined #zope3-dev06:10
*** hazmat has quit IRC07:07
*** BjornT has quit IRC07:45
*** viyyer has joined #zope3-dev08:02
*** philiKON has quit IRC08:04
*** stub has quit IRC08:05
*** zagy has joined #zope3-dev08:13
*** `anthony has quit IRC08:26
*** hazmat has joined #zope3-dev08:38
*** d2m has quit IRC08:56
*** yota has joined #zope3-dev09:02
*** viyyer has quit IRC09:12
*** viyyer has joined #zope3-dev09:13
*** kaczordek has joined #zope3-dev09:13
*** yota has quit IRC09:16
*** Damascene has quit IRC09:16
*** VladDrac has quit IRC09:16
*** Jim7J1AJH has quit IRC09:16
*** yota has joined #zope3-dev09:16
*** Damascene has joined #zope3-dev09:16
*** VladDrac has joined #zope3-dev09:16
*** Jim7J1AJH has joined #zope3-dev09:16
*** Damascene has quit IRC09:18
*** VladDrac has quit IRC09:18
*** yota has quit IRC09:18
*** Jim7J1AJH has quit IRC09:18
*** yota has joined #zope3-dev09:19
*** Damascene has joined #zope3-dev09:19
*** VladDrac has joined #zope3-dev09:19
*** Jim7J1AJH has joined #zope3-dev09:19
*** Damascene has quit IRC09:19
*** VladDrac has quit IRC09:19
*** yota has quit IRC09:19
*** Jim7J1AJH has quit IRC09:19
*** yota has joined #zope3-dev09:19
*** Damascene has joined #zope3-dev09:19
*** VladDrac has joined #zope3-dev09:19
*** Jim7J1AJH has joined #zope3-dev09:19
*** VladDrac has quit IRC09:20
*** Damascene has quit IRC09:20
*** hdima has joined #zope3-dev09:20
*** VladDrac has joined #zope3-dev09:20
*** yota has quit IRC09:21
*** Jim7J1AJH has quit IRC09:21
*** viyyer has quit IRC09:21
*** kaczordek has quit IRC09:21
*** tonico has quit IRC09:21
*** hdima has quit IRC09:21
*** zagy has quit IRC09:21
*** deo has quit IRC09:21
*** th1a has quit IRC09:21
*** mkerrin has quit IRC09:21
*** Aiste has quit IRC09:21
*** robertu has quit IRC09:21
*** srichter has quit IRC09:21
*** srichter has joined #zope3-dev09:22
*** hdima has joined #zope3-dev09:22
*** kaczordek has joined #zope3-dev09:22
*** robertu has joined #zope3-dev09:22
*** mkerrin has joined #zope3-dev09:22
*** tonico has joined #zope3-dev09:22
*** Aiste has joined #zope3-dev09:22
*** th1a has joined #zope3-dev09:22
*** deo has joined #zope3-dev09:22
*** zagy has joined #zope3-dev09:22
*** viyyer has joined #zope3-dev09:22
*** irc.freenode.net sets mode: +o srichter09:22
*** kaczordek has quit IRC09:22
*** tonico has quit IRC09:22
*** mkerrin has quit IRC09:22
*** hdima has quit IRC09:22
*** th1a has quit IRC09:22
*** deo has quit IRC09:22
*** zagy has quit IRC09:22
*** Aiste has quit IRC09:22
*** srichter has quit IRC09:22
*** robertu has quit IRC09:22
*** viyyer has quit IRC09:22
*** bradb has quit IRC09:22
*** hazmat has quit IRC09:22
*** RaFromBRC has quit IRC09:22
*** vinsci has quit IRC09:22
*** srichter has joined #zope3-dev09:26
*** vinsci has joined #zope3-dev09:26
*** RaFromBRC has joined #zope3-dev09:26
*** hazmat has joined #zope3-dev09:26
*** robertu has joined #zope3-dev09:26
*** mkerrin has joined #zope3-dev09:26
*** tonico has joined #zope3-dev09:26
*** Aiste has joined #zope3-dev09:26
*** th1a has joined #zope3-dev09:26
*** deo has joined #zope3-dev09:26
*** zagy has joined #zope3-dev09:26
*** viyyer has joined #zope3-dev09:26
*** kaczordek has joined #zope3-dev09:26
*** hdima has joined #zope3-dev09:26
*** yota has joined #zope3-dev09:26
*** Jim7J1AJH has joined #zope3-dev09:26
*** bradb has joined #zope3-dev09:26
*** irc.freenode.net sets mode: +o srichter09:26
*** sashav_ has joined #zope3-dev09:32
*** `anthony has joined #zope3-dev09:36
*** Theuni has joined #zope3-dev10:00
*** vlado has joined #zope3-dev10:37
*** mkerrin has quit IRC10:39
*** MrTopf has joined #zope3-dev10:40
*** lunatik has joined #zope3-dev10:44
*** lunatik has left #zope3-dev10:55
*** vlado has quit IRC11:01
*** __gotcha has joined #zope3-dev11:02
*** RaFromBRC has quit IRC11:44
*** viyyer has quit IRC11:53
*** viyyer has joined #zope3-dev11:54
*** Aiste has quit IRC11:58
*** efge has joined #zope3-dev12:01
*** tav|offl1ne has quit IRC12:19
*** philiKON has joined #zope3-dev12:23
*** mgedmin has joined #zope3-dev13:00
*** gintas has joined #zope3-dev13:06
*** `anthony has quit IRC13:11
*** vlado has joined #zope3-dev13:15
*** kaczordek has quit IRC13:18
*** stub has joined #zope3-dev13:21
*** ChrisW has joined #zope3-dev13:24
ChrisWany codespeak people here?13:24
* ChrisW pokes philiKON: alive? ;-)13:25
srichtermaybe you should try #z3-base?13:27
* ChrisW tries, suffering really bad deja vu here...13:27
*** srichter has quit IRC13:29
*** `anthony has joined #zope3-dev13:40
*** philiKON has quit IRC13:57
*** apoirier has joined #zope3-dev14:30
*** philiKON has joined #zope3-dev14:31
*** faassen has joined #zope3-dev14:41
*** mohsen has joined #zope3-dev14:46
*** MrTopf has quit IRC14:48
*** gintas has quit IRC14:49
*** srichter has joined #zope3-dev14:49
*** ChanServ sets mode: +o srichter14:49
*** robertu has left #zope3-dev14:53
*** regebro has joined #zope3-dev15:10
*** BjornT has joined #zope3-dev15:12
srichtermgedmin: you wrote the recorder code, right? or was it alga?15:17
philiKONsrichter, btw, when you reimplement graceful shutdown, can it be in a way that all kinds of server control is factored into an API that server implementations can plug into15:19
*** ChrisW has left #zope3-dev15:19
philiKONsrichter, so it wouldn't be twisted specific15:19
philiKONsrichter, i might actually want to use this from modzope, too15:19
srichterwell, graceful shutdown is simply reactor.stop()15:19
srichterI am not planning to do more at this point, but please feel free to mess with the branch15:20
philiKONhmmm15:20
philiKONnaww15:20
srichterbtw, I think we really should consider to use Twsited's deamon, twistd15:21
srichter(and just rename it)15:21
faassensrichter: just import the right bits in your own file.15:21
faassensrichter: I hope. instead of a straight copy and rename..15:21
srichterwe will have to run through a lot of hoops to get restart working otherwise15:21
mgedminsrichter, it was I15:22
faassenmgedmin: "It was I", how posh. :)15:22
srichtercurrently the problem is that the entire server control is located in zope.app.server, which is by definition specific to the server we decide to use by default15:22
faassenmgedmin: do you also say "it was he"? :)15:23
srichterthe code should move out, if we want to abstract this15:23
*** ChrisW has joined #zope3-dev15:23
srichtermgedmin: ok, I am trying to reimplement it using Twsited right now, so I need you to look at it once I am done15:24
*** ignas has joined #zope3-dev15:24
ChrisWJim around anywhere?15:24
srichterChrisW: too early15:24
srichtertry in another hour, but Jim is busy with his customer project, so he might not come online15:24
ChrisW*nods*15:25
ChrisWcustomer project in Z3?15:25
srichteryep15:25
philiKONof course :)15:25
ChrisWcoool :-)15:25
ChrisWanyone using the twisted servers stuff in production?15:25
ChrisWI'm pretty excited about that :-)15:25
regebroIn production? Wasn't it like finished yesterday? :)15:26
Theuniso it could be in production for 24h already?15:27
srichterhhooooooooooooooollllllllllllllllllllddddddddd on!15:27
philiKON:)15:27
srichter:-)15:27
ChrisWhehe15:27
faassenwell, if it wasn't Stephan who built this, I would say no, that wouldn't be the case.15:27
srichterthe twisted integration uses twsited code that has not been released yet15:27
srichterwe are working off the trunk15:28
faassenbut Stephan might've made it go into production a few hours ago.15:28
faassenafter staying up all night or something. :)15:28
ChrisWhehe15:28
srichter"foom" (James Knight) is currently implementing a new HTTP serber, twisted.web2, and our feedback has stabalized it quiet a bit; but more work needs to be done.15:28
srichter"spiv" (whose real name just slipped my mind) will tackle the horribly broken twisted.protocol.ftp code for us, so we can have a useful FTP server15:29
srichterbefore those are not done, I cannot merge it to the trunk15:29
srichter(though I would claim that running the simple HTTP and HTTPS server should be fairly stable at this point)15:30
srichterfoom fixed several problems that were caused by hooking up Zope 3 via WSGI15:30
philiKONwell, we can only merge to trunk if the twsited integration performs as well as the zserver one... that includes ftp15:30
ChrisW*nods*15:30
ChrisW"perfoms as well" seems a little wooly ;-)15:31
faassensrichter: plus those need to be released, right?15:31
faassensrichter: we don't want to be depending on a twisted trunk with the zope 3 trunk, right?15:31
philiKONalso, x3.1 needs to be branched15:31
faassenphiliKON: that goes without saying. :)15:31
srichterBTW, just in case you guys did not get the right vibe from my ML messages: WSGI is not the holy grail everybody thinks it is. It masterfully separates server from application, but due to its generality one must define proprietary extensions to hook up a high-quality server and app as Twisted and Zope are15:32
srichterfaassen: there will be probably releases just for us :-)15:32
faassensrichter: there might be good feedback to the web sig.15:32
faassensrichter: cool.15:32
faassensrichter: that you guys can prepare now.15:32
philiKONsrichter, what are those so-called "propietary" extensions?15:33
philiKONi'm very interested in the wsgi story15:33
srichterthere are several:15:33
faassensrichter: so that perhaps a discussion can be done about extending WSGI. I'm not sure whether that makes sense and what the consequences of the proprietary are exactly..I mean, impact on WSGI compliance.15:33
srichter- We need to be able to send additional info for logging purposes15:33
faassensrichter: but I'm sure it'd be good to talk about it to the guys who came up with WSGI.15:33
srichter- We need some additional info for client certificate management15:34
philiKONhow do you deal with this additional info for now?15:34
srichterfaassen: I want to understand the limitations better first and come up with a solution with foom; then we can give constructive critiques with working implementations15:35
srichterphiliKON: we will extend the wsgi header namespace, I think15:35
*** ChrisW has left #zope3-dev15:35
srichterfor example: wsgi.logginginfo.XXXX (i.e. wsgi.logginginfo.totalBytesSent)15:35
srichterwe have not discussed SSL in detail yet15:36
srichterfaassen: the extensions to WSGI would degrade gracefully, of course15:36
faassensrichter: okay, as long as that dialog happens. I think it's important that Zope 3 reaches out and says, hey, this stuff is great, and then perhaps adds a bit like "but this would improve it a bit, can we work with you?"15:38
srichterright15:38
faassensrichter: so all this work is excellent, as it does exactly that, quite apart from the great technical benefits. :)15:38
srichterI just want to do this together with the twisted developers; this way we are not alone15:39
faassensrichter: makes sense.15:39
srichterbut this means that we have to be all on the same page15:39
faassensrichter: I think that is great. :)15:39
philiKONsrichter, that's good. as long as it's documented in a README.txt somewhere, i'll be fine and can reproduce it15:39
*** bradb has quit IRC15:40
philiKONit's also great to see how twsited and zope are reusing each other's parts15:40
srichterI am really happy how the twisted people and I interacted this weelend; it was very productive and they are extremely responsive15:40
srichteryep15:40
*** bskahan has joined #zope3-dev15:41
*** gintas has joined #zope3-dev15:41
*** sashav_ has quit IRC15:43
*** MrTopf has joined #zope3-dev15:49
*** viyyer has quit IRC15:58
*** bradb has joined #zope3-dev16:01
*** [apoirier] has joined #zope3-dev16:04
philiKONTheuni, please don't forget to set svn:eol-style=native on text files... it's a repository rule...16:05
*** apoirier has quit IRC16:06
*** bradb has quit IRC16:13
*** bradb has joined #zope3-dev16:16
TheuniphiliKON:  narf. i'm sorry. I thought my configuration is already in place for svn.zope.org16:16
Theunigonna review that16:17
philiKONTheuni, np; just letting you know16:17
Theunithanks16:17
philiKONwe had some cases where windows users would modify a file and check it in and the diff would go over all lines because the line endings changed...16:18
*** bradb has quit IRC16:19
*** Aiste has joined #zope3-dev16:21
*** bradb has joined #zope3-dev16:24
*** niemeyer has joined #zope3-dev16:41
*** BjornT has quit IRC16:48
*** ignas has quit IRC17:09
*** BjornT has joined #zope3-dev17:14
*** MacYET_ has joined #zope3-dev17:25
MacYET_morning17:26
*** Damascene has joined #zope3-dev17:26
srichterMacYET_: hi17:27
*** ignas has joined #zope3-dev17:27
srichtermgedmin: Are you still working on ZODBBasedRequestStorage or have you given up?17:27
srichtermgedmin: I am asking, because I will remove it otherwise17:28
MacYET_hi sr17:28
srichterMacYET_: how is it going?17:28
MacYET_fighting with five17:28
MacYET_:)17:28
srichteroh, can't help you there :-)17:28
MacYET_hehe17:29
MacYET_ <utility> is a zcml directive?17:30
srichteryes17:30
* MacYET_ wonders why it is not described in philikons book :)17:30
srichterit isn't? wew.17:31
MacYET_ups, it is17:31
MacYET_fucked up xml namespaces17:31
MacYET_:)17:31
srichter:-)17:31
MacYET_component takes an instances and factory take a factory which would act as the component argument17:32
MacYET_?17:32
mgedminsrichter: Ruslan Spivak sent me a couple of patches to make ZODBBasedRequestStorage work17:32
mgedminI wasn't entirely happy with those patches, though, so I didn't apply them17:33
srichterok, so I leave it around17:33
mgedmin(I don't like calling connection.sync in random places when it aborts the current transaction with unknown changes)17:33
srichterthough I am not sure it will all work the same under twisted17:33
mgedminpersonally I wouldn't mind at all if ZODBBasedRequestStorage disappeared17:33
srichterok, then I remove it17:33
srichterwe really do not need it17:33
srichtera simple dict is enough anyways17:34
srichterother than that I got the code working under twisted17:34
srichterseems even a bit clearner :-)17:34
mgedminwell, if you have a dict, you have to worry about thread-safety yourself17:34
srichterMacYET_: this did not make sense :-)17:35
srichtermgedmin: right, but you handle that in RequestStorage already17:35
MacYET_i am just confused :;)17:35
srichtermgedmin: RequestStorage is effectively a simple dict + thread locking17:35
srichterMacYET_: can you rephrase?17:36
MacYET_...still trying and cursing :)17:36
srichtermgedmin: I wish we could provide a simpler method for functional doc tests17:40
*** hdima has quit IRC17:40
srichtermgedmin: I like the regulaar functional testing API much better17:40
srichterwhere I can pass in my environment variables via a dictionary17:41
*** srichter has quit IRC17:42
*** gintas has quit IRC17:42
MacYET_I tried to register a component as utilitiy. the unittest for the component pass incluing verfiyClass() but provideUtility refuses to register the component17:42
*** ChanServ sets mode: +o hazmat17:46
*** srichter has joined #zope3-dev17:48
mgedminsrichter, are you talking about forms?17:51
* MacYET_ throws philikons book into the trashcan...trying sr's bock17:51
*** ChanServ sets mode: +o srichter17:51
srichtermgedmin: yeah17:51
srichterMacYET_: I think you will do fine with both :-)17:51
srichterMacYET_: btw, if you install pure Zope 3, the API docs will help you too17:52
srichterI think they are very useful17:52
srichterI think it is very useful17:52
srichterhttp://localhost:8080/++apidoc++17:52
MacYET_may i bother you?17:53
srichterMacYET_: sure17:54
MacYET_ok17:54
MacYET_I have IStopwords and a class Stopwords implementing IStopwords17:54
MacYET_<utility provides=".interfaces.IStopwords" component=".stopwords.Stopwords"/> should be enough to register the class as utility?17:55
srichterI think you need to use factory instead component17:56
srichterbecause component expects an isntance of Stopwords17:56
srichterbasically, the component must provide IStopwords, not implement it17:56
srichterhold on, I am right back17:57
*** srichter has quit IRC17:57
MacYET_how can i pass an instance inside zcml ?17:57
MacYET_component=".stopwords.Stopwords()" ?17:57
Theunii think you would have to to a = Stopwords() within stopwords and refer to it via the dotted name (".stopwords.a")17:58
*** srichter has joined #zope3-dev17:58
* MacYET_ shakes his head against the wall...ok course17:58
Theunithis is pretty much a singleton thingy AFAIK17:58
srichterback17:58
*** ChanServ sets mode: +o srichter17:58
* Theuni tried to jump in as a hot spare17:59
srichtercool :-)17:59
* MacYET_ resyncs Theuni 17:59
Theuni*chrckkkksssss17:59
Theuni*pling17:59
MacYET_thanks, this works18:00
Theuninp18:01
Theunididn't touch z3 since 4 months though ;)18:01
Theuni(hmm. but still i'm currently writing the certification documentation on it.)18:01
Theunithis really feels 100% scary.18:01
* MacYET_ wrote his first utility18:01
MacYET_:))18:01
Theuni*congrats18:01
srichteryipee!18:02
philiKONMacYET_, what's up?18:05
MacYET_nothing :)18:05
philiKONok18:05
philiKONi'm open to criticism :)18:05
MacYET_you mentions <utility> in your mail but the chapter on utilities in your book does not mention it18:06
philiKONwhat chapter do you mean?18:07
MacYET_about local utiliies18:08
philiKONno, i mention them a couple of chapters before18:08
philiKONe.g. in chapter 1618:09
philiKONexample 16.3.418:09
philiKONshows the <utility /> directive18:09
philiKONand, of course, the zcml appendix has an entry on zope:utility18:09
*** tarek_away has joined #zope3-dev18:09
MacYET_then the index sucks18:10
philiKONok, that might be a good point18:10
* philiKON makes a note18:10
*** Aiste has quit IRC18:11
MacYET_but it works now18:11
MacYET_*being happy*18:11
philiKON:)18:11
*** MrTopf has quit IRC18:11
philiKONMacYET_, thanks for the input, i'll see to it that utilities will be explained earlier18:13
philiKONand appear in the index18:14
philiKONor, rather, appear in the index better18:14
MacYET_:-)18:16
MacYET_much more to come :)18:16
philiKONwell, bring it on18:17
philiKON:)18:17
* bradb tries to figure out a good reason for why foo.bar = baz appears to simply ignore .bar's constraint.18:17
philiKONis foo.bar a FieldProperty?18:17
philiKONor why do you expect it to validate according to a constraint?18:18
bradbfoo is an SQLObject-based content class that provides a schema in which .bar has a constraint. i expect this constraint to be triggered every time i go to set .bar so that Zope 3 helps me avoid setting a value on that attribute that i don't want (just like it Just Works, if done via a form.)18:19
*** mkerrin has joined #zope3-dev18:20
bradbit's not much use if it Just Works when done via a browser:editform but sneaks up and surprises me but not Just Working when i set foo.bar directly in Python code.18:20
bradbs/but not/by not/18:20
philiKONbradb, well, it's still just a python class; python does no checking itself18:20
philiKONif you want explicit checking even at the python class level, you'll have to use FieldProperty18:21
philiKONthat'll validate every value set to an attribute according to a schema field18:21
bradbphiliKON: it should Just Work. just like it'll work for permission checking and ensuring that an attribute i'm trying to access is allowed (i.e. not a ForbiddenAttribute, or whatever the exception is.)18:21
philiKONzope doesn't magically change the semantics of your classes18:22
philiKONuse FieldProperty in your class definition and it'll look from the outside as if it Just Works18:22
bradbphiliKON: i'm asking it to enforce the contract i signed with it18:22
*** tvon has joined #zope3-dev18:22
philiKONyes. you'll have to do that explicitly18:22
bradbphiliKON: i think the real problem here is perhaps a missing proxy. (i.e. i would have expected that just like zope 3 can security proxy my classes to enforce my permission configuration, that it also would wrap my classes so that the constraints just work.)18:23
philiKONwell, it doesn't...18:24
bradbphiliKON: you're assuming a heck of a lot by thinking I can use FieldProperty in my class's definition :)18:24
philiKONtrue18:24
philiKONyou probably cannot because of SQLObject18:24
bradbphiliKON: Would you agree that this should Just Work, or do you think that foo.bar = <whatever> bypassing constraint validation is a more productive route for the user of Zope 3?18:24
bradb(user, i.e. a Z3 developer :)18:25
bradbphiliKON: (and yes, you're 100% right about the note about sqlobject :)18:25
philiKONa z3 developer is a python developer who knows (or should know) that a) all contracts we make about objects and classes are not enforced automatically and b) that contracts have to be enforced manually18:26
bradbphiliKON: in general, i don't want to be a slave to Zope 3 for my content classes anyway, even if i'm not using sqlobject.18:26
bradbphiliKON: a and b were the same thing there :)18:27
bradbphiliKON: but i disagree with your statement18:27
philiKONyeah, i just realized that18:27
philiKONwe don't want to introduce strong typing18:27
bradbphiliKON: z3 enforces that an attribute is accessible, for example, as long as its security-proxied. i'd call this as "automatic" as anything. i want that same kind of enforcement for the contract i sign about field-level validation.18:28
bradbs/its/it's/18:28
philiKONyou put these two things, security and validation, on the same level18:29
philiKONbut they're not18:29
philiKONsecurity proxying is about protecting objects and data to the outside18:29
philiKONvalidation is about internal data integrity18:29
bradbphiliKON: they're both part of the contract i signed.18:29
philiKONsomething that an implementation should take of itself18:29
philiKONsecurity isn't part of any contract18:30
philiKONalso, there are a thousand subtleties that will make automatic validation of instance attributes a pain in the ass18:33
philiKONimagine constraints (so-called invariants) that are about two fields, not just one18:33
bradbphiliKON: "i'll provide you this interface if you have this permission". if i have that permission, i go to read the interface, and it's somewhat misleading. it'll tell me things about what attributes there are, but i might as well ignore what the schema is documenting about constraints, because they won't be enforced automatically anyway (except in certain cases, like if i'm changing this thing through an edit form.)18:33
philiKONwhy are you bringing security into this?18:34
bradbphiliKON: so? that's what programmers are for. :) we solve the hard problems so that users of our software don't have to work so hard. the programmers serve the users (in open source, those are often the same people :), but not vice versa.18:34
philiKONwell... i'm just saying that what you want will make a lot of other stuff ambiguous or simply break18:35
philiKONwho says when validation is to happen?18:36
philiKONmaybe you randomly change data on an object and only require it to be validated according to the schema at the end of the transaction18:36
philiKONmaybe it always needs to be in shape18:36
philiKONthis is all application level18:36
bradbphiliKON: we don't have to mention security in this. it would be enough, for example, for you to try and convince me that it's a good thing that constraint validation Just Works when i edit an object through a form, but doesn't Just Work when i edit the object through Python code. ;) (and, i'm not even wanting to imply that i *expect* somebody should have already fixed this breakage; i'm first trying to get you to agree that having this wo18:36
bradbrk properly will make Z3 developers' lives easier. :)18:36
philiKONand it is the responsbility of the data store18:36
bradbphiliKON: well, the edit form manages to get this right, right? :)18:37
philiKONwell, you maybe think it makes your life easier because you seemed to simply expect it to Just Work?18:37
bradbphiliKON: yes, like it does on edit forms.18:37
philiKONthey don't validate objects though18:37
philiKONwell, edit forms are not "Just work"18:38
philiKONyou're an application developer, you know that the automated edit forms are sophisticated things18:38
philiKONyou know that widgets validate form data18:38
philiKONthat's what you EXPECT from them18:38
philiKONi don't think you can expect it from regular python arithmetic, though18:38
philiKONhaving things magically work was one of the biggest mistakes of zope 218:39
bradbphiliKON: what's the point of putting constraint=foo in a field definition then?18:40
bradbwhat does that buy me?18:40
philiKON*when* you do validation, you do it by the constraint18:40
*** vlado has quit IRC18:40
philiKONit's nothing that buys you something automatically18:41
philiKONvalidation is 100% application policy18:42
philiKONhaving a policy imposed on you by the system would be very inconvenient18:42
bradbphiliKON: why does it do it in edit forms then?18:43
philiKONbecause that's the policy edit forms happen to have18:43
philiKONnobody's forcing you to use them18:43
faassenbradb: I thought there was somekind of framework built on schema that could validate object set accesses.18:43
bradbphiliKON: IOW, that's the system imposing a policy on me :)18:43
faassenbradb: but I'm not sure how well that works or where it is.18:43
philiKONfaassen, there's fieldstorage18:43
philiKONfaassen, but it only works where you store data in __dict__18:43
philiKONfaassen, bradb is using sqlobject18:43
faassenoh, it'd be nice if you could validate dictionaries.18:44
faassenyou cannot do taht anymore?18:44
philiKONno18:44
faassenearly on I had a function that did that.18:44
philiKONyou could once18:44
philiKONyes18:44
philiKONit got removed18:44
philiKONi always wondered why18:44
faassenis that what brad wants?18:44
philiKONit was very useful18:44
bradbfaassen: from what i read about how to do it in src/zope/schema/README.txt it looks like something that costs quite a lot of money to create and maintain.18:44
faassenbradb: what is it exactly that you want, I missed a bit..18:44
philiKONfaassen, bradb wants that every python statement like  foo.bar = baz  triggers an automatic validation whether baz is a fitting value for the bar attribute on foo18:45
bradbfaassen: in the same way that it would have been triggered if i set foo.bar to baz via an edit form18:45
faassenphiliKON: I don't believe that's evil to want. even if you only used it as a testing and debugging aid.18:45
philiKONit's not evil to want18:45
faassenstatic checking isn't evil either, nor is runtime assert checking.18:45
philiKONbut you should turn that knob in your app18:46
philiKONnot in zope 318:46
philiKONand it's only too bad that there's no knob for your situation18:46
faassenyou should be able to say that an object needs this kind of checking.18:46
faassenZope 3 shouldn't be automatically checking this everywhere, as in some cases you don't want this to happen.18:46
philiKON"an object" meaning objects of this type18:46
philiKONthis particular type18:46
faassenand you'd duplicate it if it were for form data.18:46
faassenonce in the form handling, and then you'd have it once again when setting data.18:47
faassenbradb: so you want a global policy that did that? you'd need to subclass all the classes from some base class and tell everybody to do it. :)18:47
faassenbradb: or perhaps the proxy can do it.18:47
faassenbut that'd be expensive.18:48
philiKONbradb, seriously, couldn't you implement this behaviour in all your classes by haviing a superclass define __setattr__ and doing the validation?18:48
philiKONno idea how expensive proxies are18:48
faassenwell, doing it when you set every attribute is going to be expensive. :)18:48
faassenimagine you're looping through 1000 objects.18:48
philiKONyup18:48
faassenanyway, yeah, I'd simply write a superclass which did the checking somehow.18:48
philiKONalso, with a proxy there's always the danger of "forgetting to put it on"18:48
philiKONor stripping it and not putting it back on18:49
philiKONetc .etc.18:49
*** tvon has quit IRC18:49
*** tvon has joined #zope3-dev18:56
*** Aiste has joined #zope3-dev18:57
*** bradb_ has joined #zope3-dev18:57
bradb_sorry, lost my connection after the last two q's i asked18:57
*** alga has joined #zope3-dev18:58
*** BjornT_ has joined #zope3-dev18:59
philiKONbradb, you can read our responses at http://zope3.pov.lt/irclogs/19:03
bradb_yeah, i checked that out, thanks :)19:04
*** BjornT has quit IRC19:04
*** bradb has quit IRC19:05
*** BjornT_ is now known as BjornT19:06
*** __gotcha has quit IRC19:06
*** bradb_ is now known as bradb19:06
*** SteveA has joined #zope3-dev19:10
*** hazmat has quit IRC19:15
*** tvon|x31 has joined #zope3-dev19:19
*** MacYET_ has left #zope3-dev19:19
*** tvon has quit IRC19:20
*** [apoirier] has quit IRC19:23
*** niemeyer has quit IRC19:28
*** hazmat has joined #zope3-dev19:37
*** tarek_away has quit IRC19:58
*** bska|mobile has joined #zope3-dev20:08
*** SteveA has quit IRC20:11
*** bskahan has quit IRC20:13
*** regebro has quit IRC20:17
*** stub has quit IRC20:35
*** tonico has quit IRC20:39
*** tonico has joined #zope3-dev20:39
*** ccrownhart has quit IRC20:42
*** efge has left #zope3-dev20:46
*** SteveA has joined #zope3-dev20:49
*** th1a has quit IRC21:12
*** gintas has joined #zope3-dev21:31
*** RaFromBRC has joined #zope3-dev21:34
*** SteveA has quit IRC21:36
*** ignas has quit IRC21:47
*** faassen has quit IRC21:50
*** hazmat has quit IRC21:56
*** mkerrin has quit IRC22:06
*** tvon|x31 has quit IRC22:12
*** `anthony has quit IRC22:13
*** `anthony has joined #zope3-dev22:14
*** mohsen is now known as mohsen-away22:17
mgedminwhen you get an UnableToEvolve(6, 'foo', 7), what do the numbers mean?22:26
srichterfrom evolution 6 to 7, I think22:26
mgedminactually, 5 -> 6 raised an exception22:27
mgedminI found it in a log file22:27
mgedmin(bin/runzope didn't print the original exception to the console)22:28
srichtermmh22:28
srichterstrange22:28
srichterI don't know then22:28
mgedmin7 is the latest available generation, I think22:28
srichteroh, ok22:30
srichtermgedmin: ok, I fixed the recorder; it is all working now atop twsited; it even seems a bit cleaner than before22:36
mgedminyippee!22:36
srichterif you could review the change that would be great22:36
srichterI think you guys have more experience with Twisted than me22:36
*** hazmat has joined #zope3-dev22:38
mgedminurl?22:40
*** bskahan_ has joined #zope3-dev22:44
srichtermgedmin: http://svn.zope.org/Zope3/branches/srichter-twisted-integration/src/zope/app/recorder/22:47
mgedminthx22:50
mgedminI specify minimum_generation = 722:56
mgedminthe database is generation 522:56
mgedminif evolve 5->6 fails, I get an UnableToEvolve exception and Zope 3 doesn't start22:56
srichterright22:57
mgedminif evolve5->6 succeeds, but evolve 6->7 fails, I get an exception in the log file, but Zope 3 starts up as if everything were ok22:57
mgedminis this normal, or is this a bug?22:57
srichterbug22:57
mgedminI don't have time right now to submit a bug report...22:58
srichteryou can do it tomorrow :-)22:58
mgedminmaybe23:00
mgedminI'm going to oxford tomorrow (python UK)23:00
*** bska|mobile has quit IRC23:01
srichterright, have fun!23:01
*** BjornT has quit IRC23:21
*** BjornT has joined #zope3-dev23:21
*** kaczordek has joined #zope3-dev23:30
*** mgedmin has quit IRC23:44
*** alga has quit IRC23:46
*** bradb has quit IRC23:46
*** Aiste has quit IRC23:47
*** bskahan_ has quit IRC23:56

Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!