[12:00] I missed that you'd registered it for="IBugEditForm" earlier, rather than for="IBug" [12:00] SteveA: i mean, if an adapter were required from IBug to IBugEditForm, when i reg +edit with schema="...IBugEditForm", it didn't tell me i was missing an adapter from IBug, to IBugEditForm. [12:01] SteveA: yeah, i mentioned that on-channel [12:02] if you register it for="IBugEditForm" then no adapter is required [12:02] it just won't work [12:02] because you don't have an IBugEditForm, you have an IBug [12:02] therefore, there is no +edit view [12:02] SteveA: without the for="" though, it gave the error [12:02] (this would work differently in PEAK, btw) [12:02] yes [12:03] without the for=... it has no idea that you want this to be a view on an IBug [12:03] oh yeah...ugh, that was dumb [12:04] (in PEAK, adapters are used automatically and transitively) [12:04] decorates() is in lib/canonical/lp/__init__.py [12:05] ah, didn't know it was a launchpad thing [12:05] yeah [12:05] although it might end up in zope3 [12:06] I think jim liked it [12:06] and it would be easy to add a touch of C to make it really really fast [12:06] saves on boilerplate code when writing a certain kind of adapter [12:06] but keeps it explicit [12:07] sounds interesting. [12:08] so, basically, you can say [12:08] class BugFormAdapterDeadChicken: [12:08] implements(IBugEditForm) [12:08] decorates(IBug) [12:09] def method_unique_to_IBugEditForm(self, whatever): [12:09] whatever [12:09] can't remember if you need an __init__ method or not [12:10] yeah, you do need one [12:10] explicit being better than implicit [12:10] see the docstring / doctest for it [12:10] ok [12:10] class RosettaProject: [12:10] implements(IRosettaProject) [12:10] decorates(IProject) [12:10] def __init__(self, context): [12:10] self.context = context [12:10] def methodFromRosettaProject(self): [12:10] i'm just about wrapping up today, but i'll pick this up in spain [12:10] return self.context.methodFromIProject() [12:10] [12:10] like that [12:11] ok cool [12:11] it is a dead chicken. [12:11] but, it should make things work [12:11] well -- maybe a zombie chicken [12:11] yeah :) [12:13] thanks for your help. it's all clear now. [12:16] SteveA: so basically decorates just registers an adapter, from the thing being decorated, to the iface that the decorator implements, right? [12:20] Merge to rocketfuel@canonical.com/launchpad--devel--0: add subscription activity logging and fix a traversal bug (patch-941) [12:22] no [12:22] you still need zcml to register an adapter [12:22] decorates() fills in the boilerplate of making a decorating adapter [12:23] one where the majority of methods and attributes would just forward to the thing that is being adapted [12:23] so, in the example above, I could write it out without using decorates(IProject) === elmo is now known as elmo_away [12:23] but for every method in IProject that I didn't want to do something special for, I'd have to write [12:23] def foo(self, bar): [12:24] return self.context.foo(bar) [12:24] and similar shenanigans for properties and attributes [12:24] it would look like shit, and be unclear exactly what has been added or overridden [12:25] you'd still need to register RosettaProject (in the example above) as an adapter [12:25] in your case, of course, it would be as an adapter from IBug to IBugEditForm [12:26] hm [12:26] it's slightly weird, in a way [12:27] which part? === elmo [~james@83.216.141.215] has joined #launchpad [12:27] because one would think that if I adapt to IFoo, I can only speak to the adapted thing as an IFoo. [12:27] well, if IFoo extends IProtoFoo, then you can speak to it as an IProtoFoo too [12:27] because if it is an IFoo it must also be an IProtoFoo [12:28] an IBugEditForm is an IBug [12:28] an IRosettaProject (r.i.p.) is an IProject [12:28] SteveA: yes, but if IFoo extends it, then that makes sense that speaking IFoo, inherently (no pun intended) means speaking the base interface too [12:29] are you talking about how the +edit view is connected to the IBug interface? [12:29] if not, I'm confused about what point you are making [12:29] SteveA: I'm talking about the unfortunate necessity (or maybe not) of decorates as a solution. [12:30] as a solution to to what exactly? the editform problem? or to making a decorating adapter? [12:30] I should be able to adapt something to another interface without having to write proxy methods, and without having to write a "convenience" function that does that for me. [12:30] um [12:30] SteveA: the more general problem of making a decorating adapter [12:31] it is a special case where you want to adapt something to something else by decoration rather than simply adapting it to something totally different [12:31] there needs to be some way of doing that [12:31] and it should be explicit [12:31] that's what decorates() does [12:31] SteveA: but: [12:32] if you can think of a better way to do it, I'm interested to talk about that at the conference. [12:32] yeah, we should wait. i've got to head out soon. :) [12:32] keep notes, dude [12:32] we'll burn the whiteboards [12:32] (figuratively speaking) [12:32] heh [12:33] have a good tapas night. I'll be around much of tomorrow. [12:33] will do. :) when are you heading there, btw? [12:33] there, i.e. spain [12:34] leaving early sunday am [12:35] ah, ok. well if i don't catch you around tomorrow, then i'll see you in spain. :) [12:35] later all === BradB is now known as BradB|tapas [12:45] Merge to rocketfuel@canonical.com/launchpad--devel--0: Removing arch-tags.\nRemoving classmethod from TeamParticipation and adding TeamParticipationSet.\nAdding missing titles on foaf page templates.\nFixing some tests that will break after page template changes. (patch-942) === sabdfl [~mark@host217-37-231-28.in-addr.btopenworld.com] has joined #launchpad [01:26] does this error ring a bell for anyone? [01:26] ProgrammingError: ERROR: could not find tsearch config by locale [01:27] i have this in my postgresql.conf: [01:27] search_path = '$user,public,ts2' [01:28] ? [01:31] hmmm [01:31] tsearch? [01:32] let me see, let me see [01:35] ok, if I type locale on the machine that works I see a long list of things all = "C" [01:35] and on the machine that does not, en_GB [01:35] right [01:36] this has to do with the problem stub and BradB|tapas argued about yesterday [01:36] ok [01:36] the initdb should be run with language C, IIRC [01:36] and support for other languages only added to the databases that need it [01:36] must be related to the fact that this was a clean warty install, other one was a debina upgrade [01:36] debina - debian with a softer side [01:37] and the ex-debina box is working, or not? === kiko has a locale that says en_US everywhere [01:37] but my database server host doesn't -- it says POSIX [01:37] yes, ex-debina box works fine, with locale=C [01:38] so should i just reset my locale to C to get this to work? [01:38] how do i do that? [01:38] I haven't seen this problem, BUT [01:38] it should be a matter of running initdb again as postgres [01:38] you will nuke your existing databases AFAICR [01:40] there is mild googlage for the problem unfortunately [01:42] run it again? why would it be different this time? [01:42] would i have to change the locale to C? [01:43] yes, initdb but specifying C as the base database locale. [01:43] oddly enough, dpkg-reconfigure locale doesn't give me that option [01:43] but this is really a hunch. === sabdfl [~mark@host217-37-231-28.in-addr.btopenworld.com] has left #launchpad [] === sabdfl [~mark@host217-37-231-28.in-addr.btopenworld.com] has joined #launchpad [01:47] ok, i reset my locale without a default, it's POSIX, and postgres refuses to start altogether! [01:48] ah, will pick stub's brain in spain [01:49] the brain in spain waxes gamely on matters insane [01:49] night === sabdfl [~mark@host217-37-231-28.in-addr.btopenworld.com] has left #launchpad [] [01:50] heh === kiko is now known as kiko-afk === spiv [~andrew@adsl-66-203.swiftdsl.com.au] has joined #launchpad === stub [~stub@dsl-246.248.240.220.dsl.comindico.com.au] has joined #launchpad === sabdfl [~mark@host217-37-231-28.in-addr.btopenworld.com] has joined #launchpad [10:32] so any resolution to the C vs locale tsearch problems? === carlos [~carlos@69.Red-80-33-181.pooles.rima-tde.net] has joined #launchpad [12:26] sabdfl: looks like you didn't blow away and re-initialize your databases [12:27] I don't know the details, but I can probably find them in the logs in a few minutes [12:27] this issue is basically a real bastard. loads of complaints on the postgresql mailing lists. [12:33] sabdfl: I'm going to mail you a chatlog === kiko [~kiko@200-206-134-238.async.com.br] has joined #launchpad [12:35] 72 lines of kinnison and daf getting daf's database working again [12:36] wow [12:37] kiko: just mailed mark the chatlog of how to get postgres working when you have a non-boring locale === kiko chalks one more for the doc team [12:40] I think a bounty on a bug for the postgres developers would be better [12:41] the situation is just shitty [12:41] maybe it is something that can be solved in the packaging... === kiko looks at hoary people [12:41] so it asks you the right question when you install [12:41] SteveA, we have surprises for lunchpadders [12:42] you've been keeping us on tenter-hooks [12:42] tenter or tether? I don't know what that means, hold on [12:43] ah [12:43] A machine or frame for stretching cloth by means of hooks, [12:43] called tenter-hooks, so that it may dry even and square. [12:43] interesting [12:43] To be on the tenters, or on the tenter-hooks, to be on [12:43] the stretch; to be in distress, uneasiness, or suspense. [12:43] --Hudibras. [12:44] well [12:44] it's not a life-changing-experience but it's interesting even so [01:40] darn, i didn't see this mail from stevea [01:40] i got it working, but it was a real bitch [01:41] lots of jiggling of various voodoo [01:41] don't know if my solution was perfect but it worked [01:41] need to make your irc siren louder! [01:43] i think this is a packaging issue [01:43] because the initdb postgres command does let you pass --locale=C [01:44] that is a totally reasonable default === carlos [~carlos@69.Red-80-33-181.pooles.rima-tde.net] has joined #launchpad === kiko is now known as kiko-afk [03:51] sabdfl: Gina is cronned and running daily on mawson now ;-) [03:51] cool [03:51] thanks for putting in the catchup [03:51] Well, it wouldn't be fair not to [03:51] Thanks for letting me shift time around [03:51] are you 100% happy with the way it is creating the packages? [03:52] It's doing a bloody good job [03:52] cool [03:52] A few days into Mataro, when we have an import every day going nicely, we'll be able to see any problem areas [03:52] the cronjobs log everything [03:52] then next week, we can bring it up in production mode :-) [03:52] I believe the majority of any issues we'll have will be in universe [03:52] which worries me only very little [03:56] excellent! === Kinnison should go and pack === Kinnison has an offer of a spare bed in cambridge tonight so all is well === Kinnison will catch the 06:31 train to London === BradB|tapas is now known as BradB [03:56] and if we can get nicole running too, we will have a nicely populated database in relatively short order [03:56] That'd be very very cool [03:57] yo dudes! [03:58] hey brad === sabdfl is making rosetta look a little more presentable [03:58] BradB: ! === BradB does various last minute things before heading to the airport in a few hours [04:04] sabdfl: please don't change the new/edit potemplate forms [04:04] carlos: ok [04:04] they do need to be changed though :-) [04:04] sabdfl: I'm moving them to autogenerated forms [04:05] ok [04:05] sabdfl: which change do you want there? [04:05] we need to forget about the branch/path option for the moment, focus on uploaded po files# [04:05] we are not exposing that part in the forms... [04:05] it is currently exposed [04:06] hmmm only the path [04:06] right? [04:06] We don't have any code to handle branchs [04:07] yes [04:07] but, for the moment, we want those fields just set to NULL [04:08] pretend that the only way to use rosetta is uploading po templates and files [04:09] sabdfl: that's not possible because the current database model [04:09] sabdfl: do you want also database changes? [04:09] there are lots of NOT NULLS there [04:09] for branch, license and I think there are others not being used at the moment [04:31] sabdfl: Afaict, gina has problems with a total of 34 source packages out of the 8859 in hoary# [04:31] which I think is a damned good ratio [04:31] 0.38% [04:32] And it's quite possible that the failure is entirely due to version mismatches [04:32] still; we can go over them in Mataro === Kinnison has to go shopping now === Kinnison -> Ely [04:57] carlos: yes, lets get rid of those not nulls [04:58] ok === elmo [~james@82.211.81.249] has joined #launchpad === Kinnison back [06:00] Merge to thelove@canonical.com/bazaar--devo--1.1: make new-files header in import logs consistent with that in commit logs - bug #3589 (patch-27) [06:27] carlos: we need plural form data for all the languages in trusted.sql, and in dogfood and production [06:28] sabdfl: I know but we don't have a way to know that [06:28] we have a note in the website asking translators to give us that information [06:28] if we don't have it already [06:28] carlos: surely we can look at a bunch of PO files and add data for the typical case [06:28] we could try to guess it from nautilus or evolution [06:29] yeah, that's an option [06:29] i added a po template, then tried to translate it into Afrikaans and it says the system doesn't know about plural forms for Afrikaans [06:30] sabdfl: doesn't it gaves you information about how to send it? [06:30] I think it redirects you to the rosetta-users mailing list [06:30] yes, but that introduces a delay [06:30] or it should [06:30] I did a plural form editor form [06:30] we want to have a typical default stored for each language [06:30] so we could use it [06:31] sabdfl: the problem is that we need that they get validated [06:31] so say I want to start translating application Foo, and there is no pofile for foo, I just get the default plural form for that language [06:31] because for instance, the plural form for pt_BR are different from pt_PT [06:31] right, so we need a plural form for each of them [06:31] this was discussed in oxford [06:32] I know, and we have a default field already in the Language table [06:32] and it works the way you want [06:32] as long as we have defaults on that table [07:02] we need, as a matter of urgency, defaults for as many languages as possible in there [07:03] ok, will work on it [07:03] sabdfl: what's the best way to update that information in the database ? [07:16] carlos: because we are now in production mode it's best to work with stub on that [07:16] grab him monday and let's get that going [07:17] ok [07:18] carlos: are there any SQL db objects for Country and SpokenIn? [07:18] and Language? [07:19] ok, i see Language [07:19] what about Country and SpokenIn? [07:20] we are not using them at the moment [07:20] so I didn't wrote them [07:21] but I could do it easily if you need them === carlos sees his todo list grow :-D [07:21] no, i need them tonight [07:21] there's a bunch of functioanlity i thought we already had in rosetta [07:21] ok, let me take something to eat and will do it for you [07:21] i will code tonight and tomorrow on the way down there [07:22] no, it's ok, i know what i need [07:22] is the SpokenIn table properly full of data? [07:22] yes, it should [07:22] the tables have the data [07:23] ok [07:23] are you coming to Barcelona by car? [07:52] sabdfl: I have done those sqlobjects, just executing the tests and I will merge them into rocketfuel === ddaa [~ddaa@george.kkhotels.co.uk] has joined #launchpad [08:43] Merge to rocketfuel@canonical.com/launchpad--devel--0: Added Country SQLObject and enabled the pot submit when we create a new potemplate (patch-943) [09:17] emperor's going down [10:18] .. back. now mawson's going down [10:26] Merge to rocketfuel@canonical.com/launchpad--devel--0: comments.sql updated and done some code cleanup to reduce the code duplication (patch-944) [10:28] back