/srv/irclogs.ubuntu.com/2004/12/15/#launchpad.txt

SteveAI missed that you'd registered it for="IBugEditForm" earlier, rather than for="IBug"12:00
BradBSteveA: 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
BradBSteveA: yeah, i mentioned that on-channel12:01
SteveAif you register it for="IBugEditForm" then no adapter is required12:02
SteveAit just won't work12:02
SteveAbecause you don't have an IBugEditForm, you have an IBug12:02
SteveAtherefore, there is no +edit view12:02
BradBSteveA: without the for="" though, it gave the error12:02
SteveA(this would work differently in PEAK, btw)12:02
SteveAyes12:02
SteveAwithout the for=... it has no idea that you want this to be a view on an IBug12:03
BradBoh yeah...ugh, that was dumb12:03
SteveA(in PEAK, adapters are used automatically and transitively)12:04
SteveAdecorates() is in lib/canonical/lp/__init__.py12:04
BradBah, didn't know it was a launchpad thing12:05
SteveAyeah12:05
SteveAalthough it might end up in zope312:05
SteveAI think jim liked it12:06
SteveAand it would be easy to add a touch of C to make it really really fast12:06
SteveAsaves on boilerplate code when writing a certain kind of adapter12:06
SteveAbut keeps it explicit12:06
BradBsounds interesting.12:07
SteveAso, basically, you can say12:08
SteveAclass BugFormAdapterDeadChicken:12:08
SteveA    implements(IBugEditForm)12:08
SteveA    decorates(IBug)12:08
SteveA    def method_unique_to_IBugEditForm(self, whatever):12:09
SteveA        whatever12:09
SteveAcan't remember if you need an __init__ method or not12:09
SteveAyeah, you do need one12:10
SteveAexplicit being better than implicit12:10
SteveAsee the docstring / doctest for it12:10
BradBok12: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 = context12:10
SteveA          def methodFromRosettaProject(self):12:10
BradBi'm just about wrapping up today, but i'll pick this up in spain12:10
SteveA              return self.context.methodFromIProject()12:10
SteveA12:10
SteveAlike that12:10
SteveAok cool12:11
SteveAit is a dead chicken.12:11
SteveAbut, it should make things work12:11
SteveAwell -- maybe a zombie chicken12:11
BradByeah :)12:11
BradBthanks for your help. it's all clear now.12:13
BradBSteveA: so basically decorates just registers an adapter, from the thing being decorated, to the iface that the decorator implements, right?12:16
dilysMerge to rocketfuel@canonical.com/launchpad--devel--0: add subscription activity logging and fix a traversal bug (patch-941)12:20
SteveAno12:22
SteveAyou still need zcml to register an adapter12:22
SteveAdecorates() fills in the boilerplate of making a decorating adapter12:22
SteveAone where the majority of methods and attributes would just forward to the thing that is being adapted12:23
SteveAso, in the example above, I could write it out without using decorates(IProject)12:23
=== elmo is now known as elmo_away
SteveAbut for every method in IProject that I didn't want to do something special for, I'd have to write12:23
SteveA  def foo(self, bar):12:23
SteveA        return self.context.foo(bar)12:24
SteveAand similar shenanigans for properties and attributes12:24
SteveAit would look like shit, and be unclear exactly what has been added or overridden12:24
SteveAyou'd still need to register RosettaProject (in the example above) as an adapter12:25
SteveAin your case, of course, it would be as an adapter from IBug to IBugEditForm12:25
BradBhm12:26
BradBit's slightly weird, in a way12:26
SteveAwhich part?12:27
=== elmo [~james@83.216.141.215] has joined #launchpad
BradBbecause one would think that if I adapt to IFoo, I can only speak to the adapted thing as an IFoo.12:27
SteveAwell, if IFoo extends IProtoFoo, then you can speak to it as an IProtoFoo too12:27
SteveAbecause if it is an IFoo it must also be an IProtoFoo12:27
SteveAan IBugEditForm is an IBug12:28
SteveAan IRosettaProject (r.i.p.) is an IProject12:28
BradBSteveA: yes, but if IFoo extends it, then that makes sense that speaking IFoo, inherently (no pun intended) means speaking the base interface too12:28
SteveAare you talking about how the +edit view is connected to the IBug interface?12:29
SteveAif not, I'm confused about what point you are making12:29
BradBSteveA: I'm talking about the unfortunate necessity (or maybe not) of decorates as a solution.12:29
SteveAas a solution to to what exactly?  the editform problem?  or to making a decorating adapter?12:30
BradBI 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
SteveAum12:30
BradBSteveA: the more general problem of making a decorating adapter12:30
SteveAit is a special case where you want to adapt something to something else by decoration rather than simply adapting it to something totally different12:31
SteveAthere needs to be some way of doing that12:31
SteveAand it should be explicit12:31
SteveAthat's what decorates() does12:31
BradBSteveA: but:12:31
SteveAif you can think of a better way to do it, I'm interested to talk about that at the conference.12:32
BradByeah, we should wait. i've got to head out soon. :)12:32
SteveAkeep notes, dude12:32
SteveAwe'll burn the whiteboards12:32
SteveA(figuratively speaking)12:32
BradBheh12:32
SteveAhave a good tapas night.  I'll be around much of tomorrow.12:33
BradBwill do. :) when are you heading there, btw?12:33
BradBthere, i.e. spain12:33
SteveAleaving early sunday am12:34
BradBah, ok. well if i don't catch you around tomorrow, then i'll see you in spain. :)12:35
BradBlater all12:35
=== BradB is now known as BradB|tapas
dilysMerge 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
sabdfldoes this error ring a bell for anyone?01:26
sabdflProgrammingError: ERROR:  could not find tsearch config by locale  01:26
sabdfli have this in my postgresql.conf:01:27
sabdflsearch_path = '$user,public,ts2'01:27
sabdfl?01:28
kikohmmm01:31
kikotsearch?01:31
kikolet me see, let me see01:32
sabdflok, if I type locale on the machine that works I see a long list of things all = "C"01:35
sabdfland on the machine that does not, en_GB01:35
kikoright01:35
kikothis has to do with the problem stub and BradB|tapas argued about yesterday01:36
sabdflok01:36
kikothe initdb should be run with language C, IIRC01:36
kikoand support for other languages only added to the databases that need it01:36
sabdflmust be related to the fact that this was a clean warty install, other one was a debina upgrade01:36
sabdfldebina - debian with a softer side01:36
kikoand the ex-debina box is working, or not? 01:37
=== kiko has a locale that says en_US everywhere
kikobut my database server host doesn't -- it says POSIX01:37
sabdflyes, ex-debina box works fine, with locale=C01:37
sabdflso should i just reset my locale to C to get this to work?01:38
sabdflhow do i do that?01:38
kikoI haven't seen this problem, BUT01:38
kikoit should be a matter of running initdb again as postgres01:38
kikoyou will nuke your existing databases AFAICR01:38
kikothere is mild googlage for the problem unfortunately01:40
sabdflrun it again? why would it be different this time?01:42
sabdflwould i have to change the locale to C?01:42
kikoyes, initdb but specifying C as the base database locale.01:43
sabdfloddly enough, dpkg-reconfigure locale doesn't give me that option01:43
kikobut 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
sabdflok, i reset my locale without a default, it's POSIX, and postgres refuses to start altogether!01:47
sabdflah, will pick stub's brain in spain01:48
sabdflthe brain in spain waxes gamely on matters insane01:49
sabdflnight01:49
=== sabdfl [~mark@host217-37-231-28.in-addr.btopenworld.com] has left #launchpad []
kikoheh01: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
sabdflso 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
SteveAsabdfl: looks like you didn't blow away and re-initialize your databases12:26
SteveAI don't know the details, but I can probably find them in the logs in a few minutes12:27
SteveAthis issue is basically a real bastard.  loads of complaints on the postgresql mailing lists.12:27
SteveAsabdfl: I'm going to mail you a chatlog12:33
=== kiko [~kiko@200-206-134-238.async.com.br] has joined #launchpad
SteveA72 lines of kinnison and daf getting daf's database working again12:35
kikowow12:36
SteveAkiko: just mailed mark the chatlog of how to get postgres working when you have a non-boring locale12:37
=== kiko chalks one more for the doc team
SteveAI think a bounty on a bug for the postgres developers would be better12:40
SteveAthe situation is just shitty12:41
SteveAmaybe it is something that can be solved in the packaging...12:41
=== kiko looks at hoary people
SteveAso it asks you the right question when you install12:41
kikoSteveA, we have surprises for lunchpadders12:41
SteveAyou've been keeping us on tenter-hooks12:42
kikotenter or tether? I don't know what that means, hold on12:42
kikoah12: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
kikointeresting12:43
SteveA   To be on the tenters, or on the tenter-hooks, to be on12:43
SteveA      the stretch; to be in distress, uneasiness, or suspense.12:43
SteveA      --Hudibras.12:43
kikowell12:44
kikoit's not a life-changing-experience but it's interesting even so12:44
sabdfldarn, i didn't see this mail from stevea01:40
sabdfli got it working, but it was a real bitch01:40
sabdfllots of jiggling of various voodoo01:41
sabdfldon't know if my solution was perfect but it worked01:41
SteveAneed to make your irc siren louder!01:41
sabdfli think this is a packaging issue01:43
sabdflbecause the initdb postgres command does let you pass --locale=C01:43
SteveAthat is a totally reasonable default01:44
=== carlos [~carlos@69.Red-80-33-181.pooles.rima-tde.net] has joined #launchpad
=== kiko is now known as kiko-afk
Kinnisonsabdfl: Gina is cronned and running daily on mawson now ;-)03:51
sabdflcool03:51
sabdflthanks for putting in the catchup03:51
KinnisonWell, it wouldn't be fair not to03:51
KinnisonThanks for letting me shift time around03:51
sabdflare you 100% happy with the way it is creating the packages?03:51
KinnisonIt's doing a bloody good job03:52
sabdflcool03:52
KinnisonA few days into Mataro, when we have an import every day going nicely, we'll be able to see any problem areas03:52
Kinnisonthe cronjobs log everything03:52
sabdflthen next week, we can bring it up in production mode :-)03:52
KinnisonI believe the majority of any issues we'll have will be in universe03:52
Kinnisonwhich worries me only very little03:52
sabdflexcellent!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
sabdfland if we can get nicole running too, we will have a nicely populated database in relatively short order03:56
KinnisonThat'd be very very cool03:56
BradByo dudes!03:57
Kinnisonhey brad03:58
=== sabdfl is making rosetta look a little more presentable
sabdflBradB: !03:58
=== BradB does various last minute things before heading to the airport in a few hours
carlossabdfl: please don't change the new/edit potemplate forms04:04
sabdflcarlos: ok04:04
sabdflthey do need to be changed though :-)04:04
carlossabdfl: I'm moving them to autogenerated forms04:04
sabdflok04:05
carlossabdfl: which change do you want there?04:05
sabdflwe need to forget about the branch/path option for the moment, focus on uploaded po files#04:05
carloswe are not exposing that part in the forms...04:05
sabdflit is currently exposed04:05
carloshmmm only the path04:06
carlosright?04:06
carlosWe don't have any code to handle branchs04:06
sabdflyes04:07
sabdflbut, for the moment, we want those fields just set to NULL04:07
sabdflpretend that the only way to use rosetta is uploading po templates and files04:08
carlossabdfl: that's not possible because the current database model04:09
carlossabdfl: do you want also database changes?04:09
carlosthere are lots of NOT NULLS there04:09
carlosfor branch, license and I think there are others not being used at the moment04:09
Kinnisonsabdfl: Afaict, gina has problems with a total of 34 source packages out of the 8859 in hoary#04:31
Kinnisonwhich I think is a damned good ratio04:31
Kinnison0.38%04:31
KinnisonAnd it's quite possible that the failure is entirely due to version mismatches04:32
Kinnisonstill; we can go over them in Mataro04:32
=== Kinnison has to go shopping now
=== Kinnison -> Ely
sabdflcarlos: yes, lets get rid of those not nulls04:57
carlosok04:58
=== elmo [~james@82.211.81.249] has joined #launchpad
=== Kinnison back
dilysMerge 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
sabdflcarlos: we need plural form data for all the languages in trusted.sql,  and in dogfood and production06:27
carlossabdfl: I know but we don't have a way to know that06:28
carloswe have a note in the website asking translators to give us that information06:28
carlosif we don't have it already06:28
sabdflcarlos: surely we can look at a bunch of PO files and add data for the typical case06:28
carloswe could try to guess it from nautilus or evolution06:28
carlosyeah, that's an option06:29
sabdfli added a po template, then tried to translate it into Afrikaans and it says the system doesn't know about plural forms for Afrikaans06:29
carlossabdfl: doesn't it gaves you information about how to send it?06:30
carlosI think it redirects you to the rosetta-users mailing list06:30
sabdflyes, but that introduces a delay06:30
carlosor it should06:30
carlosI did a plural form editor form06:30
sabdflwe want to have a typical default stored for each language06:30
carlosso we could use it06:30
carlossabdfl: the problem is that we need that they get validated06:31
sabdflso say I want to start translating application Foo, and there is no pofile for foo, I just get the default plural form for that language06:31
carlosbecause for instance, the plural form for pt_BR are different from pt_PT06:31
sabdflright, so we need a plural form for each of them06:31
sabdflthis was discussed in oxford06:31
carlosI know, and we have a default field already in the Language table06:32
carlosand it works the way you want06:32
carlosas long as we have defaults on that table06:32
sabdflwe need, as a matter of urgency, defaults for as many languages as possible in there07:02
carlosok, will work on it07:03
carlossabdfl: what's the best way to update that information in the database ?07:03
sabdflcarlos: because we are now in production mode it's best to work with stub on that07:16
sabdflgrab him monday and let's get that going07:16
carlosok07:17
sabdflcarlos: are there any SQL db objects for Country and SpokenIn?07:18
sabdfland Language?07:18
sabdflok, i see Language07:19
sabdflwhat about Country and SpokenIn?07:19
carloswe are not using them at the moment07:20
carlosso I didn't wrote them07:20
carlosbut I could do it easily if you need them07:21
=== carlos sees his todo list grow :-D
sabdflno, i need them tonight07:21
sabdflthere's a bunch of functioanlity i thought we already had in rosetta 07:21
carlosok, let me take something to eat and will do it for you07:21
sabdfli will code tonight and tomorrow on the way down there07:21
sabdflno, it's ok, i know what i need07:22
sabdflis the SpokenIn table properly full of data?07:22
carlosyes, it should07:22
carlosthe tables have the data07:22
sabdflok07:23
carlosare you coming to Barcelona by car?07:23
carlossabdfl: I have done those sqlobjects, just executing the tests and I will merge them into rocketfuel07:52
=== ddaa [~ddaa@george.kkhotels.co.uk] has joined #launchpad
dilysMerge 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
elmoemperor's going down09:17
elmo.. back. now mawson's going down10:18
dilysMerge to rocketfuel@canonical.com/launchpad--devel--0: comments.sql updated and done some code cleanup to reduce the code duplication (patch-944)10:26
elmoback10:28

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