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