IRC log of #zope3-dev for Saturday, 2007-09-01

*** lucielejard has quit IRC00:12
*** jsadjohnson has quit IRC00:50
*** greenman has joined #zope3-dev01:16
*** cbcunc is now known as __cbcunc__01:50
*** markusleist has quit IRC01:53
*** lisppaste6 has quit IRC02:15
*** lisppaste6 has joined #zope3-dev02:21
*** timte has quit IRC03:07
*** norro has quit IRC03:08
*** markusleist has joined #zope3-dev03:28
*** stub has joined #zope3-dev03:33
*** alecm has quit IRC04:23
*** philiKON has quit IRC04:25
*** b52lap has quit IRC04:26
*** b52Centos has quit IRC04:26
*** greenman has quit IRC04:37
*** edgordon has quit IRC04:41
*** greenman has joined #zope3-dev04:41
*** bigkevmcd has quit IRC04:52
*** stub has quit IRC05:04
*** srichter has joined #zope3-dev05:05
*** malthe has joined #zope3-dev05:14
maltheon formlib action validation ––– why is no data available to the method? ––– rocky says it's the validators job to provide that data; but I don't really understand the idea then –– can anyone clarify?05:17
*** ChanServ sets mode: +o srichter05:18
*** marianom has left #zope3-dev05:25
*** strichter has joined #zope3-dev05:35
*** srichter has quit IRC05:51
*** edgordon has joined #zope3-dev05:57
*** malthe has quit IRC06:13
*** tav has quit IRC06:18
*** jsadjohnson has joined #zope3-dev06:37
*** baijum has joined #zope3-dev07:03
*** jsadjohnson has quit IRC07:22
*** greenman has quit IRC07:54
*** greenman has joined #zope3-dev08:04
*** lisppaste6 has quit IRC08:13
*** amit_am has joined #zope3-dev08:38
*** jukart has joined #zope3-dev08:42
*** greenman has quit IRC08:44
*** naro has joined #zope3-dev08:49
*** lisppaste6 has joined #zope3-dev08:52
*** greenman has joined #zope3-dev08:57
*** jukart has quit IRC09:18
*** greenman has quit IRC09:18
*** yvl has joined #zope3-dev10:03
*** agroszer has joined #zope3-dev10:05
*** baijum has quit IRC10:22
*** greenman has joined #zope3-dev10:39
*** jodok has joined #zope3-dev10:49
*** kleist has joined #zope3-dev10:49
*** naro has quit IRC11:01
*** baijum has joined #zope3-dev11:07
*** baijum has quit IRC11:15
*** baijum has joined #zope3-dev11:16
*** baijum has quit IRC11:21
*** baijum has joined #zope3-dev11:24
*** jodok has quit IRC11:43
*** timte has joined #zope3-dev11:47
*** b52laptop has joined #zope3-dev12:11
*** jfroche has joined #zope3-dev12:18
*** benji_ has joined #zope3-dev12:23
*** benji has quit IRC12:24
*** b52laptop has quit IRC12:53
*** jodok has joined #zope3-dev13:00
*** naro has joined #zope3-dev13:10
*** b52laptop has joined #zope3-dev13:13
*** jodok has quit IRC13:17
*** jfroche has quit IRC13:22
*** jfroche has joined #zope3-dev13:28
*** norro has joined #zope3-dev13:38
*** greenman has quit IRC13:56
*** philiKON has joined #zope3-dev14:12
*** dunny has quit IRC14:47
*** norro has quit IRC15:06
*** _srichter has joined #zope3-dev15:35
baijumTheuni, can I remove zope.xmlpickle from http://wiki.zope.org/zope3/StabilizeEggPackages , it was never officially released ?15:47
*** strichter has quit IRC15:51
philiKONbaijum: yes, please do15:57
baijumphiliKON: ok15:57
philiKONbaijum: i would prefer it if you put the changelog *below* the package documentation15:58
*** ignas has joined #zope3-dev15:58
philiKONhmm, never mind, you have README.txt + CHANGES.txt + src/.../README.txt15:59
philiKONi guess that's ok15:59
philiKONignore me :)15:59
* baijum don't understand the reason, anyway ok16:00
philiKONno, it's ok16:01
philiKONi was talking rubbish16:01
baijumphiliKON, can you suggest a description for zope.structuredtext ?16:05
* baijum guess this will be the first and last release of this package16:05
*** Ariel_Calzada has joined #zope3-dev16:05
baijumis "Structuredtext parser" ok ?16:05
philiKONyeah, sounds good16:06
philiKONit's written StructuredText, though16:06
philiKONsrc/zope/structuredtext/STNG.txt contains a document explaining STructuredText16:06
baijumah. ok16:07
*** naro has left #zope3-dev16:08
ignashow do i get a pythonpath for an egg?16:18
philiKONignas: ?16:19
ignasi need to pass a path to my i18nectraction script16:19
ignasso i want to have some function that when it gets a string like "schooltool" gets me the path to the egg16:20
philiKONis schooltool a namespace package?16:20
ignas" list(pkg_resources.require('schooltool'))[0].location "16:20
ignaskind of works16:20
ignasnot at the moment16:21
philiKONmodule = __import__(pkg_name); os.path.dirname(module.__file__)16:21
ignaswhen it will be, i will have to think of some other way to collect all the python files16:21
*** b52GM has joined #zope3-dev16:22
ignashmm, i'd rather do it through eggs16:22
ignasif it's possible16:22
philiKONwhatever that means16:22
philiKONeggs are just directories (or zipfiles) containing packages16:22
baijumignas, are you creating egg for "utilities/i18nextract.py" available in Zope 3 trunk ?16:25
ignasno ;)16:25
ignasi am creating an egg for schooltools own i18nextract16:26
philiKONbaijum: there's really no egg needed. i18nextract should be a script of the zope.app.locales egg16:26
ignassomething like stdevtools16:26
ignassolving namespace packages is a bit more difficult than what schooltool needs16:27
baijumphiliKON, is that entry point exists there now ?16:27
philiKONno idea.16:27
philiKONi didn't create it...16:27
ignasbaijum: any idea how to make POTMaker namespace package aware when extracting strings?16:29
baijumignas, no idea about i18n/l10n now16:29
ignasit's not specific to i18n, i18n just runs through all the python files in some directory16:30
ignasso making it an entry point won't really make it suitable for Zope3 eggs edition i think16:30
baijumignas, sorry I have no idea ...16:32
philiKONignas: well, you give it a certain package, e.g. zope.testbrowser16:36
philiKONand then it scans that package16:36
philiKONyou could no longer give it a namespace package16:36
philiKON(it wouldn't make sense anyway)16:36
*** malthe has joined #zope3-dev16:37
ignasit would make sense if all the packages are using the same i18n domain, which might happen during the transition period16:38
philiKONyeh16:39
* baijum marked few packages in wiki, now leaving ;)16:41
*** baijum has quit IRC16:43
* ignas discovers zope.deferredimport.deferredmodule and becomes a bit happier about the state of the world ;)17:03
*** yvl has quit IRC17:11
*** edgordon has quit IRC17:25
*** twcook has joined #zope3-dev17:51
*** fcorrea has joined #zope3-dev17:58
*** jfroche has quit IRC18:02
*** jfroche_ has joined #zope3-dev18:02
*** Ariel_Calzada has quit IRC18:32
*** afd_ has joined #zope3-dev18:33
*** cursor has joined #zope3-dev19:14
*** norro has joined #zope3-dev19:16
*** philiKON has quit IRC19:26
*** philiKON has joined #zope3-dev19:27
*** edgordon has joined #zope3-dev19:36
*** ktwilight has joined #zope3-dev19:39
*** ktwilight_ has quit IRC19:53
*** rcrafton has quit IRC19:57
*** norro has quit IRC20:11
*** fcorrea has left #zope3-dev20:14
*** naro has joined #zope3-dev20:33
*** spython has joined #zope3-dev20:38
*** _srichter is now known as srichter20:41
*** ChanServ sets mode: +o srichter20:41
*** strichter has joined #zope3-dev20:53
*** srichter has quit IRC20:54
*** strichter is now known as srichter20:54
*** ChanServ sets mode: +o srichter20:54
*** foxmjay has joined #zope3-dev21:11
*** foxmjay has quit IRC21:20
*** norro has joined #zope3-dev21:36
*** twcook has quit IRC21:43
*** agroszer has quit IRC21:56
*** Ariel_Calzada has joined #zope3-dev22:01
*** naro has quit IRC22:03
*** ignas has quit IRC22:06
*** dunny has joined #zope3-dev22:25
*** Ariel_Calzada has quit IRC22:28
malthephiliKON: could you explain why a formlib validator does not receive the submitted form data –– rocky says it's because a validator is not supposed to react on the submitted data, but rather to provide data. I'm a bit lost, then. What I want is to be able to validate a field based on some context-dependent statement (for instance: does this user-id already exist).22:37
philiKONi didn't write formlib22:38
maltheright22:38
maltheeven so :-)22:38
malthemaybe you could shed light on the logic22:38
philiKONyou should explain what you mean by formlib validator22:38
philiKONthere are about three different ones possible22:39
malthe@action("My action", validator=my_form_validator)22:39
philiKONan action validator22:39
maltheyes22:39
maltheperhaps I need to register a field-specific validator; maybe that's the idea.22:39
*** kleist has quit IRC22:40
philiKONfirst the action validator is called, then the general validator22:41
philiKONthe general validator fills the 'data' dictionary with the values from the request22:41
philiKON*if* each field validates the request's value correctly22:41
malthegotcha22:41
philiKONsince the action validator is called before that, it'll have either fill the data dictionary itself22:42
philiKONor look at the request itself22:42
maltheok that makes sense then22:42
maltheso I should probably resort to adding a field validator to my field22:42
philiKONdepends on what you need to do22:42
maltheI need to check that the userid isn't taken already22:42
malthemy asking the pluggable auth22:43
malthes/my/by22:43
philiKONthat doesn't sound like an action validator22:43
philiKONmore like an invariant22:43
malthebut invariants don't have access to the context22:43
malthethat's what I found anyway22:43
malthethey're sort of ignorant about the context22:44
philiKONhuh?22:44
philiKONthey receive the objec tin question22:45
malthethey're only given an object that has the form data22:45
philiKONnot just any object, though22:45
philiKON*the* object22:45
maltheso... the form object in my case?22:45
malthethat's not what I've found but let me just check that again22:45
philiKONhmmm22:45
philiKONyou may be right22:46
philiKONshrug22:46
maltheyeah shrug22:46
malthelast I checked "the object" didn't have any attributes at all ––– except some fancy __getattr__22:46
philiKONyeah22:46
malthethat appearently was clever about getting the attributes from the request22:46
philiKONok, here's what i suggest22:46
philiKONoverride the validate() method22:46
philiKONcall super(...).validate()22:47
philiKONthe data dict will be filled then22:47
malthethen check22:47
philiKONyou'll have access to the object (self.context)22:47
philiKONetc.22:47
philiKONright22:47
malthethat seems reasonable22:47
maltheI'll try that –––– thanks for the help22:47
malthemuch appreciated22:47
philiKONe.g. http://paste.plone.org/1663022:48
philiKONsure22:48
maltheI see22:49
malthemore_errors huh :-(22:49
maltheseems like a good strategy22:49
philiKONwell, more_errors would contain the errors you would compute out of your checks22:49
philiKONe.g. an exception indicating that the user id is already taken22:50
maltheright ––– I'd just more_errors.append(MyValidationError)22:51
malthemaybe instantiated22:51
philiKONthese things are tuples i think22:51
philiKONso no append22:51
maltheright22:51
philiKONbut yeah, instantiated validation error22:52
malthethat's pretty good22:52
maltheseems not the perfect approach, but 90% there ––– I'd like to raise the exception somewhere.22:52
malthebut that's for another day :-)22:52
maltheseems odd to add the error... anyway, I don't want to burden you with even more of this.22:53
*** ferrafox has joined #zope3-dev23:14
*** xbeanx has quit IRC23:33
*** xxbeanxx has joined #zope3-dev23:33
*** amit_am has left #zope3-dev23:39
*** cursor has left #zope3-dev23:55
*** ferrafox_ has joined #zope3-dev23:57

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