IRC log of #zope3-dev for Tuesday, 2005-08-16

*** sashav has quit IRC00:20
*** elbixio has quit IRC00:33
*** zagy_ has quit IRC00:51
*** bradb has joined #zope3-dev00:58
*** lunarosity has quit IRC01:12
*** niemeyer has quit IRC01:16
*** benji_york has quit IRC01:29
*** lunarosity has joined #zope3-dev01:37
*** dman13 has quit IRC01:49
*** jinty has left #zope3-dev01:51
*** lunarosity has quit IRC02:07
*** SureshZ has quit IRC02:40
*** SureshZ has joined #zope3-dev02:41
*** Arnia has left #zope3-dev02:48
*** bradb is now known as bradb-away02:54
*** hazmat has joined #zope3-dev03:02
*** RaFromBRC has quit IRC03:12
*** hazmat has quit IRC03:19
*** projekt01 has quit IRC04:20
*** roym has quit IRC04:20
*** sashav has joined #zope3-dev06:00
*** SureshZ has quit IRC07:10
*** stub has joined #zope3-dev07:41
*** sashav has joined #zope3-dev08:06
*** sashav has quit IRC08:08
*** sashav has joined #zope3-dev08:09
*** sashav has quit IRC08:12
*** zagy has joined #zope3-dev08:38
*** zagy has quit IRC08:56
*** zagy has joined #zope3-dev09:00
*** hdima has joined #zope3-dev09:03
*** zagy has quit IRC09:16
*** zagy has joined #zope3-dev09:16
*** Theuni has joined #zope3-dev09:20
*** philiKON has quit IRC09:33
*** j-w has joined #zope3-dev09:37
*** MJ has quit IRC09:39
*** sashav has joined #zope3-dev10:03
*** projekt01 has joined #zope3-dev10:12
*** ignas has joined #zope3-dev10:20
*** timte has joined #zope3-dev10:27
*** loreto has joined #zope3-dev10:53
*** MJ has joined #zope3-dev11:05
*** yota has joined #zope3-dev11:12
*** ignas has quit IRC11:17
*** MrTopf has joined #zope3-dev11:53
*** jinty has joined #zope3-dev11:56
*** stub has quit IRC11:59
*** ignas has joined #zope3-dev12:04
*** _drzoltron has joined #zope3-dev12:15
_drzoltronHi, why does my zope give me this: ConfigurationError: ('Unknown directive', u'', u'localUtility')12:15
_drzoltron ??12:15
_drzoltronwas localUtility in a zcml introduced in 3-3.1  and won't work in 3-3.0 ?12:18
*** roym has joined #zope3-dev12:24
roymFolks, I have a custom folder derived from BTreeContainer; I have13:03
royman iteration adapter whose self.context is of this folder type.13:03
roymHowever, when I try to access the items() method of the self.context,13:03
roymI get:13:03
roym  AttributeError: 'OOBTreeItems' object has no attribute '__class__'13:03
roymI heard that this might be a bug in BTreeContainer.. is this true?13:03
roymWhat can I do to work around this..13:03
_drzoltronlooks like this # is dead today ;)13:05
*** regebro has joined #zope3-dev13:16
*** mgedmin has joined #zope3-dev13:22
*** gintas has joined #zope3-dev13:24
srichter_drzoltron: I am oretty sure localUtility was introduced in 3.113:24
*** mkerrin has joined #zope3-dev13:26
_drzoltronsrichter : works now after having upgraded to 3.3-1 ...13:31
roymIn my view class, I can access a BTreeContainer element by using13:48
roym<container>['ELEM']; however, any attempt to render <container>.items()13:49
roymfails with "AttributeError: 'OOBTreeItems' object has no attribute '__class__'"13:49
roymIs there is a security setting that i need to have? pls help - this13:50
roymis driving me nuts.13:50
*** stub has joined #zope3-dev13:52
*** j-w has quit IRC14:10
srichterroym: the reason noone answers is because noone knows14:16
srichterthat it looks up the __class__ attribute is really weird14:17
srichteryou should never use a pure BTreeContainer14:21
srichtersince there are no security declarations14:21
srichteronly use BTreeContainers to derive others from it14:21
*** bskahan has joined #zope3-dev14:24
*** gintas has quit IRC14:25
stubSomething odd appears to have happened to the SVN repository - the branches tree has been renamed to branch14:30
*** regebro has quit IRC14:34
srichterstub: though I think it was an accidental checkin14:36
srichterfrerich wrote also a German checkin message14:36
srichterwe have to undo 3795614:36
srichterstub: should be fixed14:40
stubYup - my 3.1 checkout is now reattached ;)14:41
srichterwhee :-)14:41
_drzoltronanyone, who wrote a mxODBC da ?14:42
_drzoltroninterested ?14:55
* _drzoltron contemplates writing one14:55
* _drzoltron needs to connect to iODBC14:56
*** ignas has quit IRC14:56
*** horizon5 has quit IRC14:59
roymsrichter: thanks for answering - for a moment, I assumed no-one wanted to help. I am using a derived class (and not BTreeContainer directly). I find that if I do this:15:09
roymit works... where iter.context is my derived class... from what you say15:10
roymit sounds like my security declarations for the derived class are not set up correctly.15:10
srichterhave you made security declarations for this new class?15:13
roymas follows:15:13
roym<content class=".qtmodule.QFolder">15:13
roym   <implements interface=""/>15:13
roym   <require permission="zope.View" interface=".interfaces.IQFolder" />15:13
roym   <require permission="zope.ManageContent" set_schema=".interfaces.IQFolder" />15:13
srichterthis, btw, is not a good security15:14
srichterbecause all write methods have only permission "zope.View"15:14
srichterand of course it all depends how your IQFolder definition looks like15:14
roymI thought set_schema controls that (w/ zope.ManageContent)15:15
srichterbut only attributes15:15
srichtermethods are alway read only15:15
*** horizon5 has joined #zope3-dev15:16
roymso since items() is a method (in BTreeContainer) should I make the permission to access that explicit?15:17
srichtermy book covers how to do that correctly15:17
srichterJust give IReadContainer zope.ManageContent15:17
srichterand IWriteContainer zope.View15:18
roymok - thanks a bunch!15:18
*** gintas has joined #zope3-dev15:19
*** yotaff has joined #zope3-dev15:25
*** niemeyer has joined #zope3-dev15:56
*** benji_york has joined #zope3-dev16:00
*** bradb-away is now known as bradb16:04
*** stub has quit IRC16:21
*** ignas has joined #zope3-dev16:27
*** kudagagah has joined #zope3-dev16:41
*** bskahan has quit IRC16:53
srichterbenji_york: your revision 37948 on the branch seriously broke SchoolTool16:55
srichterit does not allow us to change the request in the usual way16:56
srichterwhich means it is an API change16:56
srichterthat definitely means it cannot be in 3.1 and really needs BBB code in the trunk16:57
mgedminit is entirely possible that we do something dirty and incorrect in ST16:57
mgedminlet me investigate a bit more16:57
srichterwell, till now there was no good way to change the request16:58
srichterI think the checkin tried to fix this16:58
mgedminwe override HTTPCaller.chooseRequestClass16:58
srichterthis method is gone now16:58
srichterso it is clearly an API change16:59
*** bradb has quit IRC16:59
benji_yorksrichter, I'm back and catching up on messages17:00
*** bradb has joined #zope3-dev17:00
mgedminressurecting HTTPCaller.chooseRequestClass that just calls the global chooseClasses would probably fix our use case17:00
srichterall we really need is the chooseRequestClass method again, I guess17:01
srichtermgedmin: yep, and this would be good BBB as well17:01
andrew_mi understand that @@ is short for ++view++, but what's the diff between /blah/@@edit.html and /blah/edit.html? why the @@? both URLs seem to work and do the same..17:02
benji_yorkmgedmin and srichter, ok, I'll re-introduce chooseRequestClass as a wrapper around the new behavior17:02
srichtercool, thanks a lot; I think to keep it is useful anyways17:03
benji_yorkif we want it to be part of the API should it not be tested17:03
srichterof course :-)17:03
benji_yorkok, I'll add tests too, should it be depricated?17:04
srichterI would prefer not to17:04
benji_yorkthat's fine with me17:04
srichterI don't see how we, SchoolTool, could otherwise enforce our request and publiscation17:04
srichterwe would rely on chooseClasses which might not do the right thing in the testing environ17:05
benji_yorkthat's what I fixed17:05
mgedminin ST we register our custom ServerType with a custom RequestFactory, and bind it to a different port17:05
mgedminwe need to ensure our request factory is used in functional tests -- sometimes, not always17:06
benji_yorkI'm providing my own request and response and it wasn't working in tests, so I fixed it (also unifying two copies of *almost* the same code)17:06
mgedminfor that we invent a new function like 'http' , but use a HTTPCaller subclass that overrides chooseRequestClass and returns our custom publication factory17:06
mgedminthat's it17:06
benji_yorkmgedmin, I wouldn't do that, I'd use the new way of registering a utility17:07
*** Alef has joined #zope3-dev17:07
mgedminwhat do you mean?17:07
benji_yorkthere was a recent patch so that (the then) chooseRequestClass  would check for a utility with the right interface and use that for the request, or if none was registered, use the original one17:08
srichterbenji_york: that will not work for us!!!!17:09
srichterbecause the utilities are registered for all HTTP servers17:09
benji_yorkahh, that makes sense17:10
srichterbut we want one HTTP server to have the default behavior and one using REST (pure HTTP)17:10
srichterwe definitely want to override chooseClasses to always return HTTPRequest, HTTPPublication17:11
*** hdima has quit IRC17:11
srichterin the server we can do this easily17:11
benji_yorkok, like I said, I'll re-instate chooseRequestClass, add tests so it doesn't "disappear" in the future and we'll be all set17:12
srichterby overriding the method that returns the factories17:12
srichteryep :-)17:12
*** regebro has joined #zope3-dev17:12
srichtersorry, to be so pressing, but it stalled all of the ST development plus the upcoming release :-)17:13
benji_yorkNP, highlights the need for tests for anything that is supposed to be stable17:14
*** Alef has quit IRC17:15
*** bskahan has joined #zope3-dev17:16
*** sashav has quit IRC17:21
*** tvon has quit IRC17:22
*** zagy_ has joined #zope3-dev17:40
*** anguenot has joined #zope3-dev17:46
_drzoltronthe IRC log of Monday, 2005-03-07 shows a DMHarden, does anyone know the guy ?17:48
_drzoltronhe talked about that he was successful connection to ODBC17:52
_drzoltronI am not, that's why :)17:52
_drzoltronbut I am very close17:52
benji_york_drzoltron, what kind of problem are you having?17:53
_drzoltroniODBC returns a Function sequence error17:53
_drzoltronbenji_york: iODBC throws this one back: DatabaseException: ('S1010', 0, '[iODBC][Driver Manager]Function sequence error', 5905)17:54
*** zagy has quit IRC17:55
_drzoltronI use mxODBC.iODBC ..... they talk about the problem on their site ... saying "Added a compile time switch" ..... wonder what a compile time switch is ???17:56
benji_yorkah, that error only happens "when executing an already prepared cursor a second time."17:58
_drzoltronbenji_york: what would be the solution ?17:59
_drzoltronand why is the ZopeDatabaseAdapter executing things twice ?18:00
benji_yorkI don't know much about mxODBC in particular, but either upgrade to the version that fixes the problem, or issue a dummy request that would cause the current prepaird statement to be flushed18:00
*** kudagagah has quit IRC18:00
benji_yorkI don't know why that would be, but it's not unusual to prepare a statement and run it wilth multiple data sets18:00
_drzoltronbenji_york: I even get it when I connect the DA to the rdb18:01
_drzoltronlooks like hacking into of ...18:01
benji_yorkwhat version of mxODBC are you using?18:01
_drzoltronwonder what egenix means with "If CLOSE_AFTER_FETCH_ONLY is defined during compilation"18:02
benji_yorkhmm, that fix is listed as applying to 2.0.0, I'd ask in a mxODBC specific place18:02
benji_yorkI read that as saying it modifies the meaning of  CLOSE_AFTER_FETCH_ONLY also.18:02
*** SureshE has joined #zope3-dev18:02
*** __gotchaway has joined #zope3-dev18:03
*** __gotchaway is now known as __gotcha18:03
_drzoltronthe whole paragraph comes here: Added a compile time switch to fix a case where you'd sometimes get a function sequence error when executing an already prepared cursor a second time. mxODBC usually always closes the cursor before execution. If CLOSE_AFTER_FETCH_ONLY is defined during compilation, it now only does so in case it has to prepare a new command on the cursor or a fetch was in progress. Thanks to Paul Boddie for bringing this to my18:03
benji_yorkyep, I saw it on the site18:04
_drzoltronit's not that hey mean to their package with this switch ?!18:04
benji_yorkI don't think so (and wouldn't that be
_drzoltronbenji_york: sure ;)18:08
_drzoltronwhats a compile time switch ?18:08
yotaffanguenot: ping18:09
benji_yorkanything (usually a defined constant) that changes what code is compiled in (ususally C or C++), I'm sure they're talking about the extention module, but I don't think you need to worry about the switch, it was affected by the bug fix, it doesn't *enable* the bug fix18:10
yotaff__gotcha: ping18:10
__gotchayotaff: yes ?18:10
_drzoltronbenji_york: thanx ... will trace a bit through app.zope.rdb then18:11
anguenotyotaff: yo !18:13
benji_york_drzoltron, I'd also see out an mxODBC specific place (IRC, mailing list) and see if they have any more info18:13
*** MrTopf has quit IRC18:13
_drzoltronhave been googling for a while now,sent them a mail too but somehow cannot sit still until they might answer18:14
_drzoltronthis just HAS to work out, a iODBC da for Z3 would be quite cool18:14
*** juka has joined #zope3-dev18:29
benji_yorksrichter, mgedmin: the resurection and testing of chooseRequestClass is complete18:32
benji_yorkplease let me know if your tests pass18:32
*** tvon has joined #zope3-dev18:32
srichterok, let me check18:33
srichterthanks a lot18:33
srichterbenji_york: we need this in the 3.1 branch as well18:33
srichterah ok, mail came through18:34
srichterbenji_york: looks good; my branch tests pass; thanks again18:36
benji_yorkNP, you'll break something of mine one day  :)18:37
mgedminI get  ImportError: cannot import name chooseClasses18:37
mgedmin  File "/home/mg/src/schoolbell/Zope3/src/zope/app/testing/", line 53, in ?18:37
mgedmin    from import chooseClasses18:37
mgedminsvn:// rev 3796418:38
mgedminoh, my fault18:38
mgedminI reverted change, and didn't revert it back18:38
mgedminbenji_york, works like charm, thanks!18:40
*** timte has quit IRC18:44
*** loreto has quit IRC18:49
_drzoltronbenji_york: egenix says this: You need to set switch when compiling... Check the documentation for18:53
_drzoltronDistutils. If you need additional support for this then please purchase a18:53
_drzoltronsupport ticket.18:53
_drzoltronand then they want to sell me a support ticket18:53
*** Alef has joined #zope3-dev19:13
*** yotaff has quit IRC19:17
*** MJ has quit IRC19:18
*** gintas has quit IRC19:25
*** jinty has quit IRC19:32
*** bradb is now known as bradb-lunch19:36
*** MJ has joined #zope3-dev19:43
_drzoltronbenji_york: now it gives me a NotSupportedError: connection has AUTOCOMMIT turned on19:46
*** sashav has joined #zope3-dev19:49
benji_york_drzoltron, any more detail in the error message?  Does the DB not support user-controlled transactions?19:53
_drzoltronerh no no more details19:54
benji_yorkperhaps turn off AUTOCOMMIT?19:55
_drzoltronactually this is not a db I am connecting to but an Access .mdb file via mdbtools & iODBC19:55
_drzoltronworking on it19:55
*** faassen has joined #zope3-dev19:57
_drzoltronturned it off but it still tells me that it is turned on hmmm20:03
*** bradb-lunch is now known as bradb20:37
*** regebro has quit IRC20:42
*** sashav has quit IRC20:46
*** SureshE has quit IRC20:50
*** faassen has quit IRC21:02
*** zagy_ has quit IRC21:05
*** tvon|x31 has joined #zope3-dev21:06
*** tvon has quit IRC21:10
*** tvon|x31 is now known as tvon21:10
*** zagy_ has joined #zope3-dev21:18
*** mgedmin has quit IRC21:36
*** anguenot has quit IRC21:45
*** timte has joined #zope3-dev21:51
*** mkerrin has quit IRC21:55
*** ignas has quit IRC21:59
*** sashav has joined #zope3-dev22:06
*** tvon has quit IRC22:28
*** juka has left #zope3-dev22:30
*** _drzoltron has quit IRC22:35
*** tvon has joined #zope3-dev22:50
*** dman13 has joined #zope3-dev23:24
*** niemeyer has quit IRC23:48
*** bskahan has quit IRC23:58

Generated by 2.15.1 by Marius Gedminas - find it at!