IRC log of #zope3-dev for Friday, 2005-10-28

fdrakefor the record, everyone consented...00:05
*** Alef has quit IRC00:16
*** bradb has left #zope3-dev00:16
*** mkerrin has quit IRC00:22
*** fdrake has quit IRC00:23
*** anguenot has joined #zope3-dev00:34
*** srichter has joined #zope3-dev00:35
*** zbir has joined #zope3-dev00:35
*** ChanServ sets mode: +o srichter00:35
projekt01srichter, this nested menu part in boston skin is a complex usecase for viewlets00:42
srichterbut do we need to implement them as viewlets?00:45
srichterwe support nested menus naturally now, so let's not implement them as viewlets for now00:45
projekt01Yes, I think so00:46
*** sashav has quit IRC00:52
*** sashav has joined #zope3-dev00:53
projekt01srichter, do we really need the update and render methods in viewlet, why do we not use a try/except call in the provider TALES expression01:20
srichterbecause it violates the contract01:21
srichterwe need to enforce this now, so we can benefit later01:21
projekt01Does Gary base on viewlets?01:22
srichterno01:22
projekt01or on content provider?01:22
srichterbut Gary and viewlets base on content providers01:22
srichteryou can always create a viewlet base class that provides this method01:22
srichterbut overall, I want to encourage people to really make use of the two-phase process01:23
projekt01I see all this, but the API is too overloaded for simply things, I think two interfaces where better for define this different things.01:26
projekt01What's about two interfaces instead of two step call01:27
projekt01each interface describes one step, so the TALES expression could check if update should be called or not01:28
projekt01only call update in TALES if a IUpdateAwareProvider is provided01:29
srichterno, two phase will be enforced01:29
srichterit is the only right way01:29
srichterif we allow both, we have to do a lot of documenting explaining when it is not okay to use one phase content providers01:29
projekt01not if you implement def update(self): pass, this smells like a not well defined API to me.01:29
srichterand eventually we will say: always use two-phase01:30
srichterno, it is well defined01:30
srichterthe documentation clearly states that it is okay to have an empty update() method01:30
projekt01why not call update only if we provide a interface where defines a update concept?01:31
srichterbecause it is part of the content provider contract that update must be implemented01:32
projekt01We don't need a update concept in every usecase. This is like you implement getter and setter but you define also readonly=True everytime01:32
srichterno, but update is much more subtle01:32
projekt01Yes, let's implement two content provider like read and write and the TALES expression can see if the update call is needed01:32
srichterand that's the reason I want people to get used to it01:32
srichterbut the point is not that update is about writing/editing01:33
srichterit is about preparing01:33
srichterfor example, if you set the prefix on a widget, that would be a typical update task01:33
srichterwhen people want to use content providers, I want to force them to learn about the two-phase process and why it is the right way to do things01:34
srichterI think the benefit is hard to see right now, but it will be apparent as we use it01:35
srichterbtw, I think the entire Javascript issue can be solved with this too01:35
projekt01Yes, I totaly agree with you, this is a usecase for use the update concept01:36
srichterif you have a view that uses the two phase content providers, then the update() method could tell the view, look I am being rendered and I need this Javascript before the page even starts rendering itself01:36
projekt01I would agree with you at all, if you say that the BrowserView will implement this concept in the future too, I think otherwise we get to far away with viewlets from the view concept.01:38
projekt01I think simply viewlets are only views01:38
srichterno, viewlets are not simple views anymore01:39
srichterthey are content providers01:39
srichterand content providers are browser views + some specific semantics01:39
srichter(like two-phase rendering)01:40
srichtermaybe browser views will grow the two-phase method01:40
srichterbut I am pretty certain that in the next year we are going to switch most page usage to two-phase rendering01:41
srichterI think formlib will be taken in this direction01:41
projekt01Ok, then I will implement the push templates if this simply API will expanded. I really like to develop complex views, but what I need is a simply API for simply usecases.01:43
projekt01I think it's Ok to expand all API's, but not if you implement concepts where not needed allways. Then I guess, you should use another level for doing this.01:44
srichterright, this level are the content providers01:44
srichterwe realize that not everyone is always needing the two phases, but they should be always provided01:45
srichterlike views always have their defaultTraversal() thingy01:45
projekt01I agree in general with you, but I don't like interfaces where I don't have to fully implement. We could get rid of it, if we use two interfaces and make the update part optional.01:48
projekt01Btw, this part is optional and you are describing it in the README.txt01:48
projekt01Why do we not offer a second interface for optional API's?01:49
srichterwher edo I say it is optional?01:49
srichterwhere do I say it is optional?01:49
projekt01def update:pass is optional for me ;-)01:49
srichterno, it is not!!!!!!01:50
srichterit is merely empty!01:50
projekt01Ok, without this method the implementation breaks only because of the call in TALES01:51
*** J1m has quit IRC01:51
srichterno, not only there01:52
srichterwhat if another piece of saoftware wants to use this code?01:52
srichterthey expect the update to be there?01:52
srichterthey expect the update to be there!01:52
projekt01Not if we implement a interface where update defines01:52
srichterfrom their perspsective it would be dubious to have to write a try/expect or interface check01:53
srichterbut then those softwares have to wrory about two interfaces, instead of one01:53
srichterand they have to handle those cases in special ways01:54
srichtereven worse, if some other content providers expect two-phases to be there01:55
srichterso for one case, you have 4-6 lines instead of two and that will multiply for everything that wants to use the two-phase system01:55
srichterand you have to admit, the price we pay is very small01:56
projekt01and now we have to use def update:pass averytime, which I think it's also not nice.01:56
srichterif you use a base class, you have no additional overhead, and if you dont use one you have to write:01:56
srichterdef update(self): pass01:56
projekt01yes01:57
srichteras I said, this is a small price to pay01:57
projekt01Ok, I give up ;-)01:57
srichtergood01:57
srichter:-)01:57
srichterbtw, I totally see where you are coming from01:58
srichterI was thinking about this for a long time too01:58
srichterbut it is for the good of all that we do this :-)01:58
srichterits like using adapters versus inheritance01:58
srichterforcing everyone to use adapters is much more work at the beginning, but the long-time benefits are greater :-)01:59
projekt01You are right, my target was only to get a simply API for new users, but perhaps it's better for the future to bring people to the use of this two step call01:59
projekt01But we have to be careful, this makes the learning curve much higher.02:00
srichteryes, I agree02:01
srichterbut it will save them ugly headaches later02:01
projekt01And I think for new developer, it's allways a pain to understand the concept if the interfaces handle to much uscease02:01
srichterfor them we will have high-level directives that hide this flexibility02:02
srichterZCML often does that actually (whether this is good or bad)02:02
*** deo has quit IRC02:02
projekt01Ok, your second point today, now we have a 2:0 for you ;-)02:03
*** deo has joined #zope3-dev02:03
projekt01Ok, I will go back to the boston skin and implement this part ;-)02:03
srichterthat first argument was not easy, because I see where you are coming from and I partially agree; I just try to look ahead02:04
srichteronce we fully embrace viewlet/portlet based page creation, we will always use the two phase process02:04
srichterI am really looking forward to developing a new page concept for the upcoming Zope 3 release02:05
srichters02:05
srichterI have already some ideas02:05
projekt01Yes, I agree, that's excatly what we need for portlets02:06
projekt01Are you thinking about push templates?02:06
projekt01I implemented a prototype, it's amazing what you can do with a push template concept!02:07
srichteryeah, I think it will be push templates02:08
projekt01It allows you totaly new kind of implementations. Because the brain get not overloaded with all this macro and TAL parts02:08
srichterright02:08
srichterit is all Python and content providers :-)02:09
projekt01cool, take a look at KID templates02:09
srichterI wish I had time02:11
projekt01We can write a mail to the list after the release, I guess other people will love and join this development02:12
projekt01;-)02:13
srichterI agree02:13
projekt01Ok, hope I can commit a working boston skin branch tonight.02:14
srichterthat would awesome02:14
projekt01I let you know if I'm ready. btw, I'm out of office tomorrow and back at night.02:14
srichterok02:14
projekt01When do you need a working version for the release02:14
projekt01I hope to get finished at saturday02:15
srichterI am looking forward to it02:16
projekt01Ok02:16
*** tiredbones has quit IRC02:42
*** SteveA has quit IRC02:44
*** tiredbones has joined #zope3-dev02:44
*** xenru|clone has joined #zope3-dev03:02
*** tiredbones has quit IRC03:04
*** zbir has quit IRC03:04
*** xenru has quit IRC03:04
*** gnosis has quit IRC03:04
*** vinsci has quit IRC03:04
*** zbir has joined #zope3-dev03:07
*** tiredbones has joined #zope3-dev03:20
*** stub has joined #zope3-dev03:40
projekt01srichter, ayt?03:51
projekt01srichter, is it correct that there is no way to register submenus for the "Add" menu because of how the "Add" menu get registered in the view directive03:55
projekt01Argh, I guess we have to expand the view and page and all other directive and support a submenu registration there.03:55
projekt01This will allow us to register submenus to this new regsitered menu (submenu-parent)03:57
projekt01Right now the menu attribute in the view directive will only register a menu item" but there is no way to register a "menu" in a view directie where we need for submenus03:58
projekt01This means if we use a  menu attribute in a view or page directive we also have to register a menu and not only a menu-item for providing submenue on this menu-item04:03
projekt01srichter, forget about the Boston skin for this release, we have to re-implement menus first. We need nested menus and not menu and menu-item.04:07
projekt01Nested menus means we don't have menu-items anymore. Menu-items will become menus, otherwise we can't build a nested structure.04:09
projekt01Your demo of nested menues works only if you have full control over the registration, but this won't work for register sub-menu for allready defined menus (via view or page directive)04:10
*** whit has joined #zope3-dev04:11
projekt01srichter, drop me a note what you think about this if you read the IRC log04:12
*** projekt01 has quit IRC04:12
*** whit has quit IRC04:25
*** stub has quit IRC04:38
*** stub has joined #zope3-dev04:39
*** sashav has joined #zope3-dev04:45
*** niemeyer has quit IRC04:53
*** xenru has joined #zope3-dev05:51
*** xenru|clone has quit IRC06:08
*** natea has joined #zope3-dev06:12
*** deo has quit IRC06:21
*** natea has quit IRC07:53
*** natea has joined #zope3-dev08:03
*** sashav has joined #zope3-dev08:34
*** dobee has joined #zope3-dev08:51
*** sashav has quit IRC08:51
*** dlk has joined #zope3-dev08:57
*** zagy has joined #zope3-dev09:19
*** povbot has joined #zope3-dev09:51
*** Soulraven has joined #zope3-dev10:00
*** xenru has quit IRC10:24
*** sashav has joined #zope3-dev10:25
*** MJ has quit IRC10:30
*** vlado has joined #zope3-dev11:16
*** MJ has joined #zope3-dev11:22
*** tarek has joined #zope3-dev11:59
Theuniwhen is the feature freeze for zope 3.3?12:04
Theuniis that in march?12:04
Theuniah. it's may12:12
*** anguenot has quit IRC12:16
*** efge has joined #zope3-dev12:16
*** projekt01 has joined #zope3-dev12:24
projekt01srichter, ayt?12:25
*** faassen has joined #zope3-dev13:06
*** mp has joined #zope3-dev13:11
*** mgedmin has joined #zope3-dev13:13
*** tarek_ has joined #zope3-dev13:42
*** tarek has quit IRC13:43
*** mkerrin has joined #zope3-dev13:47
srichterprojekt01: JM just checked in some two-phase rendering code too13:53
*** xenru has joined #zope3-dev13:56
*** philiKON has joined #zope3-dev13:59
*** philiKON is now known as phlKN14:11
*** phlKN is now known as philiKON14:12
*** tarek has joined #zope3-dev14:13
*** stub has quit IRC14:15
*** tarek_ has quit IRC14:28
*** JoaoJoao has joined #zope3-dev14:36
JoaoJoaohello14:36
JoaoJoaoI'm trying to find out how to group all users from a principal source and give them a special role, but I don't know how =(14:44
srichteruse a group14:46
JoaoJoaoI don't know the ZCML to create a group :P14:46
srichteroh, this work only for TTW created users14:47
srichterZCML should only define the most basic users14:47
JoaoJoaosrichter: I want to give all users from my principal source a special role, is there a way to do that?14:48
srichterno not this directly14:50
srichteryou have to use a group14:50
srichteror some subscriber that listens for IPrincpalCreated event14:50
JoaoJoaosrichter: The problem is, the principal source is to authenticate users from a Firebird DB, and the users are alrady there14:54
JoaoJoaos/alrady/already14:54
*** zbir has quit IRC14:54
srichterright14:54
srichterIPrincipalCreated is called every time a user is looked up14:55
srichteryou should really read the zope.app.authentication/README.txt14:55
srichterif you don't get it, read it again until you do14:55
srichterthis might seem harsh, but we cannot take the laerning process from you14:56
srichter(note that I have read the zope.wfmc txt files about 4-5 times before I knew what was going on)14:56
JoaoJoaoI'll read it right now, thanks14:57
JoaoJoaobtw, this Zope3 API Docs thing is great14:57
srichterthanks14:57
srichterbtw, I am always looking for suggestions of improvement14:58
projekt01srichter, I saw JM's commit14:58
projekt01srichter, did you see my notes in the IRC about menu and menu items?14:58
srichteryeah, but I have not studied them carefully yet14:59
projekt01the problem is we can't register sub-menu for the Add menu itself ,because "Add" is only registred menu item but there is no menu weher we can use for registering submenus15:00
projekt01We can take a look at this later15:00
projekt01I guess we have to change the menu implementation for this15:00
srichterdo you have a proposed solution?15:04
projekt01not yet, I just recognized the issue, I think we should get rid of menu items and only use menus15:05
projekt01a menu item whould be a  (sub)menu on another menu15:06
srichterI see15:06
projekt01But we have to think about the dependency15:06
srichterI definitely have to think sbout this carefully15:06
projekt01Yes15:06
srichterbut what you are saying sounds right15:06
projekt01The problem is, if we register a view and use the menu attribute, we only get a menu item, but what we need is a submenu aware menu15:07
srichterhdima: ah, now I see how you tell about the password manager in ZCML15:07
srichterhdima: I was thinking about using something like "<CRYPT>pasword-string"15:08
srichterprojekt01: so is that not a limitation of the view-directives?15:09
projekt01no we don't create a menu if we use the attribute menu in page or view directive.15:10
projekt01we only register a menu item15:10
srichterright15:10
projekt01on menu items we can't register submenus15:10
projekt01only on menus15:10
srichterOh, I see what you are saying15:11
projekt01I guess we can get rid of menu items and use allways menues where are submenu aware15:11
srichterI really think we should stop using the menu specification pattern int he view directives15:11
projekt01Yes, why not15:11
projekt01The definition (ZCML) would be much clearer15:12
srichterright15:12
projekt01Ok, let's think about that after the release15:13
srichterso let's do that for now: If you want to use sub-menus don't use the menu and titel attribute in the view directives15:13
projekt01Yes, ... and register the menu and it's submenu in a own directive15:14
*** stub has joined #zope3-dev15:14
srichterright15:15
projekt01That works, it only will not work with the containerView etc directive where use implicit menu item registration15:15
srichterok15:16
projekt01Ok, I'll move the nested menu part out of the Boston skin tonight, so we can use it as a clean viewlet sample15:16
projekt01with normal menus15:17
srichtergreat!15:17
projekt01Hope to get ready tomorrow ;-)15:17
projekt01dobee, ayt?15:18
hdimasrichter: It's hard to achieve backward compatibility this way: '<CRYPT>password'15:18
srichtertrue15:19
dobeeprojekt01: jep15:19
srichterso "password" could be interpreted as: use the default password manager, which is "Plain Text"15:19
projekt01dobee, can you give me your email address, so I will send you the announcement form Dominik for the sprint15:19
srichterhdima: so "password" could be interpreted as: use the default password manager, which is "Plain Text"15:19
dobeebernd.dorn --at--- fhv.at15:20
srichterhdima: oh, never mind, I guess if you do not specify a password manager, "Plain Text" is used15:20
hdimayes, "Plain Text" is default15:21
srichterok15:21
dobeeprojekt01: seen it?15:21
projekt01Yup, did you get the mail?15:22
*** sashav has quit IRC15:22
hdimasrichter: did you try bin/zpasswd?15:22
*** sashav has joined #zope3-dev15:22
dobeeprojekt01: yes, 'hope i can come15:25
projekt01would be nice to see you again15:26
projekt01srichter, did you see the mail form JM right now?15:27
*** Faelin has left #zope3-dev15:31
*** tarek has quit IRC15:36
*** tarek has joined #zope3-dev15:37
*** MrTopf has joined #zope3-dev15:39
*** ignas has joined #zope3-dev15:43
*** jvts has joined #zope3-dev15:52
*** projekt01 has quit IRC15:53
philiKONsrichter, ayt16:02
philiKON?16:02
*** zbir has joined #zope3-dev16:03
*** SteveA has joined #zope3-dev16:04
*** mgedmin has quit IRC16:08
*** benji has joined #zope3-dev16:13
*** J1m has joined #zope3-dev16:14
*** sashav has quit IRC16:15
*** tarek_ has joined #zope3-dev16:20
srichterphiliKON: yeah16:26
srichterbenji: I might have found a way to make testbrowser work with error pages16:27
faassenhm, what's the status in Zope 3.1 concerning timezones..16:27
srichterluckily the HTMLError contains the full response16:27
faassenI tried to figure out things through the mailing list but I'm not sure where all the different pieces fit.16:27
srichterfaassen: I cannot remember at all16:27
faassensrichter: that's not good. :)16:28
srichterbenji: but HTMLError can also have a URL not found error, in which case there is no response body, so it needs some thinking16:28
srichterfaassen: I remember trying to support timezone parsing in zope.i18n and it worked16:28
faassenthere's an Olson database, there's information in the request, locale, there's input of datetimes, storage in the ZODB, output in the current locale's timezone.16:28
srichterfaassen: also timezones have been fixed to be peristable16:29
faassenI don't care about timezone parsing particularly. I care about storing data as UTC.16:29
faassendates as UTC.16:29
faassenbut outputting them in a particular timezone.16:29
faassenif I need to configure this timezone in the app, that's okay for now.16:29
faassenif it can somehow be deduced from the request, that'd be good too.16:29
srichterI think there is currently a disconnect from the locale to the timesone16:29
faassenhm.16:29
srichterbecause the timezone info in the ICU files sucks16:29
srichterin fact they even discourage using it16:30
faassenyes, I think there was discussion about this stuff in Zope 3.2?16:30
faassenuse Olson database instead or whatnot.16:30
srichterright16:30
faassendoes the request contain enough detail in theory to deduce the timezone of the user at all?16:30
srichteruse pytz instead16:30
srichterso I think that means setting it by hand for now :-(16:30
faassenwell, the pytz included with 3.1 doesn't contain the Olson database, right?16:30
srichterthe code is autogenerated from the Olsen data16:31
srichteryou want to talk to stub for detai;s16:31
*** zagy has quit IRC16:31
srichteryou want to talk to stub for details16:31
*** tarek has quit IRC16:31
faassenhm.16:32
stubpytz is a port of the Olson data into python land16:32
faassenstub: does Zope 3.1 ship with that version?16:32
faassenstub: or at least a useful enough version? :)16:32
stubThe version in 3.1 is pretty recent16:32
faassenstub: hey, you're around, my luck.16:32
faassenstub: okay.. hm, well, so I still don't know where to start. I have input fields, which need to know the timezone the user is in.16:33
faassenstub: can this be reliably extracted from the request?16:33
stubNope16:33
faassenstub: so the application just has to know its timezone(s), right?16:33
faassenstub: either with per-user config, or global config.16:33
stubIt is possible to do it unreliably, but I don't think it is worth the effort16:33
faassenstub: understood.16:33
stubYes - you need to store the timezone16:33
faassenstub: so how does Zope 3 make sure *its* timezones are stored at UTC in the ZODB, do you know?16:34
faassenstub: as I don't recall it actually asking for my timezone.. use server's timezone?16:34
stubProbably. I'm not sure.16:34
srichterstoring dates in UTC is a convention, not an enforced rule16:35
faassenstub: the datetime module + pytz contains enough API and info to convert an entry in some timezone..16:35
srichterso it is up to the application16:35
faassensrichter: yes, I'd like my application to do it, as I need UTC datetimes for other reasons in it anyway.]16:35
faassenstub: is that correct?16:35
* Theuni hmms a bit16:35
stubyes.16:35
faassenstub: to UTC, I was going to finish typing.. :) anyway, hm..16:36
TheuniJ1m:  you there, got some time?16:36
Theunisrichter:  you wanted to know something about the certification?16:36
faassenso, I need to make sure my datetime display and input widgets know what timezone to display in/get input in.16:36
faassenand then convert to and from UTC. I guess I can make some special widgets that do that for now.16:36
philiKONsrichter, sorry, was gone16:37
philiKONnever mind actually, i think i figured it out16:39
srichterTheuni: no, I just wanted to know the status? :-)16:39
srichterfaassen: right16:40
*** tarek has joined #zope3-dev16:40
Theunisrichter:  we're reactivating it again ... i have a really good plan to get it finally done16:40
Theunii'm aiming to get zope 3.3 certified16:40
srichtercool16:40
Theunii'm trying to get sort some stuff out and then my current plan is to start working on November 14 and spent 5 whole weeks of my time doing documentation and some implementation16:41
Theunis/get sort/sort/16:41
srichterphiliKON: there is a nasty bug in static tree that if you manually expend all nodes, the states are not correctly updated.16:44
philiKONups16:44
srichterphiliKON: yeah, it basically sets the expand flag to true, but does not update some other state variable16:45
srichterI think you can fix this in less than an hour; I just did not have enough static tree zen16:45
philiKONi'm really swamped with five work16:45
philiKONit sounds to me like you figured out most of it already16:46
srichterthe bug is around for a long time, so it can be fixed in the bug fixing time :-)16:46
philiKON+116:47
srichter(btw, the static version of the apidoc demonstrates this bug in the menus16:48
*** xenru has quit IRC16:51
*** tarek_ has quit IRC16:53
*** christi has joined #zope3-dev16:55
*** vinsci has joined #zope3-dev16:59
*** christi has left #zope3-dev17:01
*** natea is now known as natea|away17:03
*** bradb has joined #zope3-dev17:05
*** jvts has left #zope3-dev17:14
*** hdima has quit IRC17:21
*** dlk has quit IRC17:22
*** natea|away is now known as natea17:22
*** mgedmin has joined #zope3-dev17:28
*** dobee has quit IRC17:29
*** baldtrol has joined #zope3-dev17:30
baldtrolmorning everyone.  or, morning for me, anyway :)17:32
VladDracgood afternoon17:34
baldtrolquestion (because i *always* have questions)...  how, through the zmi, can i register an unnamed Unique Id utility?  all of my catalog attempts keep failing because, by default, when i add an IntIds utility, it names it IntIds...17:36
baldtroland the catalog getUtility methods just try for zapi.getUtility(IIntIds) ...at the debugger i can get it, by giving it context or a name, but outside of overriding all the catalog methods and explicitly passing in context, i don't know what else to do.17:38
*** anguenot has joined #zope3-dev17:40
philiKONbaldtrol, just don't provide a name of the utility17:49
philiKONwhen you register it17:50
*** tarek has quit IRC17:50
baldtroli tried that...  it still adds one.  but i can try it again, i could be a little brane-dead, it being friday and all.17:51
*** tarek has joined #zope3-dev17:51
baldtrolhmm.  nevermind.  registration manager shows the below, but it still fails. must be something else.  thanks.17:54
baldtrol    * provided:  zope.app.intid.interfaces.IIntIds17:54
baldtrol    * name: <no name>17:54
baldtrol    * component: IntIds17:54
*** tarek has quit IRC18:12
*** tarek has joined #zope3-dev18:12
tiredbonesI'm trying to run benjiyork's Quick Start Guide. I bomb out every time I add the slug in.So I start runzope with pdb to find where I'm getting a directory that dose not exist anymore.As I step thru runzope everthing looks ok. When I get to the "from"statement is when I get mu bogis directory.Isn't the "from" statement using the sys.path built in the previous setp being used?18:17
tiredbonesI'm trying to run benjiyork's Quick Start Guide. I bomb out every time I add the slug in.So I start runzope with pdb to find where I'm getting a directory that dose not exist anymore.As I step thru runzope everthing looks ok. When I get to the "from"statement is when I get mu bogis directory.Isn't the "from" statement using the sys.path built in the previous setp being used in the "from" statement?18:18
benjitiredbones, what is the exact error you're seeing (last 15-20 lines would be good); use http://pastebin.com/ (or similar, don't paste it here)18:19
tiredbonesbenji, I have to take my son to school, will do this when I come back. thanks18:20
benjitiredbones, sure18:20
srichterbenji: did you see my message earlier about the HTTP error thing?18:22
benjinope18:22
srichterah ok18:22
benjiok, I just read it18:23
srichterso I figured out that the response file object is tagged onto the HTTPError18:23
srichterso we would actually have access to the info we need, if we try/except the error18:23
srichterthe question is now, wher eto out the fix18:23
srichterI think the best place would be mechanize browser18:24
srichterand add an option to the Browser class, whether the error should be caught or not18:24
srichterbenji: thoughts?18:27
*** MJ has quit IRC18:29
benjisrichter, I'm not quite sure what you're saying there18:32
benjiis the exception captured in the response?18:32
srichterok, so let's say a URL throws 40418:33
srichterurllib2 will raise an HTTPError18:34
srichterhowever, we want to be able to get the contents of the error page18:34
benjiright18:34
srichterI am saying that the HTTPError has the contents18:34
srichtererror.info18:34
JoaoJoaoI'm trying to assign a role do a user in IPrincipalCreated18:37
JoaoJoao(s/do a/to a) and I have a ConflictError, not sure what it means18:38
benjisrichter, HTTPError has the html from the error page?18:38
benjii'm confused18:38
srichteryes18:39
srichterso if we catch the error somewhere we can get all the data we want18:39
benjiand the html has the traceback in it?18:40
srichterwhat traceback?18:41
benjiwho's on first?18:41
srichterhuh?18:41
benjiok, I'm *really* not understanding what's going on18:41
bob2traceback's on second?18:41
benjiwhat's pitching18:41
srichterok, let's rewind18:42
benjisrichter, sorry, 50 year old American cultural reference :)18:42
srichterwe have developed a page that will be displayed when the URL was not found18:42
srichterthis page gives the user a nice message saying that the URL does not exist18:42
srichterit sets the return status to 40418:43
benjiok18:43
srichteror "404 Not Found" to be precise18:43
benjirith18:43
benjiright18:43
* benji ignores what Jim is about to say18:43
srichternow, we want to test this page using testbrowser18:43
benjiok18:44
srichterbrowser = Browser()18:44
srichterbrowser.open('http://localhost/unknown')18:44
J1msrichter, have you never hear:18:44
J1mhttp://www.baseball-almanac.com/humor4.shtml18:44
J1m?18:44
srichterJ1m: no18:44
J1meek18:44
srichterbut the open call will not return18:44
srichter(I HATE BASEBALL!)18:45
J1mIt's one of the funniest skits of all time.18:45
srichterI'll read through it18:45
srichterthe open() call will raise an error18:45
srichterurllib2.HTTPError specifically18:45
baldtrolJ1m: yes it is :D18:45
srichterthis really sucks for us, because it is not the behavior a browser would have18:46
srichterso, I believe the call should just work18:46
*** andres has joined #zope3-dev18:47
*** suse-joe has joined #zope3-dev18:47
srichterthe question is now where to catch the HTTPError and handle everything correctly18:48
*** tarek_ has joined #zope3-dev18:50
srichterJ1m: btw, I think we should move the release schedule to a January/July rotation18:50
srichterJ1m: Europe is just dead during the last week of December18:50
*** tarek_ has joined #zope3-dev18:50
J1msrichter, we shouldn't be making the release the last week of december.18:52
J1mWe should be making the release before the holidays so we can enjoy them.18:52
srichterI think it needs to be at the latest December 20th18:52
J1msounds good to me.18:52
J1mWe should aim for Dec 1.18:53
J1mand let it slip no later than Dec 1.18:53
srichterwhat? :-)18:54
srichterbenji: are you still there?18:54
benjiyep18:54
J1mand let it slip no later than Dec 20.18:55
srichterok18:56
benjisrichter, so you're saying that when you get a 404, mechanize will always raise an exception instead of letting you choose to see the page contents instead18:56
benji?18:56
srichteryes18:56
benjiI'd propose a change on the mechanize list (or we can catch the exception and set browser.contents ourselves)18:56
JoaoJoaoI did the assignRoleToPrincipal on the IPrincipalCreated event and I have a ConflictError: http://pastebin.com/40903218:56
srichterbenji: by ourselves you mean in testbrowser?18:57
srichterthat would be possible, but not desirable18:57
srichterbecause you also want to access links, etc18:57
* srichter really wishes mechanize would have unit tests18:58
*** tarek has quit IRC19:00
benjisrichter, right, I think the best choice would be to add a flag to mechanize to not raise exceptions on non-200 status codes19:04
srichteryep19:05
srichterI guess I can add this to our code base and we can send a diff19:05
srichterI have several other changes I am about to check in19:05
*** strichter has joined #zope3-dev19:14
*** srichter has quit IRC19:15
*** strichter is now known as srichter19:16
*** ChanServ sets mode: +o srichter19:16
suse-joeHi! Is there an easy way of defining container constraints like "should contain at least one, but no more than five subobjects"?19:23
srichterno, not by default19:32
*** MrTopf has quit IRC19:32
srichterbut you can write your own costraints19:32
srichtersimilar to the container constraints19:32
*** philiKON has quit IRC19:32
*** xenru has joined #zope3-dev19:33
*** natea is now known as natea|away19:39
suse-joesrichter: Ok. That's what I was about to try.19:39
*** jinty has joined #zope3-dev19:47
tiredbonesbenji, ayt/19:51
*** suse-joe has left #zope3-dev20:04
*** efge has quit IRC20:06
*** alga has joined #zope3-dev20:08
*** dobee has joined #zope3-dev20:13
*** jinty has quit IRC20:13
*** dobee has quit IRC20:14
*** vlado has quit IRC20:23
*** regebro has joined #zope3-dev20:23
*** MJ has joined #zope3-dev20:26
*** alga has quit IRC20:30
*** dobee has joined #zope3-dev20:31
JoaoJoaoanyone here with experience on IPrincipalRoleManager, IPrincipalCreated and that stuff?20:34
*** SteveA has quit IRC20:35
*** faassen has quit IRC20:35
*** deo has joined #zope3-dev20:39
*** andres has quit IRC20:46
benjitiredbones, IAH :)20:59
JoaoJoaoConflictError on assignRoleToPrincipal21:00
*** mkerrin has quit IRC21:07
*** SteveA has joined #zope3-dev21:22
*** stub has quit IRC21:30
*** regebro has quit IRC21:32
tiredbonesbenji, I'm going to send the trceback now.21:33
benjiok21:33
*** anguenot has quit IRC21:34
tiredbonesbenji, did it come across ok?21:35
benjiwhere?21:36
tiredbonesbenji, http://pastebin.com21:37
benjiwhat's the rest of the URL?  There should be some numbers on the end.21:37
benjiah, I found it21:38
benjitiredbones, it's http://pastebin.com/409185 right?21:38
tiredbonesbenji, yes21:38
benjiok, tiredbones, the first problem is that you're using the quick start with 3.1, it requires a checkout of what will become 3.2 (the instructions at the begining of the quick start tell you how to check it out)21:39
*** q[monty] has joined #zope3-dev21:41
JoaoJoaohow do I use an IPrincipalCreated event subscriber to assign roles to principals? I tried this, with no success: http://pastebin.com/40919021:41
*** tarek_ has quit IRC21:42
benjisrichter, AYT?21:43
*** tarek_ has joined #zope3-dev21:43
tiredbonesbenji, What told you, in the traceback, that I have the wrong version of Zope?21:43
q[monty]I've got a page defined "for" an interface. When I access that page in the context of an object that implements that interface, why can I not access methods of the instance object from the context variable in ZPT?21:43
benjitiredbones, because you said "the path /home/wayne/Desktop/Zope-3.1.0c1 no longer exist"21:44
q[monty]I got it to work by giving the page a 'class' and accessing it through the view var... but that seems wrong to me in this case.21:44
benjiq[monty], by "not access" do you mean you get some sort of exception, "Forbidden" perhaps?21:44
mgedminq[monty], do you have adequate security declarations?21:44
q[monty]let me see what the error was...21:45
q[monty]I got a TraversalError21:45
tiredbonesbenji, Thanks, I'll try updating to 3.2.21:46
benjiNP, tiredbones21:46
JoaoJoaobenji: What's new on the soon-to-be 3.2?21:47
mgedminq[monty], ForbiddenAttributeError is a subclass of AttributeError21:48
mgedminI think the default TALES path traverser converts all AttributeErrors to TraversalErrors21:49
mgedminso if you do not have security declarations for your content objects, you are likely to get TraversalErrors21:49
benjiJoaoJoao, lots, I can't remember it all21:49
JoaoJoaoI'll stick to 3.1 for now, I'm fighting with PAU, it's beating me up21:50
q[monty]mgedmin, Aha! That's not very intutive... thanks! We do security declarations in zcml now, right?21:50
mgedminyes21:51
mgedmin<content class="..."> <require permission="zope.ManageContent" interface="..." /> ... </content>21:52
mgedmin(off the top of my head)21:52
mgedmin<allow ... /> is a synonim for <require permission="zope.Public" ... />21:52
mgedmin<require> takes one or more of interface="..." attributes="foo bar baz ..." set_attributes="foo bar baz ..." set_schema="..."21:52
mgedminhth21:52
q[monty]mgedmin, yes... very much. Thank you.21:53
q[monty]mgedmin, SWEET! It works as expected now.21:56
*** Aiste has joined #zope3-dev21:59
tiredbonesbenji, I'm doing the svn thing, but I still have Q.. Why did those path that I deleted show up?22:02
tiredbonesbenji, I'm doing the svn thing, but I still have Q.. Why did those path that I deleted show up in the starting of runzope?22:03
benjitiredbones, I didn't look deeply enough to know; did you make an instance in one place and then move it?22:03
tiredbonesbenji, by "instance" do you mean, did I run mkzopeinstance? I did but I deleted everthing of the old system.22:05
benjiwhat does "deleted everthing of the old system" mean, specifically?22:06
tiredbonesI deleted all directories and change my PYTHONPATH variable to point to the new install.22:07
benjiwhat does "deleted all directories" mean, specifically?  :/22:08
tiredbonesbenji, My sys.path pointed to all the new istalled system.22:09
benjiyou made PYTHONPATH point to the instance or to the installed zope 3?22:09
tiredbonesbenji, Yes,I made it point to zope3.  I had is point to /usr/local/Zope-3.1.0c1.22:10
tiredbonesbenji, I did not have it point to the instance.22:11
benjiok, we're not communicating well. :)  Start from scratch, following the instructions in the quick start and you should be OK.22:11
tiredbonesbenji, I'm doing that now, but I'm wondering why the old still picked up my first install of Zope after I changed and deleted my first install of Zope 3.22:14
tiredboness/still/installes/22:14
tiredbonesI'll let it go for now, benji. thanks for your help.22:16
benjiNP, tiredbones, good luck22:17
tiredbonesI'm going to need alot of luck.22:18
*** tiredbones has left #zope3-dev22:25
*** tiredbones has joined #zope3-dev22:31
*** natea|away has quit IRC22:32
*** tiredbones has quit IRC22:34
*** ignas has quit IRC22:44
*** tarek_ has quit IRC22:45
*** tarek_ has joined #zope3-dev22:47
*** baldtrol has left #zope3-dev22:59
q[monty]is there a new Zope3 way to get context/absolute_url - or a different way I should do that same thing?23:01
*** Aiste has quit IRC23:02
srichterno, this is the way23:03
q[monty]It would probably help if my object that was context actually inherited from something, wouldn't it.23:03
mgedmincontext/@@absolute_url23:03
mgedminI do not think it will work without the @@23:04
*** mgedmin has quit IRC23:06
q[monty]it helps if I write my tal:attributes statement right. :)23:08
*** efge has joined #zope3-dev23:09
q[monty]now I'm getting TraversalError - do I need to grant permission to something new to be allowed to call absolute_url?23:09
srichterwhat does the traceback say?23:10
q[monty]TraversalError: (<zpress.ZPress.ZPress instance at 0x4112db6c>, 'absolute_url')23:10
q[monty]I can past more of it if you want...23:11
srichtertry context/@@absolute_url then23:11
JoaoJoaosrichter: I got the IPrincipalCreate thing23:14
q[monty]that worked... what's the difference23:14
q[monty]?23:14
srichteryou specifically request the view absolute)url23:14
srichterit seems that the TALES namespace does not automatically do that23:15
srichterJoaoJoao: great23:15
q[monty]srichter, so I could, for sake of arguement, declare absolute_url as a view for my class in zcml and then not use the @@, right?23:17
*** alienoid has joined #zope3-dev23:17
srichterno23:18
JoaoJoaosrichter: However, I tried to use IPrincipalROleManager to assign roles to the user, but it's not working, I'm not sure if I'm doing it right23:19
srichterJoaoJoao: the SchoolTool project uses all those APIs all the time, so you might want to look there23:20
JoaoJoaogood to know, thanks23:20
*** deo has quit IRC23:32
*** deo has joined #zope3-dev23:32
*** JoaoJoao has quit IRC23:40

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