*** niemeyer has quit IRC | 00:05 | |
*** AI_ has joined #zope3-dev | 00:12 | |
*** AI_ has left #zope3-dev | 00:12 | |
*** tav has joined #zope3-dev | 00:25 | |
mp | is there absolute_url in zope3? (vh aware) | 00:36 |
---|---|---|
J1m | yes | 00:37 |
*** SteveA has quit IRC | 00:38 | |
*** J1m has quit IRC | 00:38 | |
*** philiKON has joined #zope3-dev | 00:45 | |
*** SteveA has joined #zope3-dev | 00:54 | |
*** theuni has quit IRC | 00:54 | |
*** anguenot has joined #zope3-dev | 01:03 | |
*** MrTopf has quit IRC | 01:19 | |
_projekt01 | What's the best concept to set and get additional principal information? | 01:43 |
*** _projekt01 is now known as projekt01 | 01:44 | |
projekt01 | Or how can I get the InternalPrincipal form the PrincipalFolder if I have the castrated principal form the request? | 01:49 |
*** stub has quit IRC | 01:58 | |
philiKON | adapt? | 01:59 |
projekt01 | To what? | 01:59 |
philiKON | to a more specific interface than the "castrated" one | 01:59 |
philiKON | dunno, whatever you need i guess | 02:00 |
projekt01 | I don't know where my principal folder is. | 02:00 |
projekt01 | Of corse I know but then I do it by hand. | 02:00 |
projekt01 | There is no API for such use cases. | 02:00 |
philiKON | isn't there a way to query every authentication utility for the principal? | 02:01 |
projekt01 | Hm, I think so, but I don't like to use this complicated source search. | 02:02 |
projekt01 | But perhaps I have to. | 02:02 |
benji_york | how about IAuthentication's getPrincipal(id) | 02:02 |
philiKON | that's what i meant | 02:03 |
philiKON | anyway, i'm going to bed | 02:03 |
philiKON | g'night | 02:03 |
benji_york | bye | 02:04 |
projekt01 | Thanks, this could work or at least help a little bit, good night. | 02:04 |
projekt01 | benji_york, Ah, now I understand, getPrincipal queries the next services too and accept the request.principal.id with source suffix | 02:07 |
projekt01 | That's exactly what I need, thanks a lot. | 02:08 |
benji_york | np | 02:09 |
*** SteveA has quit IRC | 02:14 | |
*** bskahan has joined #zope3-dev | 02:26 | |
*** yota has quit IRC | 02:32 | |
*** bskahan has quit IRC | 02:55 | |
*** genconc has quit IRC | 02:55 | |
*** bskahan has joined #zope3-dev | 03:27 | |
bob2 | oh lordy | 03:53 |
bob2 | I spent all the time trying to run the tests | 03:53 |
bob2 | when test.py had all the boilerplate needed | 03:54 |
srichter | :-) | 03:56 |
srichter | you should read the Zope 3 books | 03:56 |
benji_york | srichter, Jim's new test runner isn't going to be in 3.1 is it? | 03:57 |
srichter | I am not sure | 03:58 |
srichter | I thought I saw him hooking it up | 03:58 |
srichter | but then he said he did not do it | 03:58 |
bob2 | srichter: hah, I bought and read both your books already, but there's a lot to keep in my head at once | 03:59 |
srichter | bob2: I have an entire part on testing; it would have been easy to find ;-) | 04:00 |
*** philiKON has quit IRC | 04:10 | |
*** tim2p has quit IRC | 04:15 | |
benji_york | he hooked it into ZODB because Tim was having some problems with the old test runner, and we use it on some of our customer projects | 04:21 |
srichter | I see | 04:26 |
*** projekt01 has quit IRC | 04:29 | |
*** tav is now known as hiroko | 04:54 | |
*** hiroko is now known as tav | 04:56 | |
*** ChanServ sets mode: +o tav | 04:56 | |
*** benji_york has quit IRC | 05:03 | |
*** benji_york has joined #zope3-dev | 05:05 | |
*** d2m has quit IRC | 05:06 | |
*** alga has quit IRC | 05:09 | |
*** bskahan has quit IRC | 05:18 | |
*** benji_york has quit IRC | 05:51 | |
*** vitaly has joined #zope3-dev | 05:56 | |
*** vitaly has left #zope3-dev | 06:38 | |
*** vitaly has joined #zope3-dev | 06:39 | |
*** vitaly has quit IRC | 06:39 | |
*** vitaly has joined #zope3-dev | 06:41 | |
*** vitaly has joined #zope3-dev | 06:43 | |
*** MiUlEr has joined #zope3-dev | 06:55 | |
*** douglasc has joined #zope3-dev | 07:06 | |
*** douglasc has quit IRC | 07:32 | |
*** d2m has joined #zope3-dev | 08:28 | |
*** rk has joined #zope3-dev | 08:32 | |
zagy | moin | 08:38 |
*** cwells has joined #zope3-dev | 08:56 | |
*** hdima has joined #zope3-dev | 09:18 | |
*** rk has quit IRC | 09:49 | |
*** d2m has quit IRC | 09:54 | |
*** d2m_ has joined #zope3-dev | 09:54 | |
*** d2m_ is now known as d2m | 09:54 | |
*** yota has joined #zope3-dev | 09:57 | |
*** Theuni has joined #zope3-dev | 10:03 | |
*** philiKON has joined #zope3-dev | 10:08 | |
*** Theuni has quit IRC | 10:26 | |
*** Theuni has joined #zope3-dev | 10:27 | |
*** projekt01 has joined #zope3-dev | 11:01 | |
*** anguenot has quit IRC | 11:13 | |
bob2 | oh, cool, I made python segfault | 11:25 |
bob2 | (from zope3) | 11:26 |
hdima | FreeBSD? | 11:27 |
bob2 | linux | 11:27 |
hdima | Hmm... strange :-) | 11:27 |
bob2 | reproducibly, no less | 11:28 |
bob2 | add calls to pdb.set_trace() in a zope component, the hit ctrl-c a few times after it breaks | 11:28 |
*** MrTopf has joined #zope3-dev | 11:46 | |
*** bskahan has joined #zope3-dev | 11:55 | |
*** timte has joined #zope3-dev | 12:01 | |
*** bskahan has quit IRC | 12:13 | |
*** faassen has joined #zope3-dev | 12:30 | |
*** anguenot has joined #zope3-dev | 12:34 | |
*** tekNico has joined #zope3-dev | 12:54 | |
tekNico | Hi guys, anyone taking questions? :-) | 12:55 |
tekNico | Questions re: Zope3-Twisted integration, that is. | 12:56 |
* philiKON points to srichter | 13:02 | |
tekNico | philiKON: he's the one I hoped would get the bucket, yes. ;-) | 13:03 |
bob2 | hah | 13:05 |
philiKON | tekNico, he's on U.S. eastern time though | 13:28 |
philiKON | prolly still asleep | 13:28 |
tekNico | philiKON: thanks, I'll try again later. | 13:30 |
MrTopf | so somebody should wake him up ;-) | 13:30 |
MrTopf | philiKON: btw, I again looked at the pipelines code by Tres and he's actually using the stored config in one case (though it was commented out). Basically used as an event subscriber. | 13:31 |
philiKON | like we did :) | 13:31 |
MrTopf | dunno if this might be a pattern I can use.. still looks a bit like a hack ;-) | 13:31 |
MrTopf | well, a bit different still | 13:31 |
MrTopf | as he stores the config inside the package via setattr | 13:31 |
philiKON | ah, right | 13:31 |
philiKON | yeh | 13:32 |
MrTopf | and thus set's this config (which is callable) as event subscriber | 13:32 |
MrTopf | actually the config is the pipeline object | 13:32 |
philiKON | right, right | 13:32 |
philiKON | oh well, hacky, yes | 13:32 |
MrTopf | was a bit hard to understand also | 13:32 |
philiKON | hehe, yeah | 13:33 |
philiKON | i think things like these reach the limit of zcml configuration | 13:33 |
MrTopf | and I tried on the train the stuff we talked about for my reference configuration | 13:33 |
philiKON | or, limits i should say | 13:33 |
MrTopf | which seems to work | 13:33 |
philiKON | cool | 13:33 |
MrTopf | but also sort of hacky ;-) | 13:33 |
MrTopf | maybe I should also test it with more than one config if nothing goes wrong then | 13:34 |
MrTopf | though I wonder if I not just store these settings in a separate file and read this from the tool | 13:34 |
MrTopf | anyway, lunch time.. | 13:36 |
*** lunati1 has joined #zope3-dev | 13:38 | |
*** anguenot has quit IRC | 14:09 | |
*** regebro has joined #zope3-dev | 14:12 | |
srichter | tekNico: I am up now | 14:15 |
tekNico | srichter: Hi, thanks for replying. :-) | 14:19 |
tekNico | I'd like to know more about Zope3-Twisted integration. | 14:20 |
srichter | what about it? | 14:20 |
tekNico | I was wondering about the concurrency model. | 14:20 |
tekNico | I worked a lot with Zope2, and then with Twisted. | 14:21 |
srichter | concurrency model? | 14:21 |
tekNico | I wonder what, if any, is the native concurrency model of Zope3. | 14:21 |
tekNico | I mean, Zope2 is multithreaded, and Twisted use async events. | 14:21 |
srichter | I do not know what a "concurrency model" is | 14:21 |
srichter | oh | 14:21 |
srichter | twisted.web2 creates a new thread when calling the WSGI application | 14:22 |
srichter | and twisted.ftp also creates a thread when calling certain functions of the virtual file system (I have not checked, but that was the plan) | 14:22 |
srichter | so it works exactely like the onld ZServer (medusa) | 14:23 |
tekNico | So Zope3 is multithreaded too, and the integration happens on that level? | 14:23 |
srichter | have an async architecture with thread-based application calls | 14:23 |
tekNico | I see how in a Zope3-centric world view that's useful in itself. | 14:24 |
srichter | yes to multithreaded; integration happens between server and publisher (classical WSGI server/application scenario) | 14:24 |
tekNico | However, in a Twisted-centric world view, I wonder what Zope3 components I may use inside the async events model. | 14:25 |
tekNico | After all, zope.interface works well natively in Twisted 2.0 . | 14:25 |
srichter | you can use everything pretty much | 14:25 |
srichter | the reason twisted creates threads for application calls is that those calls might take a long time | 14:26 |
tekNico | As long as each function or method does not block, though. | 14:26 |
tekNico | Exactly. | 14:26 |
bob2 | will there be a move to make it easy to do non-blocking apps? | 14:26 |
srichter | no | 14:27 |
srichter | there is no need to | 14:27 |
tekNico | Because Zope3 is still multithreaded at heart, and blocking, or not, is not a main development concern, right? | 14:28 |
srichter | you don't want to have `Deferred`s all over the place in Zope 3 code; it would not really buy you anything | 14:28 |
philiKON | tekNico, everything that is not in zope.app should work in twisted as well | 14:28 |
philiKON | tekNico, once you enter zope.app, you're dealing with very Zope3-(the application server)-specific components | 14:28 |
*** lunati1 has quit IRC | 14:28 | |
srichter | non-blocking code is only important for network communication | 14:28 |
tekNico | What about other potentially blocking operation, like file access, or long computations? | 14:29 |
tekNico | (No, I wouldn't want to have Deferreds all over Zope3 code. :-) ) | 14:30 |
srichter | what about those? For Zope 3 it is not important how long a request takes | 14:30 |
tekNico | I understand that, but it indeed is important for Twisted, or any other events-based code. | 14:31 |
srichter | well, it depends on your design then | 14:31 |
srichter | for example, you can use zope.component without any problems | 14:31 |
srichter | (I hope the twisted community will use that package eventually) | 14:32 |
srichter | since all calls there are non-blocking | 14:32 |
tekNico | Of course I can go over the code of any component I'm interested in, and check that nothing in it blocks. | 14:32 |
tekNico | However, that work will have to be redone at each new release, since the code will not have been written with non-blockingness in mind. | 14:33 |
tekNico | I realize it may be too much of a concern for too little gain, in general. | 14:33 |
tekNico | For Zope3 developers, I mean. | 14:33 |
tekNico | But a list of components with amount of non-blocking probability would be useful, maybe. | 14:34 |
tekNico | Just an indication, no promises, of course. :-) | 14:34 |
srichter | feel free to do it | 14:36 |
tekNico | Of course. :-) | 14:36 |
tekNico | Alas, I'm not a Zope3 developer, so my list would be static, and would probably get obsolete after a while. | 14:37 |
tekNico | It's my impression that such information, if kept updated, could help reuse of Zope3 components in Twisted. | 14:37 |
tekNico | But maybe those capable enough to develop Twisted itself do not need such a list, they can extract the info themselves. | 14:39 |
srichter | you would really need to identify what is usable to Twisted | 14:39 |
tekNico | Then there's the rest of us, that just use it, and hope to use parts of Zope3 too. | 14:39 |
srichter | I am pretty sure that the list you come up with only contains non-blocking components | 14:39 |
tekNico | It looks like a fairly big chunk of work, though, having to go over the code of many Zope3 components. | 14:41 |
srichter | yep | 14:42 |
tekNico | I think I now understand a little better where some of the Twisted guys' NIH syndrome comes from. :-) | 14:43 |
srichter | NIH? | 14:43 |
tekNico | Not Invented Here. | 14:44 |
*** SteveA has joined #zope3-dev | 14:44 | |
philiKON | srichter, the very same problem zope has had and is (hopefully) getting rid of | 14:45 |
bob2 | zope3 seems to be a lot less NIH-y | 14:46 |
srichter | right | 14:46 |
bob2 | and on that topic, where is a good place to initialise loggers? | 14:46 |
bob2 | ie should I try to hook into the instance startup? | 14:47 |
srichter | the twisted guys will eventually learn that writing everything yourself does not help | 14:47 |
srichter | loggers are controlled via zope.conf | 14:47 |
tekNico | srichter: that sounds rather condescending. :-( | 14:47 |
bob2 | hrm, for application-specific logging? | 14:47 |
srichter | bob2: depends on your use cases | 14:48 |
tekNico | I was trying to say that having a different execution (concurrency) model limits your chances of reusing stuff. | 14:48 |
tekNico | And that's happening again. | 14:48 |
srichter | tekNico: no, it is not; it's just part of the learning process of a community | 14:48 |
bob2 | srichter: ah. well, I'd like to be able to log specific changes to one of my objects | 14:49 |
srichter | bob2: have an event subscriber to IObjectModifiedEvent and IMyContentType | 14:49 |
tekNico | srichter: except that there are different communities at work here, not just one. | 14:50 |
bob2 | srichter: right, but where should I be initialising logger? | 14:50 |
*** __gotchaway has joined #zope3-dev | 14:50 | |
tekNico | srichter: then there's the question of what execution model is better. | 14:50 |
*** __gotchaway is now known as __gotcha | 14:50 | |
srichter | tekNico: what do you mean by "execution model"? | 14:51 |
philiKON | srichter, sometimes communities don't have to go thru that phase because their philosophy is totally based on reuse... see svn for example | 14:51 |
tekNico | srichter: same as before, execution, or concurrency, model, multithreading vs. async events. | 14:51 |
srichter | philiKON: right, I agree, but then some members had gone through that phase before ;-) | 14:51 |
philiKON | srichter, true :) | 14:51 |
srichter | tekNico: you cannot say which one is better | 14:52 |
tekNico | srichter: I may be mistaken, but I think I can. I'm not alone, either. :-) | 14:53 |
srichter | tekNico: I think twisted's model is good, since they deal with networking applications; Zope 3 does only marginally know about threads; it just executes what has to be done | 14:53 |
srichter | then why don't all those GUI frameworks and low-level OS ops switch to async models? | 14:54 |
srichter | anyway, this discussion is totally pointless | 14:54 |
tekNico | srichter: as you prefer. | 14:55 |
tekNico | srichter: Anyway, thanks for having answered my questions, and suffered through some rants. :-) | 14:55 |
tekNico | srichter: but wait a minute. You said: | 14:56 |
tekNico | "Zope 3 does only marginally know about threads; it just executes what has to be done" | 14:56 |
tekNico | srichter: And that's very good. Now, to really be concurrency-model-agnostic, it would only take avoiding blocking, and then it could be used in multiprocessing, multithreaded, and async events apps. :-) | 14:57 |
bob2 | that's a pretty big "only" :) | 14:58 |
tekNico | srichter: but as with everything, nothing comes without effort, and everyone will have to evaluate if it's worth the gain by him/herself. | 14:58 |
tekNico | bob2: of course. :-) | 14:58 |
tekNico | Well, thanks again to everybody, and keep up the great, if slightly multithreaded, work. ;-D | 15:02 |
*** efge has joined #zope3-dev | 15:03 | |
*** tekNico has left #zope3-dev | 15:03 | |
*** __gotcha has quit IRC | 15:05 | |
*** __gotcha has joined #zope3-dev | 15:06 | |
*** benji_york has joined #zope3-dev | 15:06 | |
*** mgedmin has joined #zope3-dev | 15:11 | |
*** MiUlEr has quit IRC | 15:12 | |
*** stub has joined #zope3-dev | 15:15 | |
*** __gotcha_ has joined #zope3-dev | 15:23 | |
*** tvon has joined #zope3-dev | 15:31 | |
*** __gotcha has quit IRC | 15:37 | |
*** mkerrin has joined #zope3-dev | 15:38 | |
*** niemeyer has joined #zope3-dev | 15:53 | |
*** __gotcha_ has quit IRC | 16:02 | |
*** __gotcha_ has joined #zope3-dev | 16:02 | |
*** __gotcha_ is now known as __gotcha | 16:02 | |
*** gintas has joined #zope3-dev | 16:06 | |
srichter | benji_york: I think for testing purposes we only have to register resources | 16:14 |
srichter | this should suffice and is much easier to do | 16:15 |
benji_york | yep, I'm actually working on that a bit right now | 16:15 |
srichter | cool | 16:15 |
*** MrTopf has quit IRC | 16:45 | |
srichter | benji_york: would you think that exposing the handle_errors argument of HTTPCaller in open() and click() would be desirable? | 16:49 |
srichter | I think it would, since it would allow for quick debugging | 16:49 |
srichter | so if browser.click('Foo') fails with a system error, I could quickly type browser.click('Foo', handle_errors=False) to isnpect the exception | 16:50 |
*** stu1 has joined #zope3-dev | 16:55 | |
srichter | benji_york: why did you not just make _findControl a function of the class, but this weird property? | 16:57 |
benji_york | srichter: re handle_errors: I had thought about that, I think it would be OK, but I would like to extend it a bit, so if an exception is raised, you get the *real* traceback from the publisher (like the one that would go to the log) | 16:59 |
srichter | ok, what do we get now? | 17:00 |
benji_york | srichter: re _findControl: that is some leftover-debugging code, it should just be a normal function | 17:00 |
srichter | ok | 17:00 |
benji_york | now we get a traceback from urllib2 saying: hey, the site returned a status 500 | 17:01 |
srichter | oh, ok; | 17:01 |
srichter | so where does the traceback then come from? | 17:02 |
benji_york | that's not real informative, it's just hiding the real traceback (but I'm not entirely sure how to get that to happen) | 17:02 |
benji_york | which traceback, the one talking about the 500? | 17:02 |
srichter | I thought handle_error=False in the HTTP caller just raises the error and it propagates all the way through | 17:02 |
srichter | so you can say: | 17:03 |
srichter | try: | 17:03 |
srichter | http('...', handle_errors=False) | 17:03 |
srichter | except, err: #Bare for now | 17:03 |
srichter | print err | 17:03 |
benji_york | right, that's what I thought too, but something is catching it and raising a different exception, I haven't had time to track down why yet | 17:03 |
*** jw has joined #zope3-dev | 17:03 | |
srichter | mhh, ok | 17:04 |
*** stub has quit IRC | 17:10 | |
*** MrTopf has joined #zope3-dev | 17:16 | |
*** stu1 has quit IRC | 17:17 | |
*** SteveA has quit IRC | 17:17 | |
*** hdima has quit IRC | 17:25 | |
bob2 | it'd be cool to be able to name doctests | 17:28 |
srichter | why? | 17:28 |
bob2 | for when using the verbose testrunner | 17:29 |
bob2 | I guess it's a "don't do that" thing | 17:30 |
srichter | benji_york: mmh, if I change the argument handle_errors=True in caller = HTTPCaller(), caller(str, handle_errors=True) the error will propagate to the functional test | 17:30 |
srichter | benji_york: so the following works: | 17:30 |
srichter | >>> try: | 17:30 |
srichter | ... browser.open('http://localhost/invalid') | 17:30 |
srichter | ... except Exception, error: | 17:30 |
srichter | ... print error | 17:30 |
srichter | HTTP Error 404: Not Found | 17:30 |
srichter | bob2: ahh, ok, I never used that ;-) | 17:30 |
srichter | so now it all just become a matter of properly channeling the argument through the layers, which might not be that trivial | 17:31 |
srichter | aehm, I meant to say: | 17:34 |
srichter | bmmh, if I change the argument handle_errors=True in caller = HTTPCaller(), caller(str, handle_errors=False) the error will propagate to the functional test | 17:34 |
srichter | >>> browser.open('http://localhost/invalid') | 17:35 |
srichter | Traceback (most recent call last): | 17:35 |
srichter | ... | 17:35 |
srichter | NotFound: Object: <zope.app.folder.folder.Folder object at ...>, name: u'invalid' | 17:35 |
benji_york | srichter: cool | 17:37 |
*** stub has joined #zope3-dev | 17:54 | |
*** tvon has quit IRC | 18:03 | |
*** alga has joined #zope3-dev | 18:09 | |
*** projekt01 has quit IRC | 18:16 | |
*** regebro has quit IRC | 18:17 | |
*** SureshZ has joined #zope3-dev | 18:33 | |
*** regebro has joined #zope3-dev | 18:45 | |
*** MrTopf_ has joined #zope3-dev | 18:45 | |
*** MrTopf has quit IRC | 18:54 | |
*** MrTopf_ has quit IRC | 18:57 | |
*** BjornT has joined #zope3-dev | 19:04 | |
*** SteveA has joined #zope3-dev | 19:05 | |
*** J1m has joined #zope3-dev | 19:06 | |
benji_york | afk - lunch | 19:08 |
benji_york | back | 19:39 |
*** tvon has joined #zope3-dev | 19:54 | |
*** gintas has quit IRC | 20:00 | |
*** regebro has quit IRC | 20:17 | |
mgedmin | bin/debugzope tips and tricks #73651: `import readline` works and makes the session much more pleasant | 20:22 |
srichter | what's that? | 20:22 |
mgedmin | bin/debugzope warts #42: `help(debugger)`, `help(debugger.run)`, `help(debugger.publish)` are absolutely noninformative | 20:22 |
mgedmin | 'import readline' lets raw_input() use the readline module for history and other niceties | 20:23 |
mgedmin | what's the diff between debugger.run() and debugger.publish()? | 20:23 |
efge | hm I don't need import readline, it's already there when I launch the python prompt | 20:23 |
mgedmin | efge, but is it there when you run bin/debugzope? | 20:24 |
mgedmin | it isn't for me | 20:24 |
benji_york | mgedmin: what OS? | 20:25 |
efge | ah I haven't tried that one. One zope 2, bin/zopectl debug has readline too, never tried the Zope 3 one | 20:25 |
mgedmin | and the answer to my question is: debugger.publish is like debugger.run, but publish prints the response body to stdout, while run doesn't | 20:25 |
mgedmin | benji_york, linux | 20:25 |
mgedmin | ubuntu, to be more specific | 20:25 |
J1m | run also tells the publisher not to handle errors. | 20:26 |
mgedmin | I'd like to write some docstrings for those methods | 20:26 |
*** faassen has quit IRC | 20:29 | |
* mgedmin is testing his generation scripts on a copy of Data.fs with bin/debugzope | 20:29 | |
*** efge has quit IRC | 20:30 | |
philiKON | mgedmin, you're right, i don't have readline features on zopectl debug even though the python prompt has 'em | 20:31 |
*** __gotcha is now known as __gotchaway | 20:31 | |
mgedmin | philiKON, you will get them if you manually import readline | 20:32 |
*** JZ has joined #zope3-dev | 20:37 | |
benji_york | mgedmin: that's what I thought, I switched my laptop to Ubuntu a month or so ago and have the same problem | 20:41 |
*** povbot` has joined #zope3-dev | 20:52 | |
*** RaFromBRC has joined #zope3-dev | 21:04 | |
*** povbot has quit IRC | 21:09 | |
mp | how do I get title of the rest document in zope3? :) | 21:12 |
srichter | how do you get to the rest document in the first place? | 21:14 |
mp | well, at the beginning there are lots of bytes | 21:16 |
mp | which accidentally form in memory an object of unicode class | 21:16 |
mp | which in turn is converted to rest source using named factory zope.rest.source | 21:17 |
mp | and lot's of things can happen to this source | 21:17 |
srichter | right | 21:17 |
srichter | this Source is not a rest object | 21:18 |
mp | well, those bytes are rest document :) | 21:18 |
mp | meaning of them is :) | 21:18 |
srichter | it has merely a marker interface saying that the contents is ResT | 21:18 |
srichter | huh | 21:18 |
srichter | can you paste the code in a compact form here? | 21:19 |
mp | I didn't really say that I have rest object (well, I didn't mean that). There is a rest->html renderer... At some point it uses rest machinery. But I don't think there is a way to get to the structure of this document (like sections etc) this way.. maybe there is some other way? | 21:20 |
srichter | no, not this way | 21:20 |
srichter | you have to do the work yourself | 21:20 |
mp | By "having rest document" I mean having unicode string with rest document source.. | 21:21 |
srichter | ok | 21:21 |
mp | ok, thanks very much :) | 21:21 |
srichter | so you can look at zope.app.renderer.rest to see how to create a document | 21:21 |
mp | hm... at some point it might be a lot easier to convert rest to html "by hand" (without adapters etc).. when there's a need for some non-standard things | 21:22 |
mgedmin | (evil brute force way: use lxml's xpath to extract the title from the document rendered into html) | 21:22 |
mp | well, I'm learning zope and doing my own private playing stuff, so I'll skip evil brute force ways for now :) | 21:23 |
srichter | mgedmin: but once he has the rest doc parsed, he gets all this info for free | 21:23 |
mp | I do evil brute force things at work :] | 21:23 |
*** tav_ has joined #zope3-dev | 21:24 | |
*** tav has quit IRC | 21:33 | |
*** bskahan has joined #zope3-dev | 21:36 | |
*** sureshvv has joined #zope3-dev | 21:51 | |
*** MrTopf has joined #zope3-dev | 21:59 | |
*** projekt01 has joined #zope3-dev | 22:02 | |
*** tav_ is now known as tav | 22:04 | |
MrTopf | hi | 22:05 |
srichter | hi | 22:06 |
MrTopf | does anybody can tell what I need to do in order to get rid of an ForbiddenAttribute: ('__contains__', <OOBTree...x3693ef8>) if I do obj.keys() in a view? | 22:06 |
MrTopf | guess some permission is missing | 22:06 |
srichter | go to zope.app.security/_protections.zcml | 22:06 |
srichter | look for OOBTree | 22:06 |
srichter | and add __contains___ to the allowed attributes | 22:07 |
srichter | (please check this in as well) | 22:07 |
MrTopf | ah, a bug? | 22:07 |
*** tvon has quit IRC | 22:07 | |
*** bskahan has quit IRC | 22:08 | |
srichter | if it is really missing, it is a bug | 22:08 |
MrTopf | maybe I will first do an update then | 22:08 |
MrTopf | and I don't have checkin rights | 22:08 |
srichter | let me know whether it is still missing | 22:09 |
MrTopf | Hm, should update more often ;-) | 22:09 |
srichter | and I'll add it | 22:09 |
MrTopf | takes some time right now | 22:09 |
MrTopf | it's in there, just don't know if it was before | 22:11 |
MrTopf | I will just try again | 22:11 |
MrTopf | how do I update actually? guess I have to call make afterwards? | 22:11 |
benji_york | if it's been a while since you've updated, yes | 22:12 |
MrTopf | ok | 22:13 |
*** BjornT has quit IRC | 22:14 | |
MrTopf | seems still to be forbidden | 22:14 |
MrTopf | and it appears in _protections.zcml | 22:14 |
srichter | then its a problem on your end | 22:16 |
srichter | (a) you container does not have a place and you do not have sufficient privs | 22:16 |
srichter | (b) you are not logged in properly | 22:17 |
srichter | btw, I would always write objects that derive from OOBTree | 22:17 |
srichter | i.e. have containers | 22:17 |
srichter | then you write all security yourself and containers give you locations | 22:18 |
MrTopf | Well, I derive from BTreeContainer | 22:18 |
srichter | in that case your perms are not setup correctly | 22:18 |
*** mgedmin has quit IRC | 22:18 | |
MrTopf | so I need to give permission on keys? or __contains__ ? | 22:18 |
MrTopf | or maybe some interface? | 22:18 |
srichter | bith, probably | 22:18 |
srichter | do it via the IReadContainer interface | 22:19 |
*** tarek has joined #zope3-dev | 22:19 | |
srichter | it has it all | 22:19 |
MrTopf | ok | 22:19 |
MrTopf | will try.. | 22:19 |
MrTopf | just wondering why a dirlisting works then | 22:19 |
MrTopf | Hm, and it has these permissions actually set.. | 22:20 |
MrTopf | strange | 22:20 |
srichter | then you somehow loose your security context | 22:20 |
srichter | that's a bit hard to debug via IRC | 22:20 |
MrTopf | think so.. | 22:20 |
MrTopf | but thanks anyway | 22:21 |
MrTopf | ah, I retrieve this object via traverse(). Might this be the problem? | 22:21 |
MrTopf | and take it's parent then via __parent__ and on this it fails | 22:22 |
srichter | yeah, it probably has a security wrapper, but it should not have one | 22:22 |
srichter | use zope.security.proxy.removeSecurityProxy | 22:22 |
MrTopf | can I check what sort of proxy is around it and a bit more about it's settings? | 22:22 |
MrTopf | these security problems always seem to be a bit hard to track down | 22:23 |
srichter | yeah, but I forgot how | 22:23 |
srichter | its all in zope.security.checker | 22:23 |
MrTopf | we had one of these in Dresden and without Philipp I would have been hopelessly lost ;-) | 22:23 |
MrTopf | ok, will look there then, thanks! | 22:23 |
srichter | no prob | 22:23 |
*** RaFromBRC has quit IRC | 22:23 | |
*** SteveA has quit IRC | 22:24 | |
*** stub has quit IRC | 22:26 | |
*** alga_ has quit IRC | 22:35 | |
MrTopf | philiKON: btw, that dummylock stuff worked | 22:40 |
philiKON | of course it did :) | 22:40 |
philiKON | so, you can save from finder now? | 22:40 |
MrTopf | so at least it now thinks it is saving something | 22:40 |
philiKON | heh | 22:41 |
MrTopf | we didn't complete the MOVE ;-) | 22:41 |
philiKON | :( | 22:41 |
MrTopf | of course finder first upload a tmp file and then moves it | 22:41 |
MrTopf | and inside that move I now get the above mentioned security errors | 22:41 |
philiKON | ()@#*$)@#$ that finder | 22:41 |
* philiKON hasn't read the channel history | 22:41 | |
philiKON | still studying :( | 22:41 |
MrTopf | I am trying a different approach now | 22:41 |
MrTopf | keep on studying! | 22:41 |
philiKON | not before you tell me the approach :) | 22:42 |
MrTopf | well, first I thought I can use copypastemove or how it's called | 22:43 |
MrTopf | but of course I cannot | 22:43 |
MrTopf | as it's not on the filerep layer | 22:43 |
philiKON | so? | 22:44 |
philiKON | you shoudl still be able to move it | 22:44 |
philiKON | to use it for moving | 22:44 |
MrTopf | so now I found out how to get the destination object via traverse() by some grepping | 22:44 |
philiKON | ah | 22:44 |
MrTopf | but I don't want to replace the photo object | 22:44 |
philiKON | of course | 22:44 |
philiKON | you want a new version | 22:44 |
MrTopf | I want a new version, so I cannot let it do the folder[id]=object thing | 22:44 |
MrTopf | so from the original I now do a getLatestVersion(), get it's data attribute and I adapt the destination object to IWriteFile and call it's write() | 22:45 |
MrTopf | I am just wondering what will happen in the case of a new file | 22:45 |
MrTopf | IIRC we created that example via FTP | 22:45 |
MrTopf | but now I have a different problem anyway as my webdav view looks suddenly empty.. | 22:46 |
philiKON | oh well | 22:47 |
philiKON | enjoy :) | 22:47 |
philiKON | gotta go back to my studies | 22:47 |
MrTopf | And I should actually still do some other work.. | 22:47 |
MrTopf | enjoy, too ;-) | 22:47 |
sureshvv | phil... Does Sfive create a content type you can add in the ZMI? | 22:49 |
MrTopf | hm, no exception anymore and debug looks good but no new version is generated.. so I will switch to something else then ;-) | 22:51 |
philiKON | sureshvv, nope | 22:56 |
philiKON | sureshvv, ah, you already found out on #z3-base | 22:56 |
MrTopf | philiKON: ok, works now :) | 23:01 |
MrTopf | philiKON: though with Finder you have one empty version first and then you have the actual photo as version 1 | 23:01 |
MrTopf | or maybe it's a bug at my side somewhere | 23:01 |
MrTopf | anyway.. | 23:02 |
*** sureshvv has quit IRC | 23:05 | |
*** timte has quit IRC | 23:12 | |
*** tvon has joined #zope3-dev | 23:15 | |
*** MrTopf has quit IRC | 23:22 | |
*** MrTopf has joined #zope3-dev | 23:23 | |
*** tarek has quit IRC | 23:29 | |
*** RaFromBRC has joined #zope3-dev | 23:49 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!