IRC log of #zope3-dev for Monday, 2005-01-24

*** sashav_ has joined #zope3-dev00:23
*** sashav has quit IRC00:40
*** RaFromBRC has joined #zope3-dev01:19
*** J1m has quit IRC01:46
*** stub has joined #zope3-dev01:57
*** RaFromBRC has quit IRC02:23
*** deo has quit IRC05:20
*** tav_ is now known as tav05:28
*** stub has quit IRC05:56
*** stub has joined #zope3-dev06:03
*** stub has quit IRC06:21
*** stub has joined #zope3-dev06:24
*** bskahan has joined #zope3-dev07:17
*** zagy has joined #zope3-dev08:05
*** d2m has joined #zope3-dev08:26
*** tvon has quit IRC08:28
*** sashav_ has quit IRC08:55
*** Theuni has joined #zope3-dev09:14
*** zagy has quit IRC09:32
*** zagy has joined #zope3-dev09:32
*** zagy has joined #zope3-dev09:33
*** Theuni has quit IRC09:37
*** bskahan has quit IRC10:00
*** Theuni has joined #zope3-dev10:06
*** bskahan has joined #zope3-dev10:27
*** sashav has joined #zope3-dev10:43
* VladDrac 's thinking of writing a weblog product (need one myself if I want to move my homepage to zope3)10:45
VladDracI guess it would mainly be a simple content type with an RSS service (low prio) and a discussion service on top (like portal_discussion in cmf/plone)10:46
VladDrachas anyone ever given these services any thought?10:46
bskahanVladDrac: yes11:02
*** MalcolmC has joined #zope3-dev11:06
VladDracbskahan shoot :)11:08
bskahancontainer weblog object and view, individual entry objects, containers for drafts and attachments11:12
bskahanrss views a cheap and easy after the regular view is done11:13
VladDracok, but that sounds like something really standalone11:13
VladDracwhich is the easy way probably :)11:14
bskahanthen there's the 'nice' blog features, xmlrpc, trackback, etc11:14
* VladDrac was thinking of using annotatable to add discussions to any type of object (that provides IAnnotatable)11:14
VladDracbskahan: is this something you've build or just thought of?11:14
bskahanits on my short list of todos11:15
bskahanbasically rewriting a plone based blog system for zope311:15 is the plone product11:17
bskahanhave you started working on it?11:30
VladDraca bit11:31
bskahanthinking about a wordpress/mt system replacement?11:32
bskahaneg., multiple seperate blogs11:32
bskahanin a standalone 'blogs only' sort of thing, or part of a bigger CMS?11:33
VladDracwordpress mt?11:33
bskahanwordpress, moveable type11:34
VladDracanyway, I'm thinking of a standalone system that should integrate with everything that zope3 offers/will offer (workflow, cataloging)11:34
VladDracand which should offer new, additional services (i.e. syndication, discussion service)11:34
bskahanmost of the 'weblog' pieces can be applied pretty generally to other types of content11:39
VladDracin plone you basically have a blog if you enable discussion on a newsitem11:39
bskahanit would be good to be able to reuse the syndication, discussion, trackback, etc later11:40
* bskahan nods11:40
bskahanyou don't get archive views, xmlrpc, categories, etc with new items though11:41
bskahancomparison of different weblog systems11:41
VladDracI'll look at that11:48
VladDracthough I think most functionality is highly overrated (and I won't focus on them for a 0.1 release)11:48
VladDracwhat I want (and what most people need) is just a way to publish articles and allow discussion on them11:48
VladDracas long as you're no GvR, people will not read your feeds anyway :)11:49
*** bskahan has quit IRC12:17
*** Voblia_ has joined #zope3-dev12:31
*** Voblia_ is now known as Voblia12:46
*** mgedmin has joined #zope3-dev13:10
*** stub has quit IRC13:29
*** Aiste has joined #zope3-dev13:31
*** stub has joined #zope3-dev13:32
*** gintas has joined #zope3-dev13:56
*** d2m has quit IRC14:47
*** niemeyer has joined #zope3-dev14:48
*** AJC has quit IRC15:09
*** hpeter has joined #zope3-dev15:19
*** dlk has joined #zope3-dev15:29
srichterVladDrac: Please do not write any services; they are deprecated as of 3.1 and are discouraged in 3.015:31
srichterVladDrac: I am not sure that you need to hide discussions in annotations, but this is a design decision15:31
srichterVladDrac: See the message board and/or the bugtracker for examples on discussions15:32
srichterVladDrac: there is no need for a discussion service/utility15:33
srichterwhat would this utility do?15:34
srichterif you want to store discussions on any objects, than you do it with adapters15:34
VladDracdamn, deprecation already :)15:38
VladDracanyway, I'm not familiar with the right approach/terminology yet15:38
VladDracwhat I basically want is something like CMF's portal_discussion, that's all15:38
VladDraci.e. enable discussion on any type of object (or at least most), and (preferably) assigning a 'discussion engine' (so you're not stuck with some lame default implementation)15:39
*** mgedmin has quit IRC15:42
srichterso use adapters15:43
srichterif you automatically want to add discussions on objects, then look at the content workflow manager utility15:44
srichterit allows you to make mappings of which workflow is automatically added to which content type15:45
VladDracok, cool15:45
*** stub has left #zope3-dev15:57
gintasI have a small problem with IntWidget: it won't show a zero16:04
gintasperhaps it shouldn't, I don't know16:04
gintasin particular, this looks suspicious: renderElement(..., value=self._getFormValue() or '', ...)16:05
gintasthat's from TextWidget.__call__16:05
srichterno, it should definitely show 016:06
gintasok, then perhaps it's a bug16:06
srichtermaybe 0 is interpreted as the NULL value and thus not returned from _getFormValue()16:06
srichterI think so16:06
gintas_getFormValue does return a zero16:07
gintasbut the 'or' of course treats it as False16:07
srichteroh, I would just remove that then16:08
gintasmaybe this should be: value=self._getFormValue(); if value==self._missing: value = ''16:09
gintasshould I fix this on the trunk?16:09
srichterand on the 3.0 branch as well16:09
SteveAi really dislike seeing code that says  value=foo or bar16:12
SteveAzope3 can do without more mysterious code16:12
srichterJim loves this syntax16:12
srichterhe uses it all over the place16:13
SteveAit is not a good thing16:13
SteveAit makes the code less accessible to people who are python experts16:13
SteveAthe nature of false-ness in python is a bit obscure16:13
SteveAcode should be written so that it is explicit about what it expects to exchange for "bar" or " '' "16:14
*** J1m has joined #zope3-dev16:23
*** SteveA has quit IRC16:30
*** vlado has joined #zope3-dev16:34
*** SteveA has joined #zope3-dev16:34
*** dlk has quit IRC16:37
gintasargh, I broke the tests by accident! sorry, will fix them in a jiffy16:38
VladDrachmmm naming your product 'xyz' and then creating xyz/ and xyz/browser/ doesn't really work :)16:51
J1mright.  It's due to a Python import flaw.16:51
J1mThat's why the buddydemo package isn't named buddy.16:52
J1mThis should be a faq16:52
VladDracyeah, and an addendum to the entry should be "don't forget to remove the .pyc as well" :)16:52
VladDracalso, this is somewhat confusing in srichters messageboard example16:52
VladDracit works because the packagename is book.messageboard16:53
J1mThat's an advantage of subpackages. :)16:53
VladDracok, so now we always make our zope3 packages subpackages? :)16:53
J1mexactly. :)16:53
* VladDrac renames his product to zyx.xyz16:54
srichterit is the reason I created the sub-package :-)16:56
*** d2m has joined #zope3-dev17:05
*** sashav has quit IRC17:10
*** mooded has joined #zope3-dev17:16
*** mkerrin has joined #zope3-dev17:16
Damascenecuriously enough, what skins should be working?  i svned recently and... my old site with a skin layer of 'fc' broke.  i.e.  it can't find it "componentlookuperror".  it was from one revision of the SVN checkout vs one last week.17:18
Damascenebut... if i use say ++skin++wiki, it doesn't display a component lookup error, but... it will give me a blank HTML page. (in terms of content).17:18
srichterDamascene: Rotterdam and ZopeTop work with a current SVN Checkout17:26
*** tvon has joined #zope3-dev17:27
SteveAusing a skin by using a magic url segment like ++skin++no-such-skin should not cause a ComponentLookupError in the browser17:38
SteveAa 404 would be more appropriate.  or, maybe, using the default skin, and logging an error17:39
SteveAbut, i don't like seeingn ++skin++ in urls at all.  i prefer to configure a particular http server to use a particular skin -- so a particular skin is availalbe on a particular port17:39
SteveAit would be interesting to have a zcml directive that set a particular skin for a particular sub-tree of URLs17:40
SteveAso, underneath /mywiki/ use the wiki skin by default17:40
SteveAmix all these together, and you can have a server that is used by admins on port 8080, always zope3 ZMI skin, and by applications on port 8090, never ZMI skin, for example17:41
Damascenesrichter:  yeah Rotterdam and ZopeTop work for me too.  Did the way skins are defined change?  remember, it worked fine with my "fc" skin, and then i updated my svn, and blam, componentlookup error.17:48
*** regebro has joined #zope3-dev17:49
regebroHowdy! Is there a way I can set things up so that an object factory gets the current object as a parameter, so to speak?17:50
regebroThat is, I somehow want the factory to know which object container I'm creating it in.17:50
J1mNot currently17:51
regebroOK, I need to create the object in a view-method then. No problems.17:51
regebroWell, a little bit of a problem. Ah well. I'll ponder this for a while. Thanks. ;)17:53
*** mooded has quit IRC17:53
Damasceneokay.  i guess i lucked out before.  before i didn't need to define the include package, but now i do.17:56
Damascenei mean i didn't need to do <package include="" /> but now i do.17:56
*** bskahan has joined #zope3-dev17:58
*** bskahan has quit IRC17:58
*** bskahan has joined #zope3-dev17:58
*** weeti has joined #zope3-dev17:58
weetiHmmh, this might be too newbie-question but if I like IContainer/IContained but have data in relational database. is it possible to use that data like it could be used via persisted? the format of data is just like dumps of objects' attributes. Am I misunderstanding something? I think that plain zodb can't do it when I have let's say messageboard with 200k messages?18:01
J1mYou should be able to implement IContainer using an RDBMS.18:03
SteveAthis is the approach sqlos takes18:03
srichterweeti: I think ZODB can handle it18:03
J1mI certainly think ZODB can handle 200k messages, however whether ZODB or RDBMS can handle large amounts of data is based more on your design.18:04
J1mPerhaps you're more used to designing for rdbms.18:04
srichterweeti: you might also want to look at sqlos, if you really want RDBMS-based applications18:04
weetihave to check sqlos then.18:05
weetiJ1m, in fact my design should apply for zodb too (the data is stored like a tree).18:07
weetiso I don't have too many toplevel 'objects'. but the trees tend to be very deep18:07
J1mGnerally, I would expect an oodb to do better than an rdbms for trees.18:08
weetibut using sql I'm writing pretty copmlex queries that doesn't care about 'tree'-nature but do data gathering based on the 'row'-nature of data.18:08
J1mThere are people, however, who manage to implement trees using queries (as if they we using an rdbms), which defeats the advantage.18:08
weetiJ1m, for pure trees there is (at least in postgres) couple of nice datatypes.18:09
srichterweeti: like for RDBMSs, there are ways in ZODB to do queries18:09
VladDracIContained and ContainerTypesConstraint are used to define to which containertypes a type is addable, right?18:10
VladDraci.e. if Foo can contain Bar, Bar implements a IContained with constrained Foo?18:11
srichterIContained has nothing to do with constraints18:11
srichterit simply states that a component can be contained by a container18:11
srichteryou might want to look at
srichterthere are some nicer API calls now for specifying constraints; I think PAU uses those (for an example)18:12
weetisrichter: thanks. I have to read more about these things, maybe I'll be smarter later :)18:13
VladDracsrichter ok18:15
VladDracsrichter however if my class implements IContained, I suddenly get attribute errors on object.__parent__18:15
VladDrac(I assume the object doesn't have a parent upon creation)18:15
srichterwhen do you get this error?18:16
VladDracwhen adding this specific type (that implementes IContained)18:16
srichteralso, did you mean to say: "if my class **does not** implement IContained"?18:16
VladDracno, if it *does* implement, I get __parent__ errors, if it *does not* implement, everything is fine (so I'm not sure what I gain with IContained)18:17
srichterIContained says that the object must have a __parent__ and __name__ Attribute18:18
srichterif an object does not implement IContained a containment wrapper will be placed around it18:19
srichterthe easiest way to fix the problem is to have your content component extend Location18:19
VladDrachmm ok but why would I use IContained at all? (Your messageboard example uses it)18:25
srichterso the object has a location18:26
srichterthis way you do not need a location wrapper18:26
srichterwhich will not work, if you want to get the parent from within your conten component18:27
*** vlado has quit IRC18:34
*** hpeter has left #zope3-dev18:39
*** [nicknam] has joined #zope3-dev18:53
*** [nicknam] is now known as apoirier18:54
*** agenteo has joined #zope3-dev19:04
*** paolo has joined #zope3-dev19:14
*** alga has joined #zope3-dev19:16
*** mgedmin has joined #zope3-dev19:16
*** tvon has quit IRC19:18
*** tvon has joined #zope3-dev19:19
*** Suresh-E has left #zope3-dev19:28
*** senra has joined #zope3-dev19:33
*** paolo has quit IRC19:40
*** MalcolmC has quit IRC19:43
*** hpeter_ has joined #zope3-dev19:49
*** __gotcha__ has joined #zope3-dev19:59
*** __gotcha has quit IRC20:03
*** deo has joined #zope3-dev20:05
*** sashav has joined #zope3-dev20:05
J1msrichter, ayt?20:06
J1mdid you provide any backward compatibility code for the switch from pas to pau?20:06
srichterno, because PAS was not released20:07
J1mOK, I guess you got away with it. ;)20:07
*** gintas has quit IRC20:14
regebroHmm. I got this error: "can't compare offset-naive and offset-aware datetimes"20:15
regebroTurns out Zope3 has some tz thingy going on. Where do I find the code for this, I'd like to use it consistently.20:15
srichterZope 3 has no tz implementation yet20:16
srichterbut we really, really need one, so that our locale support can be correct20:16
tvonWill there be any security/bugfix releases on 3.0 before 3.1?20:16
tvonand, 3.1 development is in trunk,, correct?20:16
* mgedmin would really love it if zope 3 came with something like pytz.sf.net20:17
J1mZope 3 has a minimal time zone implementation.20:18
run|workwhat about shipping z3 with sqlite?20:18
regebrobut if Zope3 has no tz implementation, how come the datetimes created by zope3 has a tz? ;)20:20
regebroAh, thanks J1m, I'll check it out.20:20
srichtermgedmin: yes, it should20:21
*** hazmat has joined #zope3-dev20:21
srichterbut we need a wrapper that knows how to use that package in the datetime parser and formatter of zope.i18n.locales20:22
srichtermgedmin: does pytz use the Olsen data?20:23
srichterok, it does, nevermind20:23
J1mSomeone should ask the author to integrate it w z3. He is a contributor.20:24
srichterJ1m: you mean import it to the repository?20:25
J1myes, and do whatever is useful to use it in z320:26
regebroOh, yuck. The current implementation looks like the Z2 DateTime! *shudder*20:26
*** apoirier has quit IRC20:27
*** bskahan has quit IRC20:30
mgedminare we finished with the meeting?20:31
mgedminoops, wrong channel20:31
mgedmin(at least it wasn't a password this time)20:32
regebroGustavo Niemeyers dateutil module has a nice date parser, btw.20:36
regebroIt can parse almost anything, taking care of the order of month and stuff, and you can tell it to assume that months comes first or days comes first, or year comes first.20:37
J1mregebro, that is a port of the dt parsing code from z2, yes.20:37
J1mI'm happy to see something else20:37
J1mThe tz implementation is new and interesting20:37
J1mreminder: that only zc employees can check in 3rd-party code20:38
srichterregebro: guessing the order of months and days is no good20:38
srichterit is widely considered a bad thing in I18n20:38
srichterthus all the locales in Zope 3 come with date-time formatter strings20:38
regebroIt doens't matter, you have to guess, since people will write bit dmy and mdy.20:39
regebroSo you have to be able to somehow tell it what that probably means.20:39
srichterbtw, you can use the locale data and the zope.i18n.locales parser to do such high-level functionality20:39
regebroThere are many ways to do this "guessing" but it is basically still guessing.20:40
weetijust a though. now we're setting def __setitem__()... __setitem__.precondition = ..   could there be alternative to use function decorators to do that?20:40
J1mI had a funny experience related to this.20:40
srichterregebro: well, with the locale data you can control the guessing20:41
J1mweeti: there is already a much simpler syntax.20:41
weetiJ1m, huh?20:41
srichterfor example, you can say: try to match the date to the following locale formats: en_US, en_GB, fr, de_DE, ...20:41
weetiJ1m, ahh, the container(), contained()?20:41
J1mclass IMyContaier:20:42
regebroyup. srichter: It would be nice if you can override the guessing by typing a fully qualitied date too. But that should preferabbly be configurable too.20:42
J1m    contains(IMystuff)20:42
J1mclass IMystuffContained):20:42
J1m    containers(IMyContainer)20:42
srichterregebro: right, but note that the locales data supports all this; it has translations for month and weekday names in many languages20:42
J1msee the tutorial20:43
srichterregebro: the locale data even gives you three choices of coomonly used date/time formats for each locale20:43
regebrogood. Also, would the parser typically handel if you write 2004-12-30, even if the locale format says you should use d.m.y?20:43
srichterthe parser works based on patterns20:44
srichterif the pattern is not matched, it raises an error20:44
srichterso basically, a high-level guessing method would try a set of patterns on a given input string20:45
regebroThat's not how I would do it, but it works well enough. ;-)20:45
srichterbut it is much saner this way20:47
regebroOh, and btw J1m, I'm not going to check in any third party code. ;) But Gustavo Niemaiers code is here:
srichterand you actually know in what locale the date was provided20:47
regebroHm, yeah, that could be a good point, of course.20:48
J1mIsn't Gustavo a Zope Contributor?20:48
srichterhowever, for any high-level UI you should not have this, but provide UI components asking for the bits in a date separately20:48
srichterJ1m: yes, he is20:49
regebroHe may very well, be. In that case he could probably check it in himself, if asked.20:49
J1mIt would be better if he checked in his own code.20:49
regebrosrichter: I agree. Which brings us into the topic if anybody has made any date-widgets for Zope3?20:50
srichterregebro: there is only a very basic one, which sucks20:50
srichterI would definitely welcome a bbetter onbe20:50
regebroYeah. I saw a note that somebody in Zope corp has made stuff with that javascript thingy everybody uses. But it's not publicly available yet.20:51
*** bskahan has joined #zope3-dev20:54
srichterwell, you can probably easily do it yourself20:55
srichterit should not be too hard20:55
srichteror ask Gary Poster for it20:55
regebronah, but then I need to learn how to do widgets, and I'm already like a month behind on this project.20:56
*** mkerrin has quit IRC21:02
*** sashav has quit IRC21:11
*** gintas has joined #zope3-dev21:12
*** regebro has quit IRC21:14
*** Voblia has quit IRC21:32
*** srichter has quit IRC21:47
*** bradb has quit IRC21:49
*** tvon has quit IRC21:51
*** tvon has joined #zope3-dev21:51
*** hpeter__ has joined #zope3-dev21:55
*** hazmat has quit IRC22:02
*** hazmat has joined #zope3-dev22:03
*** senra has quit IRC22:06
*** bradb has joined #zope3-dev22:08
*** zagy has quit IRC22:11
*** bradb has quit IRC22:12
*** hpeter_ has quit IRC22:13
*** tvon has quit IRC22:20
*** mgedmin has quit IRC22:21
*** jhauser has joined #zope3-dev22:21
*** bradb has joined #zope3-dev22:31
*** sashav has joined #zope3-dev22:37
*** niemeyer has quit IRC22:37
*** bskahan has quit IRC22:39
*** alga has quit IRC22:56
*** bradb has quit IRC22:57
*** bradb has joined #zope3-dev22:59
*** hpeter has joined #zope3-dev23:05
*** bradb has quit IRC23:14
*** hpeter__ has quit IRC23:20
*** bradb has joined #zope3-dev23:23
*** gintas has quit IRC23:53
*** hpeter has quit IRC23:55

Generated by 2.15.1 by Marius Gedminas - find it at!