*** evilbungle has joined #zope | 00:02 | |
*** kiorky has quit IRC | 00:27 | |
*** J1m has quit IRC | 00:39 | |
*** kiorky has joined #zope | 00:44 | |
*** J1m has joined #zope | 00:52 | |
*** J1m has quit IRC | 01:06 | |
*** evilbungle has quit IRC | 01:07 | |
*** evilbungle has joined #zope | 01:18 | |
*** motto has quit IRC | 01:21 | |
*** evilbungle has quit IRC | 01:21 | |
*** m8 has joined #zope | 01:22 | |
*** m8 has quit IRC | 01:33 | |
*** _mup_ has quit IRC | 03:00 | |
*** _mup_ has joined #zope | 03:00 | |
*** mr_jolly has quit IRC | 04:21 | |
*** KageSenshi has joined #zope | 04:30 | |
*** KageSenshi has quit IRC | 04:37 | |
*** KageSenshi has joined #zope | 04:44 | |
*** kosh has quit IRC | 05:25 | |
*** KageSenshi has quit IRC | 05:42 | |
*** KageSenshi has joined #zope | 07:43 | |
*** tisto has joined #zope | 08:57 | |
*** zagy_ has joined #zope | 09:11 | |
*** yvl has joined #zope | 09:12 | |
*** zagy_ has quit IRC | 09:12 | |
*** zagy has joined #zope | 09:13 | |
*** mr_jolly has joined #zope | 09:33 | |
*** MrTango has joined #zope | 09:51 | |
*** miano has joined #zope | 09:53 | |
*** avoinea has joined #zope | 10:06 | |
*** agroszer has joined #zope | 10:18 | |
*** agroszer has quit IRC | 10:25 | |
*** siebo has joined #zope | 10:26 | |
*** zagy has quit IRC | 10:31 | |
*** eperez has joined #zope | 10:32 | |
*** zagy has joined #zope | 10:36 | |
*** zagy has joined #zope | 11:09 | |
*** maurits has joined #zope | 11:52 | |
*** sunew has joined #zope | 12:14 | |
*** evilbungle has joined #zope | 12:43 | |
*** giacomos has joined #zope | 12:50 | |
*** evilbungle has quit IRC | 13:05 | |
*** mr_jolly_ has joined #zope | 13:16 | |
*** mr_jolly has quit IRC | 13:16 | |
*** mr_jolly_ is now known as mr_jolly | 13:16 | |
*** tisto_ has joined #zope | 13:46 | |
*** tisto has quit IRC | 13:50 | |
*** agroszer has joined #zope | 13:51 | |
*** fdrake has quit IRC | 14:08 | |
*** kosh has joined #zope | 14:18 | |
*** zr has joined #zope | 14:34 | |
zr | hello, I'd like to know how I can setup a security declaration for my BrowserView, so I can access self.context in my view method without raising a ForbiddenAttribute error | 14:35 |
---|---|---|
zr | I've browsed around but I have not yet found a document that explains this for my use case | 14:36 |
mgedmin | zr, you don't want security declarations for the view, you want security declarations for the context object | 14:42 |
mgedmin | self is never security proxied, so self.anything is always allowed | 14:42 |
mgedmin | but a view's self.context is always security proxied, so self.context.anything till trigger a security check according to the declarations made for your context class | 14:43 |
zr | mgedmin: thanks for clearing that up, so I would need a security declaration for the folderish object that is the context of the view? | 14:43 |
mgedmin | yes | 14:43 |
zr | hmmm | 14:44 |
*** tisto_ is now known as tisto|lunch | 14:48 | |
*** benji has joined #zope | 15:00 | |
*** menesis has joined #zope | 15:04 | |
zr | mgedmin: I've been reading the api docs but I'm having problems grokking the concept behind it. Could you provide an example on how to do this? | 15:06 |
mgedmin | how to do what, exactly? | 15:11 |
zr | mgedmin: nevermind, I'll just use zope.security.proxy.getObject for now | 15:20 |
zr | thanks anyway | 15:20 |
mgedmin | removeAllProxies() is idiomatic | 15:20 |
zr | mgedmin: right, thanks | 15:21 |
mgedmin | naked_context = zope.proxy.removeAllProxies(self.context) | 15:21 |
mgedmin | although maybe zope.security.proxy.removeSecurityProxy(self.context) would be better | 15:22 |
mgedmin | oh, hey, it's actually an alias for getObject, but with a more descriptive name | 15:22 |
zr | mgedmin: hehe | 15:22 |
zr | mgedmin: do you know where I could introspect the paste httpserver threads? this information should be stored in the environ object of a wsgi application | 15:23 |
zr | my hope is that, by acquiring a handle on the context, I could traverse to it | 15:23 |
mgedmin | I'm confused by your question | 15:24 |
*** fdrake has joined #zope | 15:24 | |
zr | basically I want to introspect the threads created by paste | 15:25 |
mgedmin | the wsgi_env['paste.httpserver.thread_pool'] is a dictionary from thread_id to a tuple (time_started, request_info) | 15:26 |
mgedmin | request_info is either None or a wsgi dictionary of the request that that thread is currently handling | 15:27 |
*** fdrake has quit IRC | 15:27 | |
mgedmin | does that help? | 15:27 |
zr | nice, I can then use threadframe to get a list of threads | 15:27 |
mgedmin | threading.enumerate() | 15:28 |
mgedmin | what | 15:28 |
mgedmin | err, what's threadframe? | 15:28 |
zr | threadframe is a third party library | 15:28 |
zr | but I never tried threading.enumerate | 15:28 |
mgedmin | heh, threadframe's page says "Note: threadframe is obsolete. Python 2.5 and later include a function sys._current_frames() that does the same thing. Threadframe is only useful for Python 2.2 through 2.4." | 15:29 |
zr | mgeadmin: err... | 15:29 |
mgedmin | sys._current_frames() is awesome | 15:29 |
zr | mgedmin: thanks for the pointers | 15:30 |
mgedmin | I built a web page that shows me the current status of all my threads, including their stack traces and a list of the last N logging messages recorded in each thread | 15:30 |
mgedmin | it was already helpful chasing down deadlocks when I tried to use storm/postgresql and ZEO in the same app | 15:30 |
*** fdrake has joined #zope | 15:31 | |
zr | mgedmin: very cool! | 15:31 |
*** polysix has quit IRC | 15:35 | |
zr | 9 | 15:35 |
zr | but then again, how do I get a handle on wsgi_env? | 15:40 |
mgedmin | if you've a zope request handy, it's request.environ | 15:41 |
mgedmin | sorry | 15:41 |
mgedmin | request._environ | 15:42 |
mgedmin | this assumes that you're deploying zope through wsgi | 15:42 |
mgedmin | which you are, if you're using paste.httpserver :) | 15:42 |
zr | aargh | 15:42 |
zr | I never needed to get the context... | 15:42 |
zr | all I needed was self.request._environ | 15:43 |
zr | I thought I had checked self.request thorougly using pdb | 15:44 |
*** polysix has joined #zope | 15:48 | |
*** polysix has quit IRC | 15:53 | |
*** benji has quit IRC | 15:55 | |
*** benji has joined #zope | 15:57 | |
zr | mgedmin: thanks again for your help | 15:58 |
*** polysix has joined #zope | 15:58 | |
*** les_sylvains has joined #zope | 16:02 | |
*** eperez has quit IRC | 16:06 | |
*** evilbungle has joined #zope | 16:10 | |
*** sp0cksbeard has joined #zope | 16:16 | |
*** evilbungle has quit IRC | 16:19 | |
*** J1m has joined #zope | 16:25 | |
*** evilbungle has joined #zope | 16:33 | |
*** evilbungle has quit IRC | 16:46 | |
*** etaylor has joined #zope | 16:56 | |
*** mr_jolly has quit IRC | 16:59 | |
*** les_sylvains has quit IRC | 17:04 | |
*** dayne1 has quit IRC | 17:11 | |
*** siebo has quit IRC | 17:13 | |
*** eperez has joined #zope | 17:22 | |
*** kosh has quit IRC | 17:24 | |
*** J1m has quit IRC | 17:29 | |
*** J1m has joined #zope | 17:30 | |
*** tisto|lunch is now known as tisto | 17:41 | |
*** les_sylvains has joined #zope | 17:51 | |
*** sunew has quit IRC | 18:17 | |
*** supton has joined #zope | 18:22 | |
*** J1m has joined #zope | 18:35 | |
*** les_sylvains has quit IRC | 18:46 | |
*** agroszer has quit IRC | 18:47 | |
*** elro has joined #zope | 18:54 | |
*** menesis has quit IRC | 18:59 | |
*** elro has quit IRC | 18:59 | |
*** giacomos has quit IRC | 19:15 | |
*** tisto has quit IRC | 19:18 | |
*** zr has quit IRC | 19:21 | |
*** avoinea has quit IRC | 19:42 | |
*** les_sylvains has joined #zope | 19:45 | |
*** tiwula has joined #zope | 19:48 | |
*** sm has quit IRC | 19:54 | |
*** sm has joined #zope | 19:55 | |
*** maurits has quit IRC | 20:00 | |
*** jham has joined #zope | 20:02 | |
*** MrTango has quit IRC | 20:06 | |
*** jham_ has quit IRC | 20:06 | |
*** agroszer has joined #zope | 20:06 | |
*** MrTango has joined #zope | 20:07 | |
*** les_sylvains has quit IRC | 20:19 | |
*** agroszer has quit IRC | 20:25 | |
*** les_sylvains has joined #zope | 20:41 | |
*** m8 has joined #zope | 20:42 | |
*** m8 has quit IRC | 21:34 | |
*** m8 has joined #zope | 21:35 | |
*** AnneGilles has joined #zope | 21:56 | |
*** MrTango has quit IRC | 23:02 | |
benbangert | J1m: welp, gonna go pure Python in kazoo | 23:04 |
benbangert | no more C binding or C lib | 23:04 |
J1m | why? | 23:05 |
benbangert | we spent over a week debugging a a bug in the Python C binding | 23:06 |
benbangert | having to track bugs through two layers of C is horrible | 23:06 |
benbangert | the C binding wasn't using the right password copy function, so if the server generated a byte password with a \0 character, the Python one got truncated | 23:06 |
benbangert | and after looking through it some more, there's still remaining seg-fault bugs in the C binding and/or C lib itself | 23:07 |
benbangert | it seems untenable to maintain a Zookeeper library unless you want to maintain/fix bugs in both the C binding and C lib | 23:07 |
J1m | so you're going to write against the network protocol directly. Sounds like fun. ;) | 23:07 |
J1m | yeah, which sucks. | 23:07 |
benbangert | its actually already done for the most part, https://github.com/maguro/pookeeper | 23:08 |
benbangert | and its a super simple protocol, and implements new ZK 3.4 features as well | 23:08 |
J1m | Can't say I like that name. | 23:08 |
benbangert | I need to yank it in, it has some inefficiencies due to generated code | 23:08 |
benbangert | yea, I'm going to extract the bits and have it integrated inside kazoo | 23:08 |
benbangert | which is needed anyways to use the IHandler API for gevent compat | 23:08 |
benbangert | but the network protocol is simple, I can read all the Python code for it in 10 mins | 23:09 |
benbangert | I can't read half the C binding in 10 mins | 23:09 |
benbangert | and the C lib.... ergh | 23:09 |
J1m | wow. | 23:09 |
J1m | I didn't realize the network protocol was that simple. | 23:09 |
J1m | cool. | 23:09 |
benbangert | yea, its a breeze | 23:09 |
benbangert | so kazoo gets to dump a bunch of the hacks to deal with the C lib thread | 23:10 |
benbangert | and other edge case hacks that were due to the C lib | 23:10 |
J1m | very nice. | 23:10 |
benbangert | and there's the 3.4 read-only feature which might be handy for you | 23:10 |
J1m | and zc-zookeeper-static can die! | 23:10 |
benbangert | in a partition event, you can remain connected and go into read-only mode | 23:10 |
J1m | cool (I assumed that how it worked already :) | 23:11 |
benbangert | nah, in a partition event, you'll get dropped | 23:11 |
benbangert | and Zookeeper will only let you connect if its part of a consensus | 23:11 |
*** les_sylvains has quit IRC | 23:20 | |
*** AnneGilles has quit IRC | 23:24 | |
*** les_sylvains has joined #zope | 23:33 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!