*** tonico has joined #zope3-dev | 00:07 | |
*** gintas has quit IRC | 00:26 | |
*** RaFromBRC has joined #zope3-dev | 00:32 | |
*** artemp has joined #zope3-dev | 01:03 | |
*** niemeyer has quit IRC | 01:06 | |
*** artemp has left #zope3-dev | 01:28 | |
* andrew_m is back (gone 08:21:07) | 01:36 | |
*** garrett-smith has quit IRC | 01:36 | |
*** garrett-smith has joined #zope3-dev | 02:02 | |
*** bradb has quit IRC | 02:17 | |
*** J1m has quit IRC | 02:22 | |
*** bradb has joined #zope3-dev | 02:43 | |
*** BjornT has quit IRC | 03:01 | |
*** stub has joined #zope3-dev | 03:19 | |
*** garrett-smith has quit IRC | 03:19 | |
*** _projekt01 has quit IRC | 03:20 | |
*** WebMaven has quit IRC | 03:44 | |
*** hazmat_ has joined #zope3-dev | 03:50 | |
*** hazmat has quit IRC | 03:53 | |
*** BjornT has joined #zope3-dev | 04:26 | |
*** hazmat_ has quit IRC | 04:27 | |
*** hazmat_ has joined #zope3-dev | 05:45 | |
*** hazmat_ has quit IRC | 06:20 | |
*** RaFromBRC has quit IRC | 06:33 | |
*** tvon has quit IRC | 07:14 | |
*** `anthony has quit IRC | 07:31 | |
*** BjornT has quit IRC | 07:36 | |
*** tvon has joined #zope3-dev | 08:25 | |
*** Arnia has left #zope3-dev | 08:34 | |
*** `anthony has joined #zope3-dev | 08:52 | |
*** chumpy has joined #zope3-dev | 08:59 | |
*** chumpy has quit IRC | 09:02 | |
*** tvon has quit IRC | 09:03 | |
*** chumpy has joined #zope3-dev | 09:03 | |
*** Arnia has joined #zope3-dev | 09:09 | |
*** zagy has joined #zope3-dev | 09:10 | |
Arnia | Anyone here who knows about zope.app.pagelets? | 09:35 |
---|---|---|
Arnia | I've been looking over the implementation in SVN and I have a few questions I'd like to ask | 09:39 |
*** mooded has joined #zope3-dev | 09:41 | |
*** viyyer has joined #zope3-dev | 09:46 | |
*** vlado|away is now known as vlado | 09:57 | |
*** sashav has joined #zope3-dev | 10:06 | |
*** tarek_ has joined #zope3-dev | 10:20 | |
*** Arnia has left #zope3-dev | 10:28 | |
*** lunatik has joined #zope3-dev | 10:43 | |
*** `anthony has quit IRC | 10:50 | |
*** hazmat has joined #zope3-dev | 10:56 | |
AJC | hey, i have virtual hosting setup with twisted but i'm having problems with the Zope3 side of things. has the syntax changed? | 12:04 |
AJC | http://myzopeserver:8080/++vh++http:publicsite.org++/ | 12:05 |
*** mexiKON has joined #zope3-dev | 12:08 | |
AJC | says this: "ValueError: Must have a path element '++' after a virtual host directive." | 12:21 |
*** admp has joined #zope3-dev | 12:23 | |
mexiKON | AJC, http://myzopeserver:8080/++vh++http:publicsite.org/++/ | 12:27 |
*** philiKON has quit IRC | 12:31 | |
*** mexiKON is now known as philiKON | 12:31 | |
AJC | yep, that seems to solve that problem... need to look into other issues now! thanks. | 12:42 |
*** efge has joined #zope3-dev | 12:51 | |
AJC | wow, that's cool... works wonderfully. | 13:08 |
AJC | where should I paste my twisted sample application for general abuse? | 13:09 |
philiKON | zope on twisted? | 13:16 |
AJC | yeah, for virtual hosting instead of apache | 13:17 |
AJC | very lightweight | 13:17 |
philiKON | ah, ok | 13:19 |
philiKON | well, if you have a private site, you could publish it there and send an email to zope3-dev@zope.org | 13:20 |
philiKON | or, if it's light-weight, just attach it to the email | 13:20 |
AJC | it's barely 10-15 lines | 13:20 |
philiKON | or, you can join zope.org and load it up as a 'product release' | 13:20 |
philiKON | ah :) | 13:20 |
AJC | one thing i haven't got right though... i can get the vhosting to change the actual domain, but if i point to a subdirectory of the zope server, then zope no longer finds other resources that are relative to the base directory of the site | 13:22 |
AJC | well, i guess it's the browser that's redirected to the new root of the site (nested in the Zope hierarchy), and that does not contain the files as they are in the actual Zope root... if that makes sense | 13:23 |
AJC | i guess it's a skin problem | 13:23 |
AJC | need to put my resources elsewhere i guess | 13:23 |
philiKON | no | 13:23 |
philiKON | no | 13:23 |
philiKON | :) | 13:23 |
philiKON | resources are always published through sites | 13:23 |
philiKON | i think the 'subfolder' you want to publish as the root of your virtualhost must be a site | 13:24 |
*** Aiste has joined #zope3-dev | 13:24 | |
philiKON | you can turn regular folders into sites by clickiin on "make a site" in the blue bar | 13:24 |
AJC | aha | 13:26 |
AJC | great, thanks. | 13:26 |
*** hazmat has quit IRC | 14:05 | |
AJC | can a zwiki become a site? it seems not | 14:07 |
srichter | I am not sure if the Zwiki object is a folder | 14:08 |
srichter | if it is, it can | 14:08 |
*** __gotcha has joined #zope3-dev | 14:08 | |
srichter | yes, it should be able to become a site | 14:08 |
srichter | as it is a folder | 14:08 |
AJC | hmmm, i get a "ForbiddenAttribute: ('setSiteManager', <zwiki.wiki.Wiki object at 0x9f919ac>)" | 14:16 |
srichter | you probably need to set the permission on the Wiki class to support the SiteManager interface | 14:25 |
AJC | can I do that within Zope or do i need to edit the code? | 14:27 |
*** apoirier has joined #zope3-dev | 14:37 | |
*** projekt01 has joined #zope3-dev | 14:42 | |
philiKON | srichter, this is more a bug in wiki | 14:45 |
philiKON | wiki configuration should really include this | 14:45 |
philiKON | or else Wiki shouldn't provide IPossibleSite | 14:45 |
philiKON | AJC, the fix needs to go into zwiki's configure.zcml | 14:46 |
philiKON | in the <content class=".wiki.Wiki"> directive | 14:47 |
philiKON | you want to add something like: | 14:47 |
philiKON | <allow | 14:47 |
philiKON | attributes="getSiteManager" | 14:47 |
philiKON | /> | 14:47 |
philiKON | <require | 14:47 |
philiKON | permission="zope.ManageServices" | 14:47 |
philiKON | attributes="setSiteManager" | 14:47 |
philiKON | /> | 14:47 |
philiKON | (this is taken from zope.app.folder/configure.zcml) | 14:47 |
philiKON | would be cool if you could file an issue in the bug collector stating the problem and this solution (i'm nearly positive this will solve the problem) | 14:48 |
*** `anthony has joined #zope3-dev | 14:48 | |
AJC | ok, thanks very much. i'll give it a try. | 14:51 |
*** faassen has joined #zope3-dev | 14:52 | |
projekt01 | AJC, philiKON, I didn't follow the tread at all, but be carefull with make wiki to a site. The wiki uses own traverser which get perhaps (overriden) by the ISite interface | 14:54 |
*** __gotcha has quit IRC | 14:56 | |
*** __gotcha_ has joined #zope3-dev | 14:56 | |
*** admp has quit IRC | 15:13 | |
*** ignas has joined #zope3-dev | 15:16 | |
*** viyyer has quit IRC | 15:16 | |
philiKON | projekt01, if that's the case, then wiki shouldn't be an IPossibleSite | 15:17 |
philiKON | either way, wiki has a bug | 15:17 |
philiKON | a button that's there and doesn't work is a bug; i just proposed one solution (which might or might not be appropriate) | 15:17 |
srichter | well, it is really a bug of the link condition | 15:18 |
srichter | the menu item should not just check for the availability but also for the security | 15:18 |
AJC | i can't check it right now sorry, give me a second | 15:19 |
srichter | I, as a developer, have the right to say: provide this interface but do not make it public | 15:19 |
philiKON | srichter, i don't think so | 15:19 |
philiKON | srichter, the menu item iis about a view MakeSite | 15:19 |
srichter | so, in this case the menu code has a bug in that it does not check the security and the condition, but only the condition | 15:19 |
philiKON | srichter, if whatever that MakeSite view is accessing isn't available, the menu item can't see that and shouldn't | 15:20 |
srichter | right, maybe I want Wikis to be able to be sites, but do not want to provide that functionality via the ZMI | 15:20 |
philiKON | the menu can only see if you are able to look up MakeSite | 15:20 |
srichter | not true | 15:20 |
srichter | the menu item should also see whether someone has the permission to do it | 15:20 |
philiKON | this gets exceedingly complex | 15:21 |
srichter | a missing security setting should never cause a bug in the code | 15:21 |
srichter | s/code/application | 15:21 |
philiKON | oh yes | 15:21 |
srichter | security is policy and as such all combinations should be allowed | 15:21 |
philiKON | missing security delcarations is a bug; missing privileges is not | 15:22 |
philiKON | that's why Unauhtorized is a UserError, ForbiddenAttributeError a SystemError | 15:22 |
srichter | but what if I do not want IPossibleSite to be accessible via the ZMI ever? | 15:23 |
srichter | what if I only want some Python code to be able to make it a site? | 15:23 |
srichter | in this case I would not create a security declaration | 15:23 |
philiKON | have a MakeSite view for your IPossibleSite do nothing | 15:23 |
philiKON | diable the menu item | 15:24 |
philiKON | whatever it takes | 15:24 |
*** admp has joined #zope3-dev | 15:24 | |
srichter | right, disable the menu item; but I cannot do this since I do not have control over it | 15:24 |
philiKON | you're talking about a zmi problem; zmi problems should be solved in the zmis | 15:24 |
srichter | yep | 15:24 |
srichter | that's my point; its not a wiki but a ZMI problem | 15:25 |
philiKON | i see what you mean now | 15:25 |
philiKON | you have no security delcarations because you never wnated people to make it a site through the zMI | 15:25 |
philiKON | but you could expect people to do it via python | 15:25 |
philiKON | wher eit's not security proxied | 15:25 |
philiKON | mmh | 15:25 |
philiKON | (well, i think, in this particular case it's YAGNI; wiki is a web app, and a missing security delcaration for web-exposed functionality is a bug IMHO) | 15:26 |
philiKON | in any case, the menu item will never know if something is allowed until it actually performs that something | 15:26 |
srichter | right, but menu items have facilities to detect this | 15:28 |
srichter | you could also implement your own menu item class in this case | 15:28 |
srichter | menu items will become more flexible/complex in the future | 15:29 |
srichter | the ground work for this is layed out now | 15:29 |
srichter | the current implementation is very flexible | 15:29 |
projekt01 | srichter, I like to start nested menu integration after the 3.1 release in the Boston skin | 15:30 |
srichter | yep, we should definitely do that | 15:31 |
srichter | also, I think I will finish the user preferences today, so they can make it into 3.1 | 15:31 |
philiKON | btw, is boston 100% based on pagelets? | 15:31 |
projekt01 | Yes | 15:32 |
philiKON | that's good | 15:32 |
philiKON | one of these days i have to look into pagelets | 15:32 |
projekt01 | There is no other concept for let developer add own javascripts dynamicly | 15:32 |
projekt01 | philiKON, cool let me know if you have questions | 15:33 |
srichter | projekt01: would you be mad if we delay the packaging of boston/pagelets etc. till 3.2? | 15:33 |
srichter | this would give us a chance to review it better before throwing it out there | 15:33 |
philiKON | +1 | 15:33 |
srichter | I think for 3.2 we will focus on the UI anyways (i.e. forms) | 15:33 |
projekt01 | philiKON, 100% is not really correct it uses a master template with a table layout, but this can be replaced with another master template.pt | 15:34 |
philiKON | so, the master template is not a pagelet itself? | 15:34 |
philiKON | (this is what i mean by 100%... everything is a pagelet) | 15:35 |
projekt01 | srichter, No that's OK, I think the Boston skin is not for 3.1 | 15:35 |
srichter | ok, cool | 15:36 |
srichter | Jim really intends to review pagelets and so do I | 15:36 |
projekt01 | philiKON, no its the main (container) template.pt which defines the slots. Perhaps we can find a way to make this more dynamic? | 15:36 |
srichter | I think this will work very well with the form refactorings | 15:36 |
projekt01 | Yup | 15:36 |
philiKON | projekt01, i would like to have the coupling between "master template" and all other stuff very loose | 15:36 |
philiKON | i think nested pagelets would be a very good idea | 15:37 |
philiKON | that way, you just provide a different "master pagelet" if you don't like table-based layout, for example | 15:37 |
projekt01 | philiKON, Yes, of corse, if you see a way that whould be great! | 15:37 |
philiKON | i'll look into it some day | 15:37 |
projekt01 | Perhaps we need something like a layout manager which serves the master template | 15:38 |
philiKON | btw, i'm also thinking about making that whole standard_macros shit easier | 15:38 |
philiKON | it's annoying me | 15:38 |
projekt01 | I added comments about taht in the pagelet code | 15:38 |
philiKON | maybe with pagelets (i saw pageletchooser), we won't have to rely on standard_macros customization anymore | 15:39 |
srichter | well, much of the macro code you have to do in Python right now in a dead chicken | 15:39 |
projekt01 | Yes master templates are a hardcoded way where can be replaced by dynamic pagelets | 15:39 |
philiKON | srichter, right, so dead chicken, it starts to smell | 15:39 |
srichter | I think it could be easily wrapped into a custom directive | 15:39 |
philiKON | srichter, most of the time, for new skins, you just inherit from some other STandardMacros and preprend the name of your master template view | 15:39 |
srichter | should be fairly easy | 15:39 |
philiKON | yes, that's what i thought | 15:39 |
*** jack-e|away is now known as jack-e | 15:40 | |
projekt01 | Yup, pagelet chooser is the right part for that. I use also a pageletchoser which get it's name (named pagelets) from the annotation wich can be edited (via vocabulary names) | 15:40 |
philiKON | <browser:standardMacros pages="foo_macros bla_macros bar_macros" /> | 15:40 |
srichter | actually now that I think about it, it should not take you much longer than 1-2 hours including tests | 15:40 |
philiKON | but, maybe we can even get rid of standardmacros all together (just have one in basicskin that delegates to page) and do the rest through pageletchooser | 15:40 |
philiKON | s/page/the 'page' macro/ | 15:41 |
srichter | I really need to understand pagelets first before I can comment here | 15:41 |
philiKON | same here | 15:41 |
philiKON | i'm wild guessing | 15:41 |
srichter | pagelets are still muddy waters for me :-) | 15:41 |
Damascene | are pagelets related to portlets? | 15:41 |
philiKON | i want to make a full-blown proposal after i've read through pagelets and the boston skin, prolly around late-April | 15:41 |
philiKON | Damascene, sort of | 15:41 |
srichter | cool | 15:42 |
philiKON | Damascene, pagelets are basically componentized parts of a page | 15:42 |
philiKON | so, pages are constructed by component lookup, not by static macro lookup | 15:42 |
srichter | I really should read a book on portlets and see more of the motivation from a high-level point of view | 15:42 |
philiKON | well, from my use cases, i see the motivation in the loose coupling | 15:42 |
Damascene | philiKON: i dont' see why you couldn't simulate the same pagelet behavior by usign static macro lookups on components? | 15:43 |
philiKON | and delegation of component lookup (pagelets are components, right?) to what we already have: a component architecture with very well defined component lookup strategies | 15:43 |
projekt01 | We added a document about pagelets and differ the names like pagelet, portlets, viewlets in zope.app.pagelet.README.txt | 15:43 |
philiKON | Damascene, because with static macro lookups, you always look this one macro up. in most sites, you want to decide that this or that should be shown for this or that view, for this or that object | 15:44 |
philiKON | or not | 15:44 |
projekt01 | Hold on, pagelets are only adapters on context, request, slot and view interface | 15:44 |
philiKON | right | 15:44 |
AJC | philiKON, yes, your changes work. where's this bug database you mentioned? | 15:44 |
philiKON | and adapters can be there--or not | 15:44 |
philiKON | AJC, collector.zope.org/Zope3-dev | 15:44 |
projekt01 | The interface is the key for to lookup pagelets. The name of the pagelet is used for get the right macro in the ZPT | 15:45 |
philiKON | whereas when macros are there, they have to there, otherwise you get an error | 15:45 |
philiKON | projekt01, yup | 15:45 |
projekt01 | philiKON, Yes | 15:45 |
philiKON | :) | 15:46 |
projekt01 | And pagelets can be really fine granular definedbecause there are multi adapters on (context, request, slot, viewinterface) | 15:46 |
*** MacYET has joined #zope3-dev | 15:46 | |
MacYET | morning | 15:46 |
projekt01 | Viewinterface = views | 15:46 |
srichter | MacYET: hi | 15:47 |
philiKON | lo MacYET | 15:47 |
MacYET | would it be possible to re-use the i18n machinery of Z3 with Zope 2 page templates? | 15:47 |
*** viyyer has joined #zope3-dev | 15:47 | |
projekt01 | philiKON, pagelets are named multi adapters | 15:48 |
philiKON | projekt01, yes, i understand | 15:48 |
projekt01 | philiKON, let me know if you see a way for to make the master template dynamic. | 15:48 |
projekt01 | Then the concept would be perfect | 15:49 |
philiKON | i will; i have an exam coming up next monday | 15:49 |
philiKON | after that, i want to dig myself back into z3 :) | 15:49 |
philiKON | need to read up on PAU, pagelets, boston, etc. | 15:49 |
srichter | MacYET: yes | 15:49 |
projekt01 | Yup, I'm too. I go to migrate our PAU addons now ;-( | 15:50 |
srichter | MacYET: the only problem is that the Z2 request does not know about the locale | 15:50 |
MacYET | srichter: would it be hard or easy? | 15:50 |
srichter | MacYET: so this piece would need to be different | 15:50 |
projekt01 | We already had some subsite login forms challenger etc | 15:50 |
MacYET | ok, just asking as a fallback solution :) | 15:51 |
srichter | MacYET: I think it should not be hard | 15:51 |
srichter | MacYET: especially with Five in place | 15:51 |
*** alga has joined #zope3-dev | 15:51 | |
MacYET | tnx | 15:51 |
philiKON | MacYET, i assume ZPT somewhere has a translation hook; you should be able to just hook zope.i18n.translate in there | 15:51 |
srichter | MacYET: the hookup to the i18n namespace is very easy and you can see that in the TranslationService product for Z2 | 15:51 |
philiKON | language negotation would have to be dealt with differnetly, yes | 15:52 |
philiKON | right now we have an adapter, IUserPreferredLanguages, that does this; i wonder if Five should maybe mimic this and the Z3 request.locale object... | 15:53 |
srichter | I think for an experienced Z2 programmer it should not take longer than a day to stitch in the language negotiation and locale setup (in request) | 15:53 |
srichter | philiKON: I think it should :-) | 15:53 |
philiKON | i think so too | 15:53 |
philiKON | MacYET, if you manage to do this, maybe you can contribute that to Five :) | 15:53 |
AJC | ok philiKON, posted | 15:53 |
srichter | philiKON: it only needs a wrapper around the Z3 code to output UTF-8 instead of unicode | 15:53 |
philiKON | aaaargh | 15:54 |
philiKON | right | 15:54 |
philiKON | that whole unicode problem | 15:54 |
philiKON | uh-oh, that might actually turn out to be a can of worms | 15:54 |
srichter | I am so glad we got this right in Z3 :-) | 15:54 |
MacYET | philiKON: i will if the PTS guys won't release PTS under a unique license | 15:54 |
srichter | MacYET: I think you were heavily involved in that decision too, right? | 15:54 |
philiKON | MacYET, oh, what's with the PTS guys? | 15:55 |
MacYET | pts as a zoo of licenses and we need it under ZPL for acommercial project | 15:56 |
MacYET | otherwise we are going for the way I asked about | 15:56 |
philiKON | well, afaik, PTS was derived from z3, so their way of going with GPL wasn't totally correct either | 15:56 |
srichter | I am looking at the product now; if it contains Z3 code, then we have to tell them | 15:58 |
philiKON | well, afaik (i could be wrong), it was derived from Z3 looooong ago | 15:58 |
philiKON | when we still had services | 15:58 |
philiKON | when we still said placeless and placeful | 15:58 |
philiKON | etc. | 15:58 |
philiKON | hence the name | 15:58 |
srichter | well, if they just used the interfaces, then it is work atop of Zope 3, which is ok | 15:59 |
srichter | if they used actually any Z3 code directly then they cannot publish it under the GPL easily | 15:59 |
MacYET | anyone I am forcing all authors to republish PTS under ZPL | 15:59 |
MacYET | or trying to force them :) | 16:00 |
philiKON | why do you need it so badly under zpl? | 16:00 |
MacYET | if it contains GPL code we can't use it | 16:03 |
philiKON | anyway, zpl would be much better for such a product | 16:04 |
srichter | philiKON: after a quick read I cannot detect any Z3 code | 16:04 |
srichter | philiKON: however, all the Z2 stuff is so ugly, it makes my eyes look the other way ;-) | 16:04 |
philiKON | yes, it underwent heavy development since then | 16:04 |
srichter | (usually I am able to detect my code very quickly) | 16:05 |
MacYET | z2 is just a code obfuscator | 16:06 |
srichter | :-) well said | 16:06 |
MacYET | i just mailed all pts contributors | 16:07 |
philiKON | i'm curious. how many are there | 16:07 |
philiKON | ? | 16:07 |
philiKON | besides lalo :) | 16:07 |
MacYET | alt least 6 | 16:07 |
*** gintas has joined #zope3-dev | 16:11 | |
philiKON | wow, jehova's witnesses came to my house for 3rd time in 2 months now | 16:13 |
SteveA | tell them you're a jehova's bystander | 16:13 |
SteveA | you just don't want to get involved | 16:13 |
philiKON | how often can you tell someone that you're catholic? | 16:13 |
philiKON | lol | 16:13 |
AJC | or a jehova's accomplice / alibi | 16:13 |
srichter | well, I tell them I am an atheist and after discussing with them for 15 mins they gave up all hope | 16:14 |
Damascene | tell them you are all about the ubermench | 16:14 |
srichter | (in the US I have been called the devil before...) | 16:14 |
philiKON | Damascene, heh. yeah... (btw, it's spelled übermensch) | 16:15 |
philiKON | srichter, wow... who was it, the baptists, who don't believe in hell and the devil? | 16:15 |
Damascene | yeah sorry i know i misspelled it hehe | 16:15 |
srichter | philiKON: yeah, southern baptists (in high school | 16:15 |
srichter | he he | 16:15 |
philiKON | religious landscape in America is a bit curious for a European | 16:16 |
srichter | well, more like unimaginable :-) | 16:16 |
philiKON | yeh | 16:17 |
philiKON | same goes for latino countries, btw, where catholicism is the only real religion and they never even had the slightest reformation, not even speaking about Luther's reformation we had in germany | 16:19 |
philiKON | it's like the opposite | 16:19 |
srichter | yeah, a good friend of Claudia and mine just got married to a Mexican last Saturday and their stories are amazing too | 16:20 |
philiKON | yep; i lived in mexico for a short while | 16:21 |
srichter | for example, she was the cousin (imagine a cousin in Mexico with blond hair and blue eyes) in the beginning, because they lived together before getting married | 16:21 |
philiKON | and I was amazed, even though i'm catholic myself :) | 16:21 |
philiKON | lol | 16:22 |
*** admp has quit IRC | 16:22 | |
philiKON | yeah, sounds just like reality there | 16:22 |
srichter | even though my wife is cathlic, in the East (as you know) religion is very relaxed | 16:22 |
philiKON | i know; 've been living in the east for some time now (in brandenburg before DD) | 16:22 |
srichter | really, where did you live in brandenburg? | 16:24 |
*** admp has joined #zope3-dev | 16:24 | |
__gotcha_ | srichter, philiKON hi to the flying dutchmen | 16:24 |
__gotcha_ | oops the z3 germans | 16:24 |
philiKON | hi __gotcha_ | 16:25 |
__gotcha_ | just wanted your opinion about this | 16:25 |
srichter | ok, I am listening :-) | 16:25 |
__gotcha_ | is there an opinion in the z" communtity that thinks that z" should be runnable without the transaltion engine | 16:25 |
__gotcha_ | plone or silva communtiy think they should be able to sue their product without Placeless Translationservice | 16:26 |
__gotcha_ | and it should run in English | 16:26 |
philiKON | are you talking about z3? | 16:26 |
srichter | the philosophy in Zope 3 is that I18n should always be there; no exceptions :-) | 16:26 |
__gotcha_ | yes I ama sking the opinion of z3 people | 16:26 |
__gotcha_ | ok | 16:27 |
__gotcha_ | thanks | 16:27 |
__gotcha_ | that's clear | 16:27 |
philiKON | __gotcha_, yeah, i18n always ships with z3 | 16:27 |
philiKON | but you can disable it, for example | 16:27 |
__gotcha_ | if I disable it | 16:27 |
philiKON | for worldcookery.com, i made languagenegotation very stubbron :) | 16:27 |
__gotcha_ | is zmi still working | 16:27 |
philiKON | yes | 16:27 |
srichter | of course | 16:27 |
__gotcha_ | do you mean disable language negotiation | 16:27 |
philiKON | class FixedLanguage(object): | 16:27 |
philiKON | def __init__(self, request): | 16:27 |
philiKON | self.request = request | 16:27 |
philiKON | def getPreferredLanguages(self): | 16:27 |
__gotcha_ | or not using po files | 16:27 |
philiKON | return ['en'] | 16:27 |
srichter | then the default translation is used, which is usually English or an abstract message id | 16:28 |
__gotcha_ | so there are place where you'll get an abstract message id | 16:28 |
philiKON | abstract message ids should never be shown | 16:28 |
philiKON | translation always needs to be turned on, for that reason | 16:28 |
srichter | philiKON: what if you specify a message id that has no default? | 16:28 |
__gotcha_ | should not or are not shown | 16:28 |
philiKON | that's ab ug then | 16:28 |
__gotcha_ | :-) | 16:28 |
philiKON | __gotcha_, are not shown, because translations occurr wherever necessary | 16:29 |
srichter | that should be in the style guide somewhere then | 16:29 |
philiKON | yeah | 16:29 |
__gotcha_ | philiKON, if translation happen | 16:29 |
__gotcha_ | it means the engine is on | 16:29 |
philiKON | yes | 16:29 |
philiKON | the engine needs to be on | 16:29 |
philiKON | even if you want to have ENglihs | 16:29 |
philiKON | because some abstract message ids need to be translated | 16:29 |
philiKON | even if it is just their default value | 16:29 |
__gotcha_ | ok | 16:29 |
srichter | I cannot imagine Plone does not work this way | 16:30 |
philiKON | if you use my adapter code from above, you always get the language 'en' | 16:30 |
srichter | they use abstract message ids much heavier than us | 16:30 |
__gotcha_ | srichter, its supposed to work without PTS | 16:30 |
philiKON | that's what i meant with "stubborn" language negotation | 16:30 |
philiKON | __gotcha_, well, without PTS, ZPT will use a dummy engine | 16:31 |
__gotcha_ | srichter, message ids in Plone come from Page templates | 16:31 |
__gotcha_ | where most often default string are defined as well | 16:31 |
philiKON | __gotcha_, however, plone only seems to have message ids in zpt, right? | 16:31 |
*** niemeyer has joined #zope3-dev | 16:31 | |
srichter | right, for buttons they use abstract ids afaik, like refresh-button | 16:31 |
__gotcha_ | I have the info I needed | 16:31 |
philiKON | if there's no PTS in zope2, a dummy engine takes over that does the default substitution | 16:32 |
__gotcha_ | to begin a cruisade ;-) | 16:32 |
philiKON | in zope 3, there's this dummy engine for zpt, yes | 16:32 |
__gotcha_ | philiKON, thanks teaching the newbie ;-) | 16:32 |
srichter | __gotcha_: what's you crusade? | 16:32 |
philiKON | python message ids are not automatically translated, of course; which is why we need the i18n machiner on all the time, even if we only want one language | 16:32 |
__gotcha_ | well accepting the idea Plone must run without PTS complexify a lot of the i18n support | 16:32 |
srichter | I see | 16:33 |
philiKON | well, even if you only have message ids coming rom ZPT? | 16:33 |
__gotcha_ | and I'll begin to speak against this and the 'English rules' rule | 16:33 |
__gotcha_ | philiKON, no | 16:33 |
__gotcha_ | but look at archetypes or cmfformcontroller | 16:33 |
__gotcha_ | and you'll se what I mean | 16:33 |
* philiKON looks | 16:34 | |
__gotcha_ | now, thanks for your help | 16:34 |
__gotcha_ | I need to go back to customer | 16:34 |
__gotcha_ | work | 16:34 |
__gotcha_ | ;-) | 16:34 |
srichter | see yeah | 16:34 |
* srichter needs some inspiration about the user preferences now to finish it today | 16:34 | |
philiKON | __gotcha_, any pointers to what i should look at? | 16:34 |
__gotcha_ | I just mean a lot of strings come from python code | 16:35 |
philiKON | riiight | 16:35 |
__gotcha_ | because its generic framework | 16:35 |
philiKON | so, you'll need python message ids sooner or later | 16:35 |
__gotcha_ | so we now extract them by hand | 16:35 |
philiKON | ouch | 16:35 |
__gotcha_ | that's my cruisade | 16:35 |
__gotcha_ | I do not extract them | 16:35 |
srichter | by hand???????? | 16:35 |
srichter | wahhh!!! | 16:35 |
__gotcha_ | nice and courageous do | 16:35 |
__gotcha_ | ses you | 16:35 |
philiKON | __gotcha_, btw, i've been thinking about supporting z3's i18n machinery in five | 16:35 |
philiKON | __gotcha_, i think i'll do this soon | 16:36 |
__gotcha_ | just look at z3-i1!n branch of PTS | 16:36 |
philiKON | __gotcha_, this will turn over Zope 2 ZPT i18n to z3's i18n machinery | 16:36 |
__gotcha_ | do not repeat my work | 16:36 |
philiKON | well, question is if we really need PTS then (we don't) | 16:36 |
__gotcha_ | remeber five use z2 templates | 16:36 |
philiKON | yes | 16:36 |
__gotcha_ | we don't, agreed | 16:36 |
*** SteveA_ has joined #zope3-dev | 16:37 | |
philiKON | we can get rid of PTS alltogether if Five supports z3's i18n | 16:37 |
philiKON | right now, PTS is repeating z3's work | 16:37 |
__gotcha_ | z2 and z3 PT engines are different | 16:37 |
philiKON | i know | 16:37 |
__gotcha_ | how do you want to use z3 engine with Z2 templates | 16:37 |
__gotcha_ | tha's for another day | 16:37 |
__gotcha_ | really back to work | 16:38 |
philiKON | __gotcha_, i'll sketch out an implementation on a Five branch | 16:38 |
__gotcha_ | but if you do it | 16:38 |
philiKON | and show it to you | 16:38 |
__gotcha_ | lemme know | 16:38 |
philiKON | yup | 16:38 |
__gotcha_ | I'll see it | 16:38 |
__gotcha_ | I read Five checkins | 16:38 |
__gotcha_ | ciao | 16:38 |
philiKON | ciao | 16:38 |
srichter | bye | 16:38 |
*** Aiste has quit IRC | 16:44 | |
*** KurtB has joined #zope3-dev | 16:45 | |
KurtB | howdy.... I'm having some zope3 install issues. I've been thru the docs, run the tests (all ok) edited my principals file, and it "looks" like it starts, but connecting to port 8080 yeilds no results. | 16:46 |
*** SteveA has quit IRC | 16:46 | |
KurtB | The z3.log has no errors in it, just the http started info. | 16:46 |
KurtB | Are there any other debugging tools you folks could recommend? | 16:47 |
KurtB | thx. :-) | 16:47 |
srichter | KurtB: wow, I have never heard about such a problem | 16:48 |
KurtB | It's a bit frustrating. | 16:48 |
srichter | so you started Zope 3 on your local machine? | 16:49 |
KurtB | I'm wondering if I've missed something essential. | 16:49 |
srichter | is it Windows or Linux? | 16:49 |
KurtB | er... | 16:49 |
MacYET | maybe it binds only to 127.0.0.1 | 16:49 |
srichter | Is it the trunk or X3.0? | 16:49 |
KurtB | not local, I have no head on that box. | 16:49 |
KurtB | It's linux. | 16:49 |
srichter | in Linux it should bind everywhere | 16:49 |
KurtB | trunk... svn'd it after the official release did not pass the tests. | 16:49 |
MacYET | srichter: zope 2.8 used to bind to 127.0.0.1 only | 16:50 |
MacYET | :) | 16:50 |
KurtB | yup, that's what I thought. | 16:50 |
srichter | so in the trunk you can specifically specify the IP you want to bind on | 16:50 |
KurtB | hmm... so... I should try mayby lynxing to it? | 16:50 |
srichter | edit zope.conf | 16:50 |
srichter | yeah, that would be also worth a try | 16:50 |
KurtB | srichter, yup.. did that. | 16:50 |
KurtB | edit the zope.conf... made sure there were no weird port conflicts. | 16:51 |
* KurtB gives it a whirl with lynx | 16:51 | |
srichter | make the address x.x.x.x:8080 instead of 8080 | 16:52 |
srichter | this should link to a particular IP address then | 16:52 |
KurtB | k. will try that, too. | 16:52 |
srichter | ok, I just tried to access my install from the real IP (not localhost) and it worked just fine | 16:55 |
srichter | KurtB: if it si a remote Linux machine, it might be a router that does not allow port 8080 to go through | 16:55 |
KurtB | naww... on same segment. | 16:55 |
KurtB | Thought of that. :-) | 16:56 |
srichter | mmh | 16:56 |
srichter | so what error message do you get? | 16:56 |
srichter | can you ping the port? | 16:56 |
srichter | maybe use telnet? | 16:56 |
srichter | telnet x.x.x.x 8080 | 16:56 |
srichter | GET /index.html | 16:56 |
KurtB | that's what's weird no error... trying telnet... | 16:57 |
*** MacYET has left #zope3-dev | 16:57 | |
srichter | (your need to press two times enter to send the request) | 16:57 |
srichter | wget would do too I imagine | 16:58 |
KurtB | see.. it just times out... | 16:58 |
KurtB | never connects. | 16:58 |
KurtB | hmm.... | 16:59 |
KurtB | lemme restart with the IP next tot he port | 16:59 |
srichter | that's very weird; the server code is based on Medusa and is very old and well tested | 17:01 |
*** AJC has quit IRC | 17:01 | |
srichter | so I doubt there is a server bug | 17:01 |
srichter | though someone recently messed with the address part of the config file | 17:01 |
KurtB | schweet... | 17:01 |
KurtB | binding to the IP in the config file "fixed" it. | 17:01 |
KurtB | lemme do some more kicking around... | 17:02 |
KurtB | well, at least the telnet trick worked. | 17:02 |
KurtB | from the same machine. | 17:02 |
srichter | cool | 17:03 |
KurtB | lemme hack on it some more, and i'll report back later with my findings. | 17:03 |
srichter | if you figure out why it did not work, a bug report would be nice | 17:03 |
* KurtB has to go to a meeting across campus. | 17:03 | |
srichter | thanks | 17:03 |
KurtB | Certainly. | 17:03 |
KurtB | :-) | 17:03 |
*** BjornT has joined #zope3-dev | 17:10 | |
*** Theuni has quit IRC | 17:11 | |
*** gintas has quit IRC | 17:17 | |
*** gintas has joined #zope3-dev | 17:17 | |
efge | hi folks | 17:18 |
efge | about the form refactoring, is there anything written done about what's planned ? | 17:18 |
srichter | efge: hi | 17:18 |
efge | written down I mean | 17:19 |
srichter | efge: no, but Gary is pretty much all done | 17:19 |
srichter | so you might want to ask him | 17:19 |
srichter | I do not even know what he did ;-) | 17:19 |
srichter | and it will be available only in 3.2 | 17:20 |
*** alga has quit IRC | 17:39 | |
*** bradb has quit IRC | 17:41 | |
*** admp has quit IRC | 17:41 | |
*** viyyer has quit IRC | 17:43 | |
*** J1m has joined #zope3-dev | 17:44 | |
*** sashav has quit IRC | 17:44 | |
*** admp has joined #zope3-dev | 17:48 | |
*** admp has quit IRC | 17:49 | |
*** ignas has quit IRC | 17:56 | |
*** tonico has quit IRC | 18:03 | |
*** mooded has quit IRC | 18:08 | |
*** tonico has joined #zope3-dev | 18:11 | |
srichter | projekt01: is there some way in HTML to group a set of elements? It should be like a div, but have a title | 18:11 |
srichter | something like that: | 18:11 |
srichter | +-- My Title ------+ | 18:11 |
srichter | | | | 18:11 |
srichter | +-----------------+ | 18:11 |
*** bradb has joined #zope3-dev | 18:13 | |
*** regebro has joined #zope3-dev | 18:14 | |
regebro | Hi all! Quick Q: | 18:15 |
regebro | Assume that I have a browser:page called "foobar.html". | 18:15 |
regebro | Can I make the same page available easily under another name, say "ramalama.html"? | 18:15 |
srichter | regebro: yes, using the pages directive | 18:16 |
srichter | this way you only have to repeat the attribute/template that should be used again | 18:16 |
srichter | another way would be to use the redirect directive mentioned yesterday | 18:17 |
regebro | OK, thanks, none of those are desirable for the moment. Well, possibly the redirect one would be ok. | 18:18 |
d2m | srichter: <fieldset> <legend> My Title </legend> ... other content </fieldset> | 18:18 |
regebro | In this case I have one product that sets up pages, and another product that need to set up the exact same pages, but undera different nname. | 18:19 |
srichter | d2m: thanks | 18:19 |
regebro | If you wonder "WTF!?" I'll just say: CMF. :p | 18:19 |
srichter | regebro: :-) You can write your own directive dealing with this sort of thing | 18:20 |
regebro | Sure I can'. I don't want to. ;) Too much work. | 18:20 |
srichter | regebro you should get in the mode of writing your opwn directives; once you know how to do it, it will be so easy | 18:20 |
srichter | really, I encourage developers to develop vustom directives for this sort of thing | 18:21 |
regebro | I already know, I've done a buncgh of them for Five already, but it's not worth it in this case. | 18:21 |
srichter | ok | 18:21 |
regebro | copy paste is easier.;) | 18:21 |
srichter | yep | 18:22 |
*** bskahan has joined #zope3-dev | 18:25 | |
*** vlado is now known as vlado|away | 18:26 | |
*** AJC has joined #zope3-dev | 18:34 | |
*** lunatik has quit IRC | 18:35 | |
*** tarek_ has quit IRC | 18:38 | |
*** lunatik has joined #zope3-dev | 18:40 | |
*** __gotcha_ has quit IRC | 18:41 | |
*** bskahan has quit IRC | 18:42 | |
*** bskahan has joined #zope3-dev | 18:46 | |
AJC | by default, objects are stored in a ZODB right? when does it make sense to use an SQL database to store things? i'm expecting to have quite a bit of searching and cross referencing of the data... | 18:49 |
srichter | AJC: almost never, unless your data is truely tabular | 18:50 |
AJC | nah, it's more a case of having many articles and posts that are searched and indexed centrally | 18:52 |
AJC | so ZODB would be as efficient and more elegant for this kind of use? | 18:52 |
srichter | yes, in my opinion at least | 18:53 |
srichter | the index and catalog code used in Z3 is based on years of expereinece with Z2, where it has been very successful | 18:54 |
AJC | heh, well you're well placed to know :-) thanks for your advice. | 18:54 |
srichter | if boston.com can use it, your app will as well :-) | 18:54 |
AJC | indeed ;) | 18:54 |
srichter | if you are not happy with the indeces that come with Zope 3, you can always plugin something more established, like Lucene | 18:55 |
AJC | heh, i've not tried it yet (except with existing applications), i'm just thinking about how to approach my problem | 18:57 |
*** jack-e is now known as jack-e|away | 18:59 | |
srichter | AJC: I think you will be fine with ZODB :- | 19:00 |
srichter | :-) | 19:00 |
AJC | yes, thanks. that's the advice i was looking for! | 19:00 |
AJC | what kind of hardware is boston.com on? | 19:01 |
*** SteveA__ has joined #zope3-dev | 19:01 | |
srichter | you have to ask Tres or someone from ZC about that | 19:01 |
srichter | it is a pretty big cluster I imagine | 19:01 |
*** Aiste has joined #zope3-dev | 19:02 | |
*** bradb has quit IRC | 19:02 | |
*** tvon has joined #zope3-dev | 19:03 | |
*** BjornT_ has joined #zope3-dev | 19:07 | |
AJC | heh, i'm only on one machine, but i guess if i need a cluster i should be able to support it by then!! | 19:08 |
*** BjornT has quit IRC | 19:08 | |
*** bradb has joined #zope3-dev | 19:08 | |
*** BjornT_ is now known as BjornT | 19:08 | |
*** SteveA_ has quit IRC | 19:09 | |
*** lunatik has joined #zope3-dev | 19:26 | |
*** SteveA__ is now known as SteveA | 19:26 | |
*** lunatik has left #zope3-dev | 19:27 | |
srichter | is there a reason why the object widget is not registered? | 19:27 |
*** ignas has joined #zope3-dev | 19:27 | |
*** regebro has quit IRC | 19:32 | |
*** mgedmin has joined #zope3-dev | 19:33 | |
*** regebro has joined #zope3-dev | 19:34 | |
srichter | projekt01: how can I make the Object Widget work for me in an edit form? | 19:38 |
srichter | it also seems that one cannot have nested object widgets | 19:39 |
*** regebro has quit IRC | 19:45 | |
*** hazmat has joined #zope3-dev | 19:45 | |
*** bskahan has quit IRC | 19:47 | |
*** faassen has left #zope3-dev | 19:51 | |
*** admp has joined #zope3-dev | 19:53 | |
ignas | srichter, ping | 19:55 |
srichter | ignas: pong | 19:56 |
ignas | maybe you could help me by explaining one tricky place in Zope3? | 19:56 |
srichter | sure | 19:56 |
ignas | BaseRequest._getBody | 19:56 |
ignas | does seek(0) | 19:56 |
srichter | file? | 19:57 |
ignas | zope publisher base | 19:57 |
ignas | which breaksfunctional ttests, because StringIO is passed as the body_instream | 19:58 |
ignas | so what you actualy get is - full request with headers instead of the bofy of the request | 19:58 |
*** Arnia has joined #zope3-dev | 19:59 | |
ignas | if i comment the seek - request.body works in my functional tests | 19:59 |
Arnia | projekt01: Available for a chat? | 19:59 |
ignas | yet i am not sure it doesn't break anything in zope3 | 19:59 |
srichter | ignas: well, I thought that's actually the point of getBody() -- to return the entire request | 20:00 |
srichter | let's see what the interface says | 20:00 |
ignas | then why headers are skipped in real life ? | 20:00 |
ignas | i tried submitting some forms and got no headers | 20:01 |
ignas | when calling request.body | 20:01 |
ignas | it only works in functional tests | 20:01 |
ignas | and what would be the right way of extracting the content of a request in that case ? | 20:02 |
srichter | ok, so the doc string is ambiguous about it | 20:03 |
srichter | you can get the body easily by looking for the first empty line | 20:03 |
srichter | in the request | 20:03 |
srichter | ok, I am convinced now that the behavior is correct | 20:03 |
ignas | well in real life (in a live running zope instance) you get no empty lines | 20:04 |
ignas | and no authorization headers | 20:04 |
ignas | no content lengthheaders | 20:04 |
ignas | nothing, only the content | 20:04 |
srichter | huh? in real life you do get all those things | 20:04 |
srichter | I think a request must be of the form: | 20:05 |
srichter | headers | 20:05 |
srichter | empty line | 20:05 |
srichter | content | 20:05 |
*** bskahan has joined #zope3-dev | 20:05 | |
srichter | (in HTTP) | 20:05 |
ignas | Zope3/src/zope/publisher/publish.py(122)publish() | 20:05 |
ignas | i got a breakpoint there | 20:05 |
ignas | i submit a form | 20:05 |
ignas | and do request.body | 20:06 |
ignas | and i am not getting any headers at all | 20:06 |
srichter | well, are you talking about HTTP requests? | 20:06 |
ignas | no i am talking about browserrequests | 20:07 |
srichter | so thing | 20:07 |
ignas | they do inherit from httprequest though | 20:07 |
srichter | ok, so the instream comes from task.request_data | 20:07 |
srichter | as seen in zope.server.http.publisherhttpserver line 51 | 20:07 |
ignas | yes | 20:10 |
ignas | and ? | 20:10 |
srichter | well, now we have to find out where the instream comes from | 20:10 |
srichter | look at httprequestparser | 20:10 |
srichter | there it seems to separate body from headers | 20:11 |
ignas | data holds the full request | 20:14 |
ignas | so i guess and terms headers and body are used all over the polace so i guess body is meant to be the content part without headers ... | 20:15 |
srichter | mmh, this is strange | 20:15 |
srichter | yes | 20:16 |
srichter | you can see it in httprequestparser.py | 20:16 |
ignas | yes | 20:16 |
srichter | the instream is basically what gets saved in self.body_rcv | 20:16 |
ignas | i have put pdb.set_trace() in the begining of received() | 20:16 |
srichter | and only stuff after the header is added to it | 20:17 |
srichter | so the first thing should be that the doc string zope.publisher.interfaces.BaseRequest gets updated | 20:17 |
ignas | so request.body can only return the content part | 20:17 |
ignas | which I expected | 20:18 |
srichter | to clarify that only the content of the request is returned | 20:18 |
srichter | yes | 20:18 |
ignas | yet ftesting has another way of thought | 20:18 |
ignas | and leaves the headers intact | 20:18 |
srichter | then ftesting is implemented incorrectly | 20:18 |
ignas | which kind of complicates things ... | 20:18 |
ignas | yet if i will remove headers - i am not sure that functional tests that do expect headers in the body won't break | 20:19 |
ignas | and they do break if i recall correctly | 20:19 |
srichter | then these tests need to be fixed | 20:20 |
ignas | i am nnot sure whether i am right yet authorization depends on this behaviour of functional tests | 20:20 |
ignas | ouch | 20:20 |
ignas | i see | 20:20 |
srichter | and you need to provide some BBB code for the incorrect way of doing things | 20:20 |
srichter | it would be great if you could fix that bug | 20:21 |
srichter | its a little bit of work, but better do it now than later | 20:21 |
*** hazmat has quit IRC | 20:21 | |
*** gintas has quit IRC | 20:27 | |
*** garrett-smith has joined #zope3-dev | 20:27 | |
ignas | srichter, a theory - if anyone was using request.body in his code - he was geting the right data, and if someone was using it in tests - he would have noticed the bug earlier and i am ~100% sure there are no maniacs that wrote two instances of code - one for functional test and one for deployment ;) | 20:38 |
ignas | the theory is being checked by running Zope3 test suite | 20:38 |
srichter | I assume that noone is using request.body in their code | 20:39 |
ignas | that was the idea | 20:39 |
ignas | well i am using it :) | 20:39 |
srichter | and the code that does (the low level publsiher code) does not have ftests | 20:39 |
srichter | so you are on the hook to fix it ;-) | 20:39 |
ignas | the lack of tests ??? | 20:39 |
J1m | request.body should not include headers | 20:41 |
J1m | I'd be very surprised if it included headers in the functional tests. | 20:42 |
srichter | J1m: right, so ftesting implements request.body incorrectly | 20:42 |
J1m | But, I thought ftesting used TestRequest. | 20:42 |
J1m | Perhaps it is setting up the instream incorrectly. | 20:42 |
ignas | HTTPCaller | 20:42 |
ignas | does that in a wrong way ... | 20:42 |
J1m | Hm, looks right to me | 20:44 |
ignas | instream = StringIO(instream.read()) was the fix i did | 20:44 |
ignas | u ubserted it just after for header in rfc822.Message(instream).headers] | 20:45 |
mgedmin | J1m, the problem is as follows, if I understand it correctly: | 20:45 |
J1m | This should not be necessary | 20:45 |
mgedmin | HTTPCaller creates a StringIO with headers + body | 20:45 |
mgedmin | reads all headers from that StringIO | 20:45 |
mgedmin | leaves it positioned at the beginning of the body | 20:45 |
J1m | yes | 20:45 |
mgedmin | so if you do instream.read(), it'll get the body | 20:45 |
J1m | yes | 20:45 |
mgedmin | but BaseRequest.body actually calls seek(0) | 20:46 |
J1m | so far so good | 20:46 |
J1m | Ah | 20:46 |
mgedmin | doesn't it, ignas? | 20:46 |
ignas | yep | 20:46 |
* mgedmin over | 20:46 | |
ignas | thank you :) | 20:46 |
J1m | So BaseRequest.body makes an invalid assumption about seekability, IMO | 20:46 |
srichter | really? | 20:47 |
srichter | it needs to be able to seek, since after the reading it needs to reset to the original location | 20:47 |
J1m | why? | 20:47 |
ignas | well imho - not doing seek(0) would make the behaviour unexpected sometimes | 20:47 |
srichter | sicne one could use the instream_file directly | 20:47 |
ignas | what if i seek body_instream somewhere | 20:47 |
J1m | The instream is a stream, not a file | 20:47 |
ignas | and then do request.body ??? | 20:47 |
srichter | I agree with ignas | 20:48 |
J1m | The publisher should be usable with cgi | 20:48 |
J1m | The instream, in that case, would be a real stream | 20:48 |
mgedmin | ignas, srichter, you can't seek a TCP socket or sys.stdin | 20:48 |
J1m | exactly | 20:48 |
srichter | I see what you are saying now | 20:49 |
ignas | so the implementation of the _getBody() is a dud then ... | 20:49 |
srichter | all this is not documented of course | 20:49 |
srichter | so I looked at the only implementation available | 20:49 |
J1m | srichter, stdin should be pretty suggestive. :) | 20:49 |
srichter | well, but it is not one of the real implementations | 20:50 |
J1m | ignas, I think the implementation of _getBody is probably broken. | 20:50 |
srichter | we really, really need to make the docs in zope.publisher.interfaces better for this | 20:50 |
ignas | J1m, but unbreaking it would involve storing the whole stream somewhere in the request | 20:51 |
* J1m wonders what wsgi says about the input stream | 20:51 | |
ignas | making it seekable | 20:51 |
ignas | or else you will not be capable of doing _getBody twice | 20:51 |
J1m | ignas, I'm 90% that the cgi module does exactly that, in a temporary file | 20:51 |
J1m | wsgi specified non-seekable input streams | 20:52 |
J1m | we supposedly support wsgi | 20:52 |
J1m | wsgi specifies non-seekable input streams | 20:53 |
*** hazmat has joined #zope3-dev | 20:53 | |
J1m | We use the cgi module to parse requests | 20:54 |
J1m | The cgi module provides access to the body as a temporary file, I believe | 20:54 |
* mgedmin is utterly confused | 20:55 | |
J1m | do the tests pass without that seek call? | 20:55 |
mgedmin | so can or can not BaseRequest use seek on the instream? | 20:55 |
J1m | It should not | 20:55 |
J1m | It obviously can, because it does | 20:55 |
mgedmin | s/can/should/ | 20:55 |
mgedmin | ;) | 20:56 |
mgedmin | but you already answered that | 20:56 |
srichter | actually, the instream is generated in httptask | 20:56 |
J1m | srichter, for zserver | 20:56 |
srichter | yes | 20:57 |
J1m | Not everything will use httptask | 20:57 |
J1m | Not everything will use zserver | 20:57 |
ignas | J1m, yes my tests pass with seek removed, yet if someone would seek the request._body_instream manualy - he would break _getbody | 20:57 |
srichter | right, of course | 20:57 |
srichter | I just do not see where we use CGI | 20:57 |
J1m | ignas, then they deserve to lose | 20:57 |
srichter | the instream in zserver is either a ChunkedReceiver or FixedStreamReceiver | 20:57 |
J1m | srichter, forget zserver | 20:58 |
J1m | browser request uses cgi | 20:58 |
*** efge has left #zope3-dev | 20:58 | |
J1m | request.body is quite possibly bogus to begin with | 20:59 |
mgedmin | J1m, did you mean BrowserRequest or HTTPRequest? | 20:59 |
ignas | so what is the plan ? | 20:59 |
ignas | removing the seek from _getBody ? | 20:59 |
ignas | fixing functional tests | 20:59 |
ignas | or fixing the _getBody to do the right stuff TM ? | 21:00 |
ignas | by functiuonal tests i mean the part thatleaves headers in the stream ... | 21:00 |
J1m | functional tests are not broken | 21:00 |
J1m | I'm looking at the request body issue | 21:01 |
J1m | Note that request.body isn't used in Z3 except by it's tests. | 21:01 |
J1m | I suggest deprecating request.body and getting rid of it's seek | 21:02 |
mgedmin | what should you use then in a view that handles, e.g., HTTP PUT? | 21:03 |
mgedmin | request.input_stream.read()? (I'm not sure if it's spelled that way) | 21:03 |
J1m | request.bodyFile | 21:03 |
J1m | But that is bogus too, at it's a stream | 21:03 |
ignas | it is used by zope.app.http.put | 21:04 |
J1m | but it doesn't seek | 21:04 |
J1m | It's used by other things that do seek. | 21:04 |
J1m | But they shouldn't. | 21:05 |
J1m | We should really rethink that api | 21:05 |
J1m | But not for 3.1. :) | 21:05 |
mgedmin | ignas, for the time being I suggest you do the same thing that zope.app.http.put does | 21:06 |
J1m | For now though, we should document these issues in the interface | 21:06 |
ignas | J1m, data = body.read() seems like seeking to me | 21:06 |
J1m | No, it's nothing like seeking | 21:06 |
J1m | It consumes data | 21:06 |
J1m | we should *not* assume that input streams are seekable. | 21:07 |
J1m | If I had time to work on this, I would: | 21:07 |
ignas | i see, i got confused in terms | 21:07 |
J1m | - Change the functional tests so that they produce a non-seekable stream | 21:07 |
J1m | - Fix what breaks as a result | 21:08 |
J1m | which, I suspect is DAV, which is already broken. :/ | 21:08 |
J1m | afaik | 21:08 |
mgedmin | somebody should file an issue in the collector so this isn't forgotten | 21:09 |
* mgedmin hides under a bush | 21:10 | |
J1m | yes | 21:10 |
J1m | ignas, if you want to help out, you could: | 21:11 |
J1m | do some number of: | 21:11 |
J1m | - remove the seek from _getBody | 21:12 |
J1m | - submit an issue | 21:12 |
J1m | and if you wanted to more | 21:12 |
J1m | - update the interfaces to point out the bodyFile is really s stream and that getBody consumes the data | 21:13 |
ignas | mgedmin, suggested subclassing StringIO and raising exception everytime the stream passed to the HTTPRequest is seeked ... | 21:13 |
J1m | - deprecate request.body | 21:13 |
J1m | - deprecate request.bodyFile | 21:13 |
J1m | - add request.bodyStream | 21:13 |
J1m | ignas, yes, to fix the functional tests | 21:13 |
J1m | But then be prepared to fix the tests that break as a result | 21:14 |
J1m | This would be a great thing to do if you have time | 21:14 |
ignas | which i am not sure i have ... i got far behind the schedule lately :( | 21:17 |
ignas | and commiting to zope requires me reading a lot of documents | 21:17 |
ignas | coding conventions, guidelines and stuff i haven't read yet | 21:18 |
J1m | so, submitting an issue would be nice :) | 21:18 |
ignas | that is a MUST DO :) | 21:18 |
J1m | And, in the mean time, avoid request.body :) | 21:18 |
ignas | i see | 21:18 |
ignas | i'll get on with the issue then | 21:19 |
J1m | Thanks | 21:19 |
J1m | and thanks for finding the problem | 21:19 |
ignas | it's not me who finds problems - they find me themselves most of the time ;) | 21:22 |
mgedmin | ignas, bugs like you, so they go out of hiding ;) | 21:29 |
*** d2m has quit IRC | 21:30 | |
*** d2m_ has joined #zope3-dev | 21:30 | |
*** d2m_ is now known as d2m | 21:30 | |
garrett-smith | J1m: shoudl this new interface be named ILogout, or IAuthenticationLogout | 21:35 |
garrett-smith | we're only adapting IAuthentication, so i'm thinking the later is better | 21:35 |
SteveA | IAuthenticatoinLogout1, to plan for future revisions, perhaps ;-) | 21:36 |
garrett-smith | I prefer roman numerals myself | 21:36 |
garrett-smith | but I'll fight that battle later :-) | 21:36 |
mgedmin | IIAuthentication, IIIAuthentication, IVAuthentication ... | 21:38 |
garrett-smith | better at the end...IAuthenticationI | 21:38 |
SteveA | if I want to introduce an interface that I *know* will be wrong, IFoo-1 | 21:38 |
garrett-smith | that scales better | 21:38 |
SteveA | if I want to introduce an interface that I *know* will be very wrong, IFoo-100 | 21:38 |
garrett-smith | that's for forward compatibility? | 21:38 |
garrett-smith | good idea | 21:39 |
mgedmin | it will be *so* bad, Python itself will warn you by raising a SyntaxError | 21:39 |
srichter | well you could always define an encoding to fix that :-) | 21:39 |
*** alga has joined #zope3-dev | 21:39 | |
srichter | like IFoo_minus_100 | 21:39 |
J1m | I think ILogout would be fine | 21:40 |
garrett-smith | you laugh, but think how cool it will be to actually logout! | 21:40 |
J1m | I don't think an interface name should reflect how it is adapted | 21:40 |
srichter | you mean in the future, when we get logout right? | 21:40 |
mgedmin | will it actually work with HTTP basic auth? how? | 21:40 |
alga | garrett-smith: you mean to logout2? | 21:40 |
J1m | You could call the adapter AuthenticationLogout | 21:41 |
* mgedmin still waits for cookie auth in standard zope 3 installs | 21:41 | |
J1m | mgedmin, why do we need that | 21:41 |
J1m | I submit that session auth is better | 21:41 |
garrett-smith | J1m: the auths will implement ILogout directly, but I'll create a fall back for (non)existent IAuthentications | 21:41 |
J1m | and is a form of cookie auth anyway | 21:41 |
garrett-smith | alga: logout2 is already deprecated...we're on logout3 now | 21:42 |
alga | :) | 21:42 |
*** mkerrin has joined #zope3-dev | 21:43 | |
mgedmin | J1m, as long as authentication supports (1) nice skinnable login forms on the web, and (2) logout, then I'm happy | 21:44 |
mgedmin | sessions are built on cookies, so auth built on sessions is "cookie auth" in my book | 21:45 |
J1m | Congratulations, you're happy! | 21:45 |
mgedmin | am I? | 21:45 |
* mgedmin needs to svn up | 21:45 | |
mgedmin | currently when I click 'login' in the ZMI, I get a HTTP basic auth dialog | 21:45 |
J1m | But sessions could be built on other things as well | 21:45 |
J1m | mgedmin, that's a configuration issue | 21:45 |
* bskahan looks forward to being able to logout again | 21:46 | |
mgedmin | can I configure Zope 3 to accept principals defined in principals.zcml via session auth? | 21:46 |
J1m | mgedmin, you need to create a pau and configure it to use session auth | 21:46 |
mgedmin | how? | 21:46 |
SteveA | if you are logged in, and you get a page that requires permissions that you do not have, what should happen? | 21:46 |
* mgedmin had the impression that pau only works with users defined in a principal folder | 21:46 | |
* mgedmin not sure why he had that impression | 21:46 | |
* mgedmin needs to spend more time playing with zope 3 | 21:47 | |
J1m | mgedmin,right, pau doesn;t work with principals.zcml-defined principals | 21:47 |
mgedmin | ah | 21:47 |
J1m | principals.zcml principals should only be used for bootstrapping | 21:47 |
* SteveA has junked principals.zcml on his system | 21:47 | |
garrett-smith | SteveA: how do you bootstrap the admin account? | 21:48 |
garrett-smith | er, principal | 21:48 |
SteveA | garrett-smith: bootstrap in what sense? | 21:48 |
mgedmin | J1m, one problem: the user is forced to close the browser after the bootstrapping and before he can actually use the system | 21:48 |
mgedmin | we had that problem with SchoolBell, if you add it as a content object | 21:48 |
garrett-smith | a principal who can configure services, etc. | 21:49 |
SteveA | garrett-smith: all the authentication data is in an external RDB. there is no bootstrapping. | 21:49 |
garrett-smith | ah | 21:49 |
SteveA | garrett-smith: no principal configures services because i don't believe in TTW configuration of services ;-) | 21:49 |
J1m | Use firefox with the Web Developer extension so that you can toss auth creds :) | 21:49 |
* mgedmin does that already | 21:50 | |
garrett-smith | that's a *great* extension | 21:50 |
SteveA | if you are logged in, and you get a page that requires permissions that you do not have, what should happen? | 21:50 |
* mgedmin tries to think about ordinary uses | 21:50 | |
* mgedmin tries to think about ordinary useRs | 21:50 | |
SteveA | should you get a "no, you can not" page | 21:50 |
SteveA | should you be asked "do you want to authenticate differently?" | 21:50 |
J1m | SteveA, that is site policy | 21:50 |
garrett-smith | that's configurable in the PAU | 21:51 |
* J1m doesn't have time for this discussion | 21:51 | |
SteveA | if it is configurable, then i'm happy | 21:51 |
* philiKON wonders why logout is such a problem... for my book i implemented a perfectly suitable cookie-based authenticator (based on pluggableauth, though) | 22:01 | |
mgedmin | philiKON, logout is not a problem -- http auth is the problem ;) | 22:01 |
philiKON | yup | 22:02 |
philiKON | it sounded like logout was the problem, though.. | 22:02 |
*** apoirier has quit IRC | 22:03 | |
AJC | what's a good way to launch Zope on a dedicated box in a nohup way? | 22:22 |
AJC | i've tried "nohup bin/runzope" but it seems to have trouble once i've logged out | 22:23 |
J1m | use zopectl | 22:23 |
AJC | ah, that's what i'm missing. thanks. i'll look it up | 22:23 |
*** ignas has quit IRC | 22:26 | |
AJC | is zopectl for Z3 the same as the Z2 one? | 22:29 |
J1m | It's inspired by. I don't know if it's the same | 22:29 |
J1m | assume it is :) | 22:29 |
philiKON | i think so | 22:30 |
philiKON | i think it comes with zdaemon | 22:30 |
J1m | it uses zdaemon | 22:30 |
philiKON | i don't think it has all of the commands that the zope 2 equivalent has (e.g. zopectl debug) | 22:30 |
J1m | It has debug | 22:31 |
philiKON | oh? | 22:31 |
AJC | yeah, i've got the manual, and what i've tried so far works for me... thanks guys | 22:31 |
* philiKON tries debug | 22:31 | |
philiKON | philipp@bender:~/Zope3Instance$ bin/zopectl start | 22:32 |
philiKON | . . . . . . . . . . . . . . . . . . . ------ | 22:32 |
philiKON | 2005-03-31T21:32:19 INFO root daemonizing the process | 22:32 |
philiKON | daemon process started, pid=17111 | 22:32 |
philiKON | philipp@bender:~/Zope3Instance$ bin/zopectl debug | 22:32 |
philiKON | *** Unknown syntax: debug | 22:32 |
J1m | bin/zopectl debug | 22:33 |
J1m | No handlers could be found for logger "ZODB.FileStorage" | 22:33 |
J1m | >>> | 22:33 |
J1m | [jim@ds9 3]$ bin/mkzopeinstance -di -ujim:123 | 22:34 |
J1m | [jim@ds9 3]$ cd i | 22:34 |
J1m | [jim@ds9 i]$ bin/zopectl debug | 22:34 |
J1m | >>> | 22:34 |
J1m | philiKON, are you using X3.0? | 22:35 |
philiKON | yes | 22:35 |
philiKON | maybe that's the problem | 22:35 |
J1m | That's why :) | 22:35 |
philiKON | ah, cool | 22:36 |
philiKON | so, it was added on the trunk, eh | 22:36 |
J1m | zopectl debug is a must-have when using instances | 22:36 |
mgedmin | my dream is to be able to get a pdb session on a server that can processes live http requests in other threads | 22:37 |
philiKON | well, if one day we get twisted as a server frontends, we won't have threads, so that could make it easier... | 22:38 |
philiKON | though i think they have a reactor thread api now... not sure, haven't followed twisted in a very long time | 22:39 |
*** RaFromBRC has joined #zope3-dev | 22:39 | |
J1m | garrett-smith, is there a test for principalInfo in group folders? | 22:40 |
mgedmin | twisted supports threads | 22:41 |
mgedmin | schooltool 0.9 was built on twisted + separate threads for request processing (so that ZODB transactions work) | 22:41 |
J1m | we already have twisted as a server front end, in theory :) | 22:41 |
J1m | via wsgi | 22:41 |
AJC | i have twisted as a reverse proxy... | 22:43 |
AJC | where can i upload my file by the way? :-) | 22:43 |
philiKON | right, for zodb we need threads | 22:44 |
*** mkerrin has quit IRC | 22:45 | |
srichter | J1m: so you did not get any twisted integration work done at the PyCon sprint? | 22:51 |
J1m | No, why would we | 22:52 |
J1m | It's already done | 22:52 |
J1m | In theiry | 22:52 |
srichter | because you said you would | 22:52 |
J1m | That was a looong time ago | 22:52 |
J1m | before wsgi | 22:52 |
srichter | well, but that's just for HTTP | 22:52 |
srichter | what about FTP, etc? | 22:52 |
J1m | Hardly anyone uses ftp | 22:52 |
srichter | Did we not want to use Twisted's asyncore, so we could profit from their other protocol implementations as well? | 22:53 |
J1m | there are no non-http etcs at this point | 22:53 |
* mgedmin parsed srichter's remark as "twisted (integration work)" | 22:53 | |
srichter | well, I am still very interested in getting SMTP and POP3 going | 22:53 |
mgedmin | there's SSL for twisted too | 22:53 |
J1m | I'm not interested in working on that myself | 22:53 |
srichter | SMTP would be very nice for the bugtracker's issue mailins | 22:54 |
J1m | eh | 22:54 |
srichter | J1m: I was actually just waiting for PyCon to happen | 22:54 |
srichter | otherwise I would have contacted Itamar a while ago already | 22:54 |
J1m | sorry | 22:54 |
J1m | There were more urgent tasks anyway | 22:55 |
J1m | Mainly pau | 22:55 |
srichter | I really want to get together with him on that as long as he is in cambridge and lives absically around the corner | 22:55 |
srichter | ok, in this case I will contact him and hopefully get something worked out | 22:55 |
philiKON | Accept-Languages is a browser thing, or do other pure-HTTP clients use this in some way or another? | 22:55 |
srichter | I don't think so; but it is just a HTTP header | 22:56 |
philiKON | ok, my question was stupoid anyway | 22:56 |
philiKON | lemme rephrase | 22:56 |
philiKON | do locales make sense in a pure-HTTP, non-browser environment? | 22:57 |
srichter | I think they do | 22:58 |
philiKON | use case? | 22:58 |
srichter | you could have a custom HTTP protocol that worries as much about languages as browser | 22:58 |
philiKON | hmm, ok | 22:58 |
mgedmin | philiKON, Accept-Languages are defined in the HTTP RFC | 22:58 |
mgedmin | which, I think, is not just for browsers | 22:58 |
philiKON | right | 22:58 |
philiKON | :) | 22:58 |
philiKON | it's not so much about Accept-Languages | 22:59 |
philiKON | it's the concept of locales | 22:59 |
philiKON | but yes, they could be useful in other HTTP-based things | 22:59 |
mgedmin | Accept-Languages: XML | 22:59 |
* mgedmin hides | 22:59 | |
* philiKON puts mgedmin in a cage of angle brackets | 23:01 | |
srichter | J1m: why would an object be twice security proxied? | 23:07 |
J1m | why wouldn't I? | 23:09 |
srichter | your question does not make sense... | 23:10 |
srichter | I do not know why the object is twice proxied | 23:10 |
mgedmin | srichter, J1m is twice security proxied | 23:10 |
srichter | :-) | 23:11 |
philiKON | removeSecurityProxy(J1m) | 23:11 |
J1m | srichter, I missunderstood | 23:11 |
J1m | An object might be twice security proxied due to a software bug | 23:11 |
srichter | ok, that gets closer | 23:11 |
SteveA | if proxyFactory is used, then it shouldn't be, because the proxyFactory for a proxy type thing is the thing | 23:11 |
* mgedmin will have to fix a zope 3 bug or something, as a penance for wasting everyone's time with silly jokes on irc | 23:12 | |
srichter | is the bug likely to be in zope.security or in my custom code? | 23:12 |
SteveA | or rather, that returned by proxyFactory for a proxy is the same thing passed in | 23:12 |
srichter | well, I am not messing amnually with the security code | 23:12 |
srichter | I just created a class and provided a checker using defineChecker | 23:13 |
srichter | oh, I see | 23:15 |
srichter | I simply forward an object through a view | 23:15 |
srichter | so the object gets proxied for being a view and for being the object itself | 23:16 |
srichter | I would say this is a bug in the traversal code then | 23:16 |
*** bskahan has quit IRC | 23:18 | |
*** J1m has quit IRC | 23:25 | |
srichter | philiKON: I think the lengthy E-mail is not necessary; +1 on the change | 23:25 |
*** tvon has quit IRC | 23:27 | |
philiKON | srichter, i wanted to make sure i'm not stepping on somebody's toes | 23:28 |
srichter | ok | 23:31 |
*** SteveA has quit IRC | 23:44 | |
*** Aiste has quit IRC | 23:44 | |
*** andrew_m has quit IRC | 23:49 | |
*** andrew_m has joined #zope3-dev | 23:49 | |
*** tvon has joined #zope3-dev | 23:52 | |
*** mgedmin has quit IRC | 23:54 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!