IRC log of #zope3-dev for Thursday, 2007-02-01

*** philiKON_ is now known as philiKON00:01
*** ofer has joined #zope3-dev00:02
*** harobed_ has joined #zope3-dev00:11
*** schwendinger has quit IRC00:12
*** ktwilight_ has joined #zope3-dev00:25
*** ktwilight has quit IRC00:26
*** alecm has quit IRC00:34
*** ktwilight has joined #zope3-dev00:37
*** __gotchaway has quit IRC00:49
*** ktwilight_ has quit IRC00:52
*** natea has joined #zope3-dev01:24
*** schwendinger has joined #zope3-dev01:32
*** schwendinger has quit IRC01:33
*** natea has quit IRC01:34
WebMavenphiliKON: ping01:41
*** __gotchaway has joined #zope3-dev02:10
*** harobed_ has quit IRC02:11
*** alga has quit IRC02:22
*** __gotchaway has quit IRC02:26
*** J1m has quit IRC02:39
*** b_52Free has quit IRC02:54
*** b_52Centos has joined #zope3-dev03:14
*** tahara has joined #zope3-dev03:20
*** niemeyer has quit IRC03:38
*** benji has quit IRC03:40
*** yota has joined #zope3-dev03:48
*** jodok has joined #zope3-dev03:53
*** deo has quit IRC04:46
*** ofer has quit IRC04:49
*** alga has joined #zope3-dev05:06
*** stub has joined #zope3-dev05:28
*** yota has quit IRC05:28
*** Bhaskar has joined #zope3-dev05:30
*** Bhaskar has quit IRC05:30
*** Bhaskar has joined #zope3-dev05:31
*** ignas has quit IRC05:36
*** philiKON_ has joined #zope3-dev06:10
*** baijum has joined #zope3-dev06:11
*** philiKON has quit IRC06:20
*** alecm has joined #zope3-dev06:36
*** alga has quit IRC06:36
*** alga has joined #zope3-dev06:40
*** alecm has quit IRC07:06
*** alecm has joined #zope3-dev07:11
*** alecm has quit IRC07:16
*** alga has quit IRC07:46
CSWookieHow do I ask an adapter registry what's registered?08:01
CSWookieI'm in a bin/zopectl debug, and I'm trying to figure out what's available.08:02
*** stu1 has joined #zope3-dev08:15
*** eins has joined #zope3-dev08:19
*** zagy_ has quit IRC08:21
*** stub has quit IRC08:25
*** naro has joined #zope3-dev08:39
WebMavensrichter: AYT?08:40
CSWookieWebMaven: Do you know how to adapters out of the registry without knowing the kinds of things they adapt?08:45
CSWookieWebMaven: I'm trying to spelunk my adapter registery to better understand what's going on.08:45
WebMavenCSWookie: I don't think I understand the question.08:46
WebMavenyou want a list of all adapters?08:46
CSWookieWebMaven: For example, I know that my AddForm class implements IAdding, and I'm pretty sure thaat in order to get it out of the registry, I'd need a request of some sort.  I want to be able to say, "Hey aapter registry, give me all the registered adapters, and let me look at them.08:47
CSWookieWebMaven: And that way I'll be able to figure the rest of what's registered.08:47
CSWookieBasically, the Adapter and Utility registries are sort of black magic for me, and I want to better know how they work.08:48
WebMavenUmm... I guess you could ask for everything that adapts None...08:48
WebMavenI think that gets you everything, but I'm not sure.08:48
CSWookieI think maybe I'll just hang it up for the night, and ask at work tomorrow.  It's well meyond a sane man's bed time.08:51
*** zagy has joined #zope3-dev08:51
*** dlk has joined #zope3-dev08:58
WebMavenCSWookie: good night, then.09:05
srichterWebMaven: here09:06
WebMavenAh, good.09:06
WebMavenI'm having trouble finding an example of a success_handler09:06
srichterin formlib?09:07
WebMavenYes.09:07
srichter@form.action(_('Action'))09:07
srichterdef handle_action(self, action, data):09:07
srichter    ...09:07
srichterhandle_action() is the success handler09:07
WebMavenUmm09:07
WebMavenOK, I guess I was confused. I found this in form.py:09:08
WebMaven    def success(self, data):09:08
WebMaven        if self.success_handler is not None:09:08
WebMaven            return self.success_handler(self.form, self, data)09:08
WebMavenSo it looked like I needed to make an optional method named success_handler09:09
WebMavenOK, so, if that's where I'm supposed to put the code, I'm not sure why this doesn't work:09:10
WebMaven    @form.action(_(u"Apply Changes"))09:10
WebMaven    def handle_edit_view_action(self, action, data):09:10
WebMaven        self.default_actions['form.actions.apply'].success(data)09:10
WebMaven        xmlerror = validateXML(self.context.page_xml)09:10
WebMaven        self.context.page_isvalid, self.context.page_error = xmlerror09:10
WebMaven        self.request.response.redirect(self.nextURL())09:10
WebMavenI get this error:09:11
WebMavenForbiddenAttribute: ('page_isvalid', <rogue.courses.page.Page object at 0xb6b4bbac>)09:11
srichterlooks like you are missing a security declaration for the page_isvalid attribute09:12
WebMavenYeah, but I'm not sure why.09:15
WebMavenit's in the Interface,09:15
WebMavenI use the Interface to decalere the security09:15
srichterwell, then it might be missing, which causes the error as well09:15
srichterput in a break point09:16
WebMavenmissing how?09:16
WebMavenyou mean from the class?09:16
srichterit might be non-existent09:16
WebMavenin the form, you mean?09:16
srichtersecurity proxies will mask attribute errors09:16
srichteryes09:16
WebMavenHuh.09:17
WebMavenI didn't realize it had to be there if I was ignoring it.09:17
WebMavenOK, that explains it. Thanks.09:17
WebMavenno, wait, that doesn't make sense.09:18
WebMavensince when can't I omit a field from a form?09:18
srichterjust put in a break point, remove the security proxy and see what the original problem is09:18
WebMavenform_fields = form.FormFields(IPage).omit('__parent__','page_isvalid')09:18
srichteryou can09:18
srichterbut you specifically assign self.context.page_isvalid there09:19
srichterI bet you it is not security declared09:19
WebMavenMaybe I'm confused. It is in the IPage schema, and I declare it like this:09:20
WebMaven    <require09:20
WebMaven        permission="zope.ManageContent"09:20
WebMaven        set_schema=".interfaces.IPage"09:20
WebMaven        />09:20
srichterwell, how is it declared in IPage?09:21
WebMaven    page_isvalid = zope.schema.Bool(09:21
WebMaven        title = _(u'Valid XML'),09:21
WebMaven        description = _(u'The validity of the page XML'),09:21
WebMaven        required = False,09:21
WebMaven        readonly = True)09:21
srichterok, all this is correct09:22
srichteryou really need to debug there09:22
WebMavenOK.09:22
srichterto check out what self.context is09:22
srichtersee what the error without the security proxy is, etc09:22
WebMavenThis is embarrasing, but I'm still not comfortable with pdb. Do you have the patience to walk me through it?09:23
*** zagy has quit IRC09:23
*** zagy has joined #zope3-dev09:24
*** zagy has quit IRC09:26
*** zagy has joined #zope3-dev09:26
WebMavensrichter: ?09:26
WebMavenOK, I guess not.09:30
naroWebMaven: I can help you with pdb a bit09:30
naroWebMaven: before the line self.context.page_isvalid, self.context.page_error = xmlerror enter the following line:09:30
naroimport pdb; pdb.set_trace()09:31
WebMavenOK, done09:31
naroand start zope on foreground (zopectl fg or runzope)09:31
WebMaventhanks, BTW09:31
naronp09:31
WebMavenOK.09:32
WebMavennow what?09:32
narofollow your browser to reach the code (Apply changes action) and look to zope console. There should be (pdb) prompt09:32
naroand your browser will freeze (waiting for server)09:32
WebMavenyes09:33
naronow you can try to enter "self.context"  or "print self.context" to the pdb prompt. I don't know why, but sometimes is breakpoint reached inside the set_trace method, so there is no self.context. In this case enter  "n" (next) command and try self.context again09:34
naroyou can see what is in self.context variable now. got it ?09:34
WebMavenself.context09:35
WebMaven<rogue.courses.page.Page object at 0xb6a4450c>09:35
narogreat09:35
naronow09:35
narothere are several pdb commands I'm using: n(next) command; c(continue) running of program, s(step) into function r(return) from function09:36
narop - print variable09:36
naroread pdb documentation for full set of commands09:36
narolook for pdb.txt in your python library (/usr/lib/python2.4)09:37
romanofskimoin09:38
naroI can't hel you to solve your zope related problem, I'm still zope3 newbie and I do not know what you are doing :)09:38
narogood morning09:38
WebMavenOK.09:38
naroWebMaven: so, after you find what you need, use "c" command to continue your session in browser09:39
*** ktwilight has quit IRC09:40
*** ktwilight has joined #zope3-dev09:40
srichternaro: when running tests, the breakpoint ends in the test code; then you go one stack item up (u) to get to the right context09:41
WebMavennaro: srichter was saying I needed to remove the security proxy...09:41
srichterfrom zope.security.proxy import removeSecurityProxy09:41
narosrichter: ok09:42
srichterremoveSecurityProxy(self.context)09:42
naroWebMaven: btw, I'm using WingIDE for Zope2 debugging long time and together with z3wingdbg it is possible to use it with Zope3 as well.09:43
narobut WingIDE is not free product09:43
WebMavenOK, it came back at me with09:43
WebMaven<rogue.courses.page.Page object at 0xb6a4450c>09:43
srichterstore that09:44
srichteras a variable09:44
naroobj = removeSecurityProxy(self.context)09:44
srichterand then try accessing/assigning to the attribute09:44
WebMavenAh, OK.09:44
WebMavenobj.page_isvalid09:45
WebMavenFalse09:45
srichtercan you assign to it?09:45
srichterespecially the value you originally wanted?09:45
WebMavenyes:09:46
WebMaven(Pdb) obj.page_isvalid = True09:46
WebMaven(Pdb) obj.page_isvalid09:46
WebMavenTrue09:46
srichteris that the calue that the original code tried to set?09:46
srichterif so, then you have a security declaration problem09:46
naroWebMaven: print xmlerror09:47
WebMaven(Pdb) print xmlerror09:47
WebMaven(True, '')09:47
naroyou do not need to use 'print' command, 'xmlerror' is sufficient09:47
WebMavenerr, yes.09:48
WebMavenOK, but I *declared* the security...09:49
naroif you use (n)ext command now, you should get the ForbiddenAttribute error09:49
WebMavenyes09:49
WebMavenForbiddenAttribute: ('page_isvalid', <rogue.c...b6a4450c>)09:49
WebMaven> /home/webmaven/Desktop/ZopeRogue2/lib/python/rogue/courses/browser/page.py(57)handle_edit_view_action()09:49
WebMaven-> self.context.page_isvalid, self.context.page_error = xmlerror09:49
* WebMaven looks at his code again...09:53
WebMavenit's declared in the interface.09:55
WebMavenI use the interface to declare security09:55
*** ivan has joined #zope3-dev09:55
WebMavenThe class implements the interface09:55
WebMavenit has the matching FieldProperty09:55
WebMavenThe form omits the field09:56
WebMavenThe add form omits the field too.09:57
WebMavenAdding succeeds (and the init does the equivalent successfully)09:57
WebMavenCould the security proxy be pitching a fit because I'm trying to access a field that I omitted from the form?09:58
WebMavenno, restoring the form makes no difference.10:04
WebMavenI mean, restoring the field10:04
WebMavensrichter: where else could I be missing a security declaration?10:05
WebMavenWait, could it be the readonly declaration?10:06
WebMavenno, removing the readonly has no effect.10:11
*** ivan has quit IRC10:11
WebMavenWhat security declaration am I missing? This is very vexing.10:12
naroWebMaven: I'm listening but I have no idea :(10:12
*** ivan has joined #zope3-dev10:13
ivanhi All, is it working?10:14
ivanthis is the first time i try this irc10:14
narowhat ?10:14
naroit is working :)10:14
ivanyes thank you :-)10:14
*** d2m has joined #zope3-dev10:14
srichterWebMaven: no idea; the obvious things are gone10:15
*** __gotchaway has joined #zope3-dev10:17
WebMavensrichter: what else can I investigate?10:17
WebMavenOK, so I reversed the order of the assignments, page_error has the same problem.10:20
*** stu1 is now known as stub10:25
taharaHi. WebMaven, you can use checker for investigation.10:26
WebMaven??10:26
taharafrom zope.security._proxy import getChecker10:27
WebMavenin pdb?10:27
taharayes.10:27
taharachecker = getChecker(self.context)10:27
taharaI think variable checker is CombinedChecker instance,10:28
taharaso you can check the permission setting by following code...10:28
*** jfroche has joined #zope3-dev10:28
taharachecker._checker2.set_permissions10:28
taharaand10:28
taharachecker._checker2.get_permissions10:28
taharathen you can see your object's permission information.10:29
WebMavenHmm.10:31
WebMaven(Pdb) checker._checker2.set_permissions10:31
WebMaven*** AttributeError: 'zope.security.checker.Checker' object has no attribute '_checker2'10:31
WebMaven(Pdb)10:31
taharaso, checker is not a CombinedChecker.10:32
taharaok, please write "checker.set_permissions".10:32
WebMavenby itself?10:33
taharayes.10:33
WebMaven{'page_local_id': 'zope.ManageContent', 'page_ordinal': 'zope.ManageContent', '__parent__': 'zope.ManageContent', 'page_xml': 'zope.ManageContent'}10:34
WebMavenso, those two attributes have no declaration, just like srichter thought.10:34
WebMavenBut why?10:34
taharahmm.others are same as you wrote?10:35
taharaDo you use like_class in declaration?10:37
*** projekt01 has joined #zope3-dev10:38
WebMaven  <!-- Page Configuration -->10:39
WebMaven  <class class=".page.Page">10:39
WebMaven    <implements interface="z3c.zalchemy.interfaces.ISQLAlchemyObjectContained" />10:39
WebMaven    <require10:39
WebMaven      permission="zope.View"10:39
WebMaven      interface=".interfaces.IPage"10:39
WebMaven      />10:40
WebMaven    <require10:40
WebMaven        permission="zope.ManageContent"10:40
WebMaven        set_schema=".interfaces.IPage"10:40
WebMaven        />10:40
WebMaven  </class>10:40
WebMaven  <utility10:40
WebMaven    component=".page.pageFactory"10:40
WebMaven    name="rogue.courses.page.Page"10:40
WebMaven    />10:40
WebMaventhese two attributes were added recently, so I have obviously forgotten to do something.10:40
WebMavenBut as far as I can see, there is nothing missing10:41
*** __gotchaway is now known as __gotcha10:41
taharaCan you show us the interface code?10:43
WebMavenyes.10:45
WebMavenclass IPage(ISQLAlchemyObjectContained,IRogueContent):10:46
WebMaven    """Information about a page, containing XML content"""10:46
WebMaven10:46
WebMaven    page_error = zope.schema.TextLine(10:46
WebMaven        title = _(u'XML Error'),10:46
WebMaven        description = _(u'The XML Error preventing the page from validating'),10:46
WebMaven        required = False,10:46
WebMaven        readonly = True)10:46
WebMaven10:46
WebMaven    page_isvalid = zope.schema.Bool(10:46
WebMaven        title = _(u'Valid XML'),10:46
WebMaven        description = _(u'The validity of the page XML'),10:46
WebMaven        required = False,10:46
WebMaven        readonly = True)10:46
WebMaven    page_xml = zope.schema.SourceText(10:46
WebMaven        title=_(u'XML'),10:46
WebMaven        description=_(u'Source XML for the page'),10:46
WebMaven        default=u"<page>\n\n</page>",10:46
WebMaven        #missing_value=u"<page>\n\n\n</page>" #different from the default10:46
WebMaven        )10:46
WebMaven10:46
WebMaven    page_ordinal = zope.schema.Int(10:46
WebMaven        title = _(u'Ordinal'),10:46
WebMaven        description=_(u'Order of the pages in the container'),10:46
WebMaven        default=0,10:47
WebMaven#        missing_value=0, #don't know why this doesn't work10:47
WebMaven        )10:47
WebMaven10:47
WebMaven    page_local_id = zope.schema.Int(10:47
WebMaven        title = _(u'Local ID'),10:47
WebMaven        description=_(u'Unique ID within the Lesson'),10:47
WebMaven        default=0,10:47
WebMaven        )10:47
*** __gotcha has left #zope3-dev10:48
taharaThanks.10:48
WebMavenDoes the order matter in any wierd way?10:49
taharait seems that page_invalid is a readonly attribute.10:49
WebMavenYeah, but changing that had no effect.10:49
taharahmm...10:49
*** lzdych has joined #zope3-dev10:49
WebMavenexcept... Hmm....10:50
WebMavenOh, hell.10:52
WebMavenBoy am I stupid.10:52
* WebMaven sighs10:52
WebMavenbecause, of course if I have *two* readonly attributes, commenting out *one* of the readonly declarations won't actually fix the problem.10:53
taharahehe;-)10:54
WebMaven*^$#&@((^$*^$@#&@10:54
WebMavenOK, now I know that setting readonly on a field doesn't just affect the form HTML.10:55
WebMavenit literally blocks it from being altered.10:56
baijumWebMaven, please add this to http://wiki.zope.org/zope3/FAQ10:56
* baijum was listening10:56
WebMavenbaijum: if you write the question, I'll add the answer.10:59
baijumPlease append your answer to: http://wiki.zope.org/zope3/FAQ#what-is-forbiddenattribute-exception-error11:02
WebMavenuhhh11:03
WebMavenbut, there are many possible reasons...11:03
taharaI find the code, if a field is readonly, then the field is not set permission.11:03
WebMavenyeah.11:03
WebMavenI'm still thinking of Zope3 as a *web* development framework.11:04
WebMavenwhen it's really more general-purpose.11:04
taharaplease refer zope/app/component/contentdirective.py(__protectSetSchema method)11:05
WebMavenyeah, that totally makes sense.11:07
WebMavenOK, so my new problem is, how do I make a field display-only in a form?11:07
*** schwendinger has joined #zope3-dev11:08
WebMavenI obviously can't use readonly=True as a proxy for controlling the display.11:09
WebMavenI'd hate to have to make a custom widget for something so trivial, though.11:09
*** schwendinger_ has joined #zope3-dev11:09
taharahmm, I don't like custom widget too. But I have no idea...11:14
taharaif you don't need to display those attributes, then you can omit them from fields.11:15
*** Aiste has joined #zope3-dev11:18
*** schwendinger_ has quit IRC11:22
WebMavenI do need to display one of them.11:26
WebMaventhe page_error11:26
WebMavenI just tried using the DisplayWidget, but it doesn't work.11:27
*** schwendinger has quit IRC11:27
*** dlk has quit IRC11:37
*** turian has quit IRC11:37
*** turian has joined #zope3-dev11:39
*** dlk has joined #zope3-dev11:39
*** jfroche_ has joined #zope3-dev11:39
taharaI was misunderstanding, a readonly field is always display only in form.11:40
*** opetznick has joined #zope3-dev11:41
taharaI think readonly field is fit for your purpose.11:45
WebMaventahara: yes, but that is preventing me from setting the value.11:49
WebMavenMy code needs to set the value, not the user.11:50
WebMavenactually, I've nearly solved the problem.11:50
taharaoh I see.11:51
*** jfroche has quit IRC11:54
*** dunny has quit IRC11:59
WebMavenAhh...12:08
*** yvl has joined #zope3-dev12:09
WebMavenOK, for those of you who have been following along, here is the answer for making a form field display only *without* making it read only:12:09
WebMaven    form_fields = form.FormFields(IPage).omit('__parent__','page_isvalid')12:09
WebMaven    form_fields['page_error'].for_display = True12:09
WebMavenDamn, that was a pain in the ass to figure out.12:10
* baijum added this to FAQ (http://wiki.zope.org/zope3/FAQ#how-to-make-a-form-field-display-only), thanks WebMaven !12:19
WebMavenyou're welcome.12:21
*** jinty has joined #zope3-dev12:23
philiKON_WebMaven: a look at IFormFields in zope.formlib would've done the trick :)12:23
philiKON_you should never have to change your schema definition just the manipulate a form12:23
philiKON_and baijum, that faq entry is wrong12:24
philiKON_ah, never mind12:24
philiKON_sorry, misread12:24
WebMavenso, this *is* the correct solution?12:24
philiKON_for_display is correct, yes12:24
WebMavenOK.12:26
WebMaventhis was all because I need to do validation that wouldn't prevent the form from being saved. Sigh.12:28
WebMavenWell, it works now.12:29
WebMavenboth storing and displaying the XML schema validation error.12:29
baijumWhat is the difference between persistent.mapping.PersistentMapping and persistent.dict.PersistentDict ?12:31
*** jodok has joined #zope3-dev12:32
*** J1m has joined #zope3-dev12:37
baijumIf I 'import persistent' persistent.dict module is not coming to namespace12:38
baijumIf I add import dict to __init__.py of persistent, then it's working12:39
baijumcan anyone make this change in ZODB ?12:39
* baijum is not committed to ZODB yet12:39
*** d2m_ has joined #zope3-dev12:40
*** J1m has quit IRC12:42
philiKON_baijum: no12:44
philiKON_you need to import persistent.dict12:44
philiKON_these are standard python importing rules12:44
philiKON_no need to change the zodb12:44
*** schwendinger has joined #zope3-dev12:45
*** d2m has quit IRC12:52
baijumphiliKON_, ok12:56
philiKON_baijum: it's the same with zope12:57
philiKON_import zope.interface12:57
philiKON_not:12:57
philiKON_import zope12:57
philiKON_zope.interface....12:57
*** reco has joined #zope3-dev13:01
*** jfroche__ has joined #zope3-dev13:03
baijumphiliKON_, We are using 'zope' as a pure namespace package, but persitence is not like that, and it is very convenient to use 'import persistent' then use 'persistent.dict', but, may be to reduce the overall import speed it's done like that (and not everyone uses persistent.dict)13:09
philiKON_it's also standard python import rules13:09
philiKON_if you want to use something you should import it explicitly13:09
*** jfroche_ has quit IRC13:11
*** niemeyer has joined #zope3-dev13:12
baijumphiliKON_, I think the module creator can decide on that, see I can 'import os' then use 'os.path' (but it should be documented like: http://docs.python.org/lib/module-os.html see bottom)13:15
philiKON_i actually dislike the fact that you can simply import os and get os.path for free13:15
baijumbut it's very convenient13:17
baijumanyway, in the case of 'persistent' we need not to do like that13:17
*** tarek has joined #zope3-dev13:24
* baijum is a Zope 2 programmer interested in Zope 313:35
*** Bhaskar has quit IRC13:35
baijumCan anyone point to me a code where zope.testbrowser is used in Zope 2 ?13:35
baijumI looked at plone code, but I am looking for pure Zope 2 ...13:36
* baijum may be I should ask in #zope13:36
*** rocky|away is now known as rocky13:44
*** grahal has joined #zope3-dev13:48
*** timte has joined #zope3-dev13:50
*** mgedmin has joined #zope3-dev13:56
*** nathany has quit IRC13:58
*** reco has quit IRC14:03
*** reco has joined #zope3-dev14:04
*** grahal_ has joined #zope3-dev14:07
*** harobed_ has joined #zope3-dev14:09
*** ignas has joined #zope3-dev14:12
*** grahal has quit IRC14:12
*** grahal_ is now known as grahal14:30
*** pelle_ has joined #zope3-dev14:39
*** vijaykumar has joined #zope3-dev14:54
*** dlk has left #zope3-dev14:59
*** vijaykumar has quit IRC15:11
*** grahal_ has joined #zope3-dev15:17
*** grahal has quit IRC15:17
*** tonico|away is now known as tonico15:17
*** nathany has joined #zope3-dev15:18
*** grahal_ is now known as grahal15:20
*** dobee has joined #zope3-dev15:33
*** dlk has joined #zope3-dev15:41
*** dlk has left #zope3-dev15:43
*** benji has joined #zope3-dev15:49
*** mkerrin has joined #zope3-dev15:49
*** baijum has quit IRC15:56
*** grahal has quit IRC15:58
*** grahal_ has joined #zope3-dev15:58
*** ofer has joined #zope3-dev16:01
ivancan somebody help me regarding removeAllProxies_16:02
ivan?16:02
*** jfroche_ has joined #zope3-dev16:03
*** alga has joined #zope3-dev16:07
mgedminwhat's your problem, ivan?16:07
*** opetznick has quit IRC16:10
*** jfroche__ has quit IRC16:11
*** ofer has quit IRC16:11
*** reco has quit IRC16:14
*** reco has joined #zope3-dev16:14
ivani have a display view with SequenceDisplayTableWidget object16:14
ivanthis has a method widgets()16:15
ivanthis is creating the subwidgets, filling with values16:15
ivan        for i, item in enumerate(data):16:15
ivan            widget = self._getWidget(i)16:15
ivan            widget.setRenderedValue(item)16:15
ivan            widgets.append(widget)16:15
mgedminuse a pastebot, please16:16
mgedminsee /topic16:16
ivansorry this is the first time i'm here16:18
ivanwhat does pastebot means?16:18
mgedminno problem16:18
mgedminyou go to http://zope3.pastey.net/16:18
mgedminpaste your code into the form there16:18
ivanand?16:18
mgedminthen paste the numbered link you get here16:18
ivanok16:18
mgedminas a result you can show us large amounts of code without flooding the IRC channel16:18
ivansure16:20
ivanhttp://zope3.pastey.net/580316:20
ivanthis is my submit16:20
ivanthe item in the highlighted row is _Proxy types16:21
ivantyped16:21
ivantherefore i see nothing in the view screen, just a big empty table16:21
mgedminyou may need to use zope.security.proxy.removeSecurityProxy() on it16:22
ivanyes, i did this and then i get the values16:22
ivani used removeAllProxies()16:23
ivanso i have to subclass SequenceDisplayTableWidget and modify the widgets method?16:24
mgedminhm16:25
mgedminwhat sort of objects are they?16:25
mgedmindo you have security declarations for them?16:25
ivanwell, i don't know16:27
ivanbecause i'm new to zope16:27
ivanthe expert is on holiday, and i have to work with it16:27
ivanhttp://zope3.pastey.net/580416:29
ivanthis is the interface of the subobject16:29
ivanhttp://zope3.pastey.net/580516:29
ivanand this is the field declaration of the main object16:30
ivani don't know how to figure out the security declaration16:30
*** J1m has joined #zope3-dev16:36
mgedminivan: look for <class class="..."> (or <content class="...">) declaration in configure.zcml16:40
*** faassen has joined #zope3-dev16:47
faassenphiliKON_: hey16:47
faassenphiliKON_: traversal question, if you have time :)16:48
* mgedmin wants to see the question16:49
faassenmgedmin: well, it's a zope 2 question as well :)16:49
* mgedmin retracts his wish16:50
faassenbasically in Zope 2.10, traversal happens in one way for resources and views, and in another way for everything else.16:50
faassenfor everything else, it uses DefaultPublishTraverse, or whatever you override that with by registering a multiadapter for IBrowserPublisher.16:51
faassenbut for resources and views, that adapter is not in play somehow.16:51
faassenand instead an adapter on ITraversable (possibly a multiadapter if request is in play) is used.16:51
faassenI'm wondering whether it's that way in Zope 3, and whether Zope 2.10 is doing it right.16:52
faassenmgedmin: my general comment about Zope 3's traversal infrastructure is that I hope it can be made a lot simpler. :)16:52
mgedminthat would be nice16:53
*** alga has quit IRC16:54
ivanmgedmin: thank you16:55
*** gintas has joined #zope3-dev16:55
ivanmgedmin: i modified the configure.zcml and it works without using removeAllProxies()16:56
*** alga has joined #zope3-dev16:56
ivan:)16:56
timteIt seems zope take about 9 seconds to return a 100 kb file. Isn't that a bit much?17:01
faassentimte: sounds much to me. you could use tramline to speed that up, if you're using apache.17:01
faassenhttp://www.infrae.com/products/tramline17:01
timtesuppose I could17:02
timteright now I'm just curious why it takes so much time though17:02
timtecan I profile zope somehow?17:03
faassenprobably :)17:03
mgedminhttp://mg.pov.lt/blog/profiling.html could be useful17:04
mgedminfind an interesting function (e.g. publish) and add @profile in front17:04
mgedminafter from profilehooks import profile17:05
rockyhmm... action handlers (in formlib) are invoked before render() right?17:06
mgedminyes, I think17:07
*** eins has quit IRC17:12
timtemgedmin: cool, now I got some output, wonder what it means though  :)17:17
mgedminheh17:18
mgedminpython profiling tools are seriously deficient :(17:18
timte:0(sub) takes 8 seconds, wonder what that is17:19
mgedminwhat's the file name?17:19
mgedminor just pastebot the whole thing17:19
*** grahal_ has quit IRC17:20
timtethere is no filename17:20
timteok, I'll paste17:20
timtehttp://zope3.pastey.net/581017:21
mgedmintimte: I bet that's re.sub()17:23
timteyeah, could be17:23
mgedminit spends 10 seconds in javascript.py compress()17:23
mgedminusing a regexp17:23
mgedminI see 'cachingadapter.py'17:24
mgedminso it should be faster the next time17:25
mgedminyou can say @profile(skip=1) to ignore the first request if you want to see the profile of just the second one17:25
timteI request only the javascript file so it's ok.17:26
timteat the top you can see it's only called once17:26
mgedminyes, I saw that17:27
mgedminI was just wondering how long the second request takes17:27
mgedmingiven that there's some caching involved17:27
timtetakes equally long every time17:28
mgedminso the caching doesn't work17:28
mgedminnice :)17:28
mgedmin"I have a problem: I need to compress javascript files.  I know, I'll use a regexp!"17:28
mgedminand now there are two problems :)17:29
*** opetznick has joined #zope3-dev17:32
timteah, it's kukit that does this heavy computation, not zope17:33
timtethe profiler was really helpful17:34
*** softdevr has joined #zope3-dev17:35
*** dlk has joined #zope3-dev17:36
*** jodok has quit IRC17:39
*** J1m has quit IRC17:48
softdevrhi, I'm running the BookMarker demo package on a machine but getting a TypeError - self.fp.readline(1<<16) - TypeError: readline takes exactly 1 argument (2 given)17:48
softdevrthe error is within /usr/local/lib/python2.4/cgi.py and I'm running Zope 3.3 so I'm using the recommended version of python17:49
softdevrany ideas?17:49
*** J1m has joined #zope3-dev17:51
mgedminsoftdevr: upgrade to Zope 3 trunk17:51
mgedminor backport the patch that was applied there17:51
mgedminor wait for Zope 3.3.117:51
mgedminor downgrade Python17:51
*** xenru has joined #zope3-dev17:53
softdevrso you think its a zope / python incompability?17:53
mgedminI know it is17:54
mgedminpython 2.4.4 changed the cgi module in the stdlib in a way that triggers a bug in zope 3.3.0 and earlier17:54
softdevrso python >= 2.4.3?17:55
mgedminwhat is your question again?17:56
softdevrIf I'm going to downgrade python 2.4.3 or earlier will work?17:56
mgedmin2.4.3 works, IIRC17:57
softdevrthanks17:57
*** natea has joined #zope3-dev17:57
* mgedmin would rather upgrade to zope 3 trunk, or the tip of the 3.3 branch instead17:58
*** natea has quit IRC17:59
*** dlk has left #zope3-dev17:59
*** jfroche_ has quit IRC18:05
*** natea has joined #zope3-dev18:06
*** ktwilight_ has joined #zope3-dev18:07
*** natea is now known as natea|snowsprint18:16
*** lzdych has quit IRC18:18
*** ktwilight has quit IRC18:22
*** deo has joined #zope3-dev18:22
softdevrmgedmin: any tips on upgrading? can't find a doc online for upgrading zope 318:25
mgedminhow did you install it?18:25
softdevrfrom source18:25
*** lzdych has joined #zope3-dev18:26
ignasas in - you have downloaded the tarball?18:27
ignasor made an svn checkout?18:27
softdevroh tarball18:27
*** alecm has joined #zope3-dev18:28
mgedminthe world needs a 3.3.118:29
*** J1m has quit IRC18:29
mgedminafaiu the only thing holding it up are some mysterious win32-only test failures18:29
*** tonico is now known as tonico|away18:31
*** J1m has joined #zope3-dev18:31
*** jfroche has joined #zope3-dev18:38
*** jhauser has joined #zope3-dev18:39
*** projekt01 has quit IRC18:47
*** stub has quit IRC18:50
*** tarek has left #zope3-dev18:53
philiKON_mgedmin: correct18:55
philiKON_in zope.app.twisted, iirc18:55
philiKON_for all i care, we can release, but then again, i'm neither the release manager nor a zope-on-windows consumer18:56
*** gintas has quit IRC19:00
*** ivan has left #zope3-dev19:07
*** fcorrea has joined #zope3-dev19:08
*** nathany has quit IRC19:10
WebMavensrichter: I don't know if you continued to pay attention, but I solved yesterday's error.19:16
*** jfroche has quit IRC19:31
softdevrwhere should packages be installed in zope 3 (svn checkout)?19:48
*** mgedmin has quit IRC19:50
d2m_softdevr: in src or anywhere in sys.path19:50
*** reco has quit IRC19:54
*** reco has joined #zope3-dev19:55
*** faassen has quit IRC19:56
*** opetznick has quit IRC20:04
*** ignas has quit IRC20:19
*** reco_ has joined #zope3-dev20:20
*** dunny has joined #zope3-dev20:20
*** niemeyer has quit IRC20:31
*** natea|snowsprint has quit IRC20:31
*** niemeyer has joined #zope3-dev20:36
*** reco has quit IRC20:37
d2m_wendi38: best read is http://www.zope.org/Documentation/Books/ZDG/current/Security.stx20:38
d2m_soory, wrong channel20:38
*** yvl has quit IRC20:43
*** niemeyer has quit IRC20:45
*** macyet has joined #zope3-dev20:55
*** niemeyer has joined #zope3-dev20:57
*** harobed_ has quit IRC21:01
*** niemeyer has quit IRC21:07
*** niemeyer has joined #zope3-dev21:17
*** macyet has left #zope3-dev21:17
*** dunny has quit IRC21:24
*** xenru has quit IRC21:26
*** xenru has joined #zope3-dev21:27
*** harobed has joined #zope3-dev21:33
*** lzdych has quit IRC21:36
*** opetznick has joined #zope3-dev21:39
*** naro has quit IRC21:39
*** rocky is now known as rocky|away21:41
*** jinty has quit IRC21:46
*** dlk has joined #zope3-dev21:49
*** nathany has joined #zope3-dev21:56
*** schwendinger has quit IRC22:00
*** turian has quit IRC22:01
*** dlk has quit IRC22:05
*** mgedmin has joined #zope3-dev22:09
*** natea has joined #zope3-dev22:13
*** schwendinger has joined #zope3-dev22:14
*** schwendinger has quit IRC22:17
*** schwendinger has joined #zope3-dev22:18
*** ktwilight has joined #zope3-dev22:43
*** jodok has joined #zope3-dev22:46
*** pelle_ has quit IRC22:47
*** ktwilight_ has quit IRC22:50
*** dobee has quit IRC22:52
*** ofer has joined #zope3-dev22:53
*** dobee has joined #zope3-dev22:54
*** mgedmin has quit IRC22:58
*** dunny has joined #zope3-dev22:59
*** reco has joined #zope3-dev23:04
*** reco_ has quit IRC23:04
*** fcorrea has quit IRC23:08
*** jhauser has quit IRC23:09
*** d2m__ has joined #zope3-dev23:21
*** d2m__ is now known as d2m23:21
*** naro has joined #zope3-dev23:22
*** d2m__ has joined #zope3-dev23:26
*** d2m_ has quit IRC23:29
*** rocky|away is now known as rocky23:29
*** softdevr has quit IRC23:30
*** svenn has joined #zope3-dev23:32
*** jinty has joined #zope3-dev23:37
*** sashav has joined #zope3-dev23:39
*** sashav has left #zope3-dev23:39
*** d2m has quit IRC23:41
*** nathany has quit IRC23:41
*** ofer has quit IRC23:54
*** naro has quit IRC23:56
*** svenn has quit IRC23:57

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