/srv/irclogs.ubuntu.com/2009/12/11/#launchpad-dev.txt

spmbac: sinzui: heyo (sorry was driving up to sydney) did you still need me to apply something?01:19
jmlwuu Sydney01:25
thumper\o/ bzr-svn success https://code.staging.launchpad.net/~thumper/pydoctor/bzr-svn01:29
jmlthumper, excellent :)01:36
thumperspm: hey, can losas turn a project into a project group?01:39
=== MTecknology is now known as MTeck-ricer
spmthumper: I believe so. not sure the rules around that atm...03:40
spmthumper: huh, chr can do them now as well.03:41
* jml is back03:46
bacthumper, spm: you cannot convert a project into a project group.  CHR can now create project groups but the name must be free already, i.e. project of same name cannot exist04:03
spmahh. ta, thanks bac04:04
thumperbac: it would be pretty cool to have a script that renames the project, makes the project group and copies across descriptions and things like that04:04
* thumper EODs05:35
jmlthumper, g'night.05:36
jmlg'night all05:50
=== noodles775_ is now known as noodles775
adeuringgood morning08:20
=== danilo-bblot is now known as danilos
mrevellMornin' all09:10
adiroibanhenninge: hi, is there a page listing all templates in Launchpad with the same name? I'm working at bug 435165 and beside a link to other templates from the source package, I would like to add a link to all templates with the same (if there is such page)10:14
mupBug #435165: Make it easier to navigate to the full list of templates in source packages <trivial> <ui> <Launchpad Translations:In Progress by adiroiban> <https://launchpad.net/bugs/435165>10:14
henningeadiroiban: no, there is no such page.10:15
henningeadiroiban: but I know that on a templates page there is a list with links to templates with the same name.10:16
henninge* a template's page *10:16
adiroibanhenninge: yes... but i think only first 4 tempaltes are listed10:16
henningeadiroiban: sure but it means that there is already such a query in the code. You could make the limit optional.10:17
adiroibanhenninge: :) I don't like options :) ... there is still the UI problem how to display 30 templates10:21
adiroibanhenninge: I think i will just go with solving that bug :)10:22
adiroibanwithout other changes10:22
bigjoolswgrant: did you see a  build go through on DF of a 3.0 package?10:29
wgrantbigjools: I didn't. Is the builder fixed?10:34
bigjoolsshould be10:34
wgrantbigjools: lamont suggested it wouldn't be done until today or Monday.10:35
wgrantbigjools: (lp-buildd needs patching for Karmic's dpkg)10:35
bigjoolsmmm oh, I thought he said he'd done it10:35
* wgrant retries.10:36
henningeI think I have seen "AttributeError: 'thread._local' object has no attribute 'interaction'" before but cannot remember what is missing here: http://paste.ubuntu.com/339130/10:37
wgranthenninge: You're not logged in.10:37
henningeAnybody got an idea?10:37
henningeargh!10:37
henningethanks wgrant, now I remember10:38
henninge;)10:38
bigjoolswgrant: "Couldn't find directory of bar_1.0-1.dsc in dpkg-source output"10:41
wgrantbigjools: Yep, that's the bug.10:44
wgrant(and as you can probably see, I forgot to flip it back to manual in time. oops)10:44
bigjoolswgrant: that's what happens without the right dpkg?10:44
wgrantbigjools: dpkg-source's output changed in Karmic.10:44
* wgrant finds the bug.10:44
bigjoolsah10:45
wgranthttps://bugs.edge.launchpad.net/launchpad-buildd/+bug/47603610:45
deryckMorning, all.11:00
bigjoolswgrant: I am going to bash a load of builds through DF to stress test some stuff, I'll need to make the builder auto again11:08
bigjoolsmorning deryck11:08
wgrantbigjools: But the builder does not work (even for 1.0 sources)11:08
bigjoolswgrant: oh, fuck sake11:08
bigjoolsthis is not good11:08
bigjoolspqm closes today and I need to QA stuff11:09
wgrantbigjools: The fixes are trivial, if you can get a sysadmin to either alter the regexps as lamont says, or downgrade dpkg11:09
noodles775bigjools: closes on Sunday I think, but not much different.11:09
bigjoolsnoodles775: I worked every waking hour this week already, I don't want to work the weekend too :)11:10
noodles775totally. I was just clarifying when pqm closes :)11:10
=== matsubara-afk is now known as matsubara
lamontwgrant: applied, fwiw12:02
* bigjools will test it when dogfood decides to wake up12:05
bigjoolswhy does FF have to reload a page when going back one in the history.... ridiculous12:06
lamont"work offline", "back", "work online" maybe?12:07
bigjoolsapt-get install chromium maybe ;)12:10
bigjoolswell, not the game12:11
=== henninge is now known as henninge-lunch
=== mrevell is now known as mrevell-lunch
=== henninge-lunch is now known as henninge
henningesinzui: Hi!13:19
=== mrevell-lunch is now known as mrevell
sinzuihi henninge13:55
henningesinzui: ping, again14:13
sinzuihello14:13
henningeHi14:13
henningesinzui: I am not sure if I missunderstood something or if I just haven't grasped the workings of the zope/LP security system yet.14:14
henningesinzui: but I am stuck and I wondered if you could help me.14:14
sinzuiI hope I can14:14
sinzuiyou want to give ~registry launchpad.Edit on IAccount so that the status can be set to SUSPENDED?14:15
henningeI guess. Here is what I have done so far: http://paste.ubuntu.com/339233/14:16
henningesinzui: what did we plan to use launchpad.Moderate for, then?14:16
henningesinzui: so far I am only dealing with views14:17
henningethe page test is failing14:17
henningelike this: http://paste.ubuntu.com/339192/14:18
sinzuihenninge: That was flacoste's suggestion. To introduce a new permission, you need to modify the IAccount interface, separate the items you want ~regisrty to manage to a new interface. Add the new permissing and interface to the ZCML14:18
sinzuihenninge: the paste looks like the ZCML rules are missing14:19
henningesinzui: I only changed ther permission for +reviewaccount14:20
sinzuibut not the underlying object14:20
henningeyes, the zcml requires lp.Edit for IAccount.14:21
sinzuiyou can load that view so long as the code/template does not access the attributes14:21
henningeI am trying to understand the error message14:21
henningeIt says "launchpad.Moderate" is required to access this view but you don't have that.14:22
henningeright?14:22
sinzuiThe last text of the last line indeed says that14:22
sinzuiHenning add this to account.zcml14:23
sinzui        <require14:23
sinzui            permission="launchpad.moderate"14:23
sinzui            interface="canonical.launchpad.interfaces.IAccountPublic" />14:23
sinzuioop14:23
sinzuido not do that14:23
sinzuiSeparate the attributes that you want ~registry to manage to an new interface named IAccountModerate, and add this to ZCML.14:25
sinzui        <require14:25
sinzui            permission="launchpad.Moderate"14:25
sinzui            interface="canonical.launchpad.interfaces.IAccountModerate" />14:25
henningesinzui: don't I need a new interf...14:25
henningeah, yes14:25
henningesinzui: ok, I will do that.14:26
henningebut what about the error message?14:26
henningeIf that was the problem here, I'd expect a message about IAcount, not about the view.14:26
sinzuihenninge: the message says there is no launchapd.Moderation14:26
henningeso, the view is for IPerson, requiring launchpad.Moderate14:27
henningedoesn't ModeratePerson in security.py apply to that?14:28
sinzuihenninge: It might be. Accounts are not exposed in the UI, and we do not want to.14:28
sinzuihenninge: the first thing  you should be doing is testing the redefinition of the intreface in doc and unit tests. You got ahead of yourself14:29
henningesinzui: I see.14:29
henningeok, let me do that and then we take it from there14:29
flacostemorning launchpadders14:30
abentleyderyck: lib/lp/bugs/tests/../doc/bug.txt is failing for me on an unmodified copy of stable.  Any ideas? http://pastebin.ubuntu.com/339243/14:33
* deryck looks14:34
abentleyderyck: test_bugs_webservice is also failing: http://pastebin.ubuntu.com/339246/14:37
deryckabentley, no idea what that's about.  pulling a copy of stable, too.14:37
derycklooks like sample data is out of sync with the test maybe.  those look like sample data-based tests to me.14:38
abentleyderyck: I ran make schema earlier, but I'll run it again.14:41
=== salgado is now known as salgado-lunch
abentleyderyck: Yeah, make schema didn't help.14:43
deryckabentley, yeah, they fail for me too in stable.  I can look into it, but it will have to wait a bit.  Have a call coming up.14:56
BjornT_gary_poster: maybe you could review a small patch? https://code.edge.launchpad.net/~bjornt/launchpad/bug-495397/+merge/1600714:56
abentleyderyck: Thanks for looking into it.14:56
deryckabentley, np14:56
gary_posterBjornT_: looking14:56
adiroibanis there a way to see exceptions from a view method?15:07
adiroibanI can see LocationError but I don't know why15:08
henningesinzui: I had to move things around in IAccount* to accomodate for the fact that status is part of two interfaces. http://paste.ubuntu.com/339260/15:09
sinzuiCorrect. You do need to do that15:10
matsubarasinzui, let me know when finish editing LaunchpadTestPlan/3.1.1215:11
matsubaraplease15:11
sinzuimatsubara: done15:11
sinzuihenninge: I am surprised this works. I recall that the ZCML validator will scream if there are two permission for an attribute.15:15
matsubarathanks sinzui15:15
henningesinzui: it still does :(15:17
sinzuihenninge: I recall needing to ensure an attribute was listed just once, then updating the permission checkers in security.py to to ensure that each level of responsibility was included eg, launchpad.Moderate must  allow the owner and admin to change them too15:17
=== matsubara is now known as matsubara-lunch
=== beuno is now known as beuno-lunch
=== henninge is now known as henninge-brb
=== salgado-lunch is now known as salgado
=== henninge-brb is now known as henninge
henningesinzui: verifyObject is failing for IAccount. I don't kno why it does not see the Attributes from IAccountModerated.16:12
sinzuiinteresting16:13
henningehttp://paste.ubuntu.com/339309/16:13
sinzuistatus_comment is defined in IAccountModerated?16:14
henningesinzui: I think the checkers are ok : http://paste.ubuntu.com/339313/16:14
henningesinzui: yes16:14
sinzuihmm that is bad16:14
sinzuiModerateAccount must check for registry_expert(user) , edit must check be admin. I think you need to revert EditAccount16:15
sinzuihenninge: my recommendation to change EditAccount was based on giving ~registry Edit. Since you create Moderate, we need separate checking rules16:16
sinzuihenninge: I think the error you are seeing relates to the interface and zcml. Can I see those16:17
henningesinzui: but isn't the current situation more permissive to when I change it16:17
henninge?16:17
sinzuihenninge: whay are you creating Moderate when Launchpad.Edit uses is_admin_or_registry_expert(user)16:17
henningesinzui: lp:~henninge/launchpad/bug-495126-deactivate-users16:18
henningecodebrowse is down ...16:18
henningelet me paste it16:18
henningesinzui: account.zcml http://paste.ubuntu.com/339317/16:20
henningesinzui: interfaces http://paste.ubuntu.com/339320/16:21
sinzuihenninge: revert EditAccount. Those rules are not changing because you are creating launchpad.Moderate. ModerateAccount checks uses is_admin_or_registry_expert(user) . In fact, I think ModerateAccount() may look exactly like how you wrote EditAccount16:23
sinzuihenninge: As I said earlier, I do not think you can have IAccountStatus because you are defining it twice. That look wrong and I recall ZCML will hate you for it16:25
henningesinzui: no, the current setup doesn't.16:25
henningesinzui: IAccountEdit and IAccountModerate don't share any attributes.16:26
henningesinzui: that is what zcml was complaining about in the first version I did.16:26
sinzuihenninge: IAccountPublic and IAccountModerate both have status, then you give it to IAccount16:27
sinzuiso Iaccount has status, but two permission rules for it16:27
=== matsubara-lunch is now known as matsubara
henningeIAccount does not inherit from IAccountPublic but from IAccountBase16:28
henningethere is one rule for reading and one for setting16:28
henningesinzui: found it!16:29
henningesinzui: there is no read rule for the two attributes in IAccountModerate, only a set rule.16:30
sinzuihenninge: yes I see that.16:30
henningesinzui: test is passing now again, all is well. But interfaces/account.py has gained some weight.16:43
=== beuno-lunch is now known as beuno
sinzuihenninge: There are several unreviewed projects that were setup by spammers17:10
henningesinzui: I did not get to reviewing projects this week, I am sorry17:11
sinzuiNo one has reviewed projects for several weeks. there are about 450 projects17:11
* sinzui approves the obvious ones so that only the challenging ones need review.17:12
DavieyHey, i'm interested in adding a boolean people[].mugshot.isValid to the API - to return if there is a mugshot for that person/team?  Does anyone have any guidance17:23
Davieyafaics it's currently only possible by using .open()17:24
Davieywhich is less than ideal, because it looks like it downloads the image17:24
beunoDaviey, sinzui can probably give you a nod17:25
Davieysinzui: ping ^^17:26
sinzuiDaviey: we do not *add* to the API, We expose what is there. So the questions we ask it does the application need to know this, and if so add it. Otherwise we make changes to the application so that users get that information some other way, Do you want to do this because mugshot blows up when you try to get it?17:28
Davieysinzui: I just want a sane way to find out if a person/team has a mugshot or not :(17:28
Davieyprogramtically17:29
beunoisn't there such logic in Launchpad today?17:29
Davieybeuno: i've spent quite alot of time trying to find out.. i'll be really pleased if you know of one :)17:30
beunoDaviey, I don't, but Launchpad finds out somehow, so either that needs to be exposed, or something needs to be created17:31
sinzuiDaviey: In python we would test for this by17:31
sinzui    if person.mugshot:17:31
sinzuior to be pedantic17:31
sinzui    if person.mugshot is None:17:31
sinzuiDaviey: I think the problem is not that you cannot know that the user has a mugshot, but that there is a problem in how it was exposed: bug 33694317:34
mupBug #336943: requesting user's mugshot via api OOPS when user is using the default one <api> <registry-people> <Launchpad Registry:Triaged> <https://launchpad.net/bugs/336943>17:34
Davieysinzui: I was just testing the above code, for a moment i was feeling rather silly.17:34
sinzuiDaviey: The logic should return None instead of dying17:34
sinzuiI do not think Launchpad should return the default url when there is none.17:35
Davieysinzui: what i'm currently doing is try mugshot.open(), catch HTTPError17:35
Davieywhich makes me feel very dirty.17:35
=== deryck is now known as deryck[lunch]
sinzuiDaviey: I agree. I do not know what is going. The API uses this:17:37
sinzuihttp://pastebin.ubuntu.com/339365/17:37
Davieyhmm17:40
sinzuiDaviey: I think the problem is in lib/canonical/launchpad/fields/__init__py I see BaseImageUpload requires default_image_resource to be set...but never uses it!17:42
Davieysinzui: You obviously know this better than i do, but would that cause a BOOM?  Having data that isn't used?17:44
Davieylaunchpad web app looks like it uses default_image_resource17:45
sinzuiWell if the default is not being used, the field is processing None, which will cause an error. I think the field should check that there is an image to work. If there is not one, return the default17:46
Davieysinzui: Is this something you'll have time to work on, or should i look at trying to submit it myself?17:49
sinzuiDaviey: I do not see a test that shows that the mugshot attribute works when access via the API. A test of any test user will work since non have mugshots set17:49
sinzuiI do not have time to work on it. That is why the bug is low17:49
Daviey>>> people['davewalker'].mugshot17:49
Daviey<lazr.restfulclient.resource.HostedFile object at 0xa8d130c>17:49
DavieyI have no mugshot17:50
Davieysinzui: thanks for your time17:53
=== EdwinGrubbs is now known as Edwin-lunch
sinzuiDaviey: I updated bug 336943 with my thoughts17:57
mupBug #336943: requesting user's mugshot via api OOPS when user is using the default one <api> <registry-people> <Launchpad Registry:Triaged> <https://launchpad.net/bugs/336943>17:57
Daviey\o/17:58
sinzuiChex: ping18:26
Chexsinzui: hello there18:31
=== deryck[lunch] is now known as deryck
marsoops.  launchpadlib threw up when I ran the simple example on the wiki :(19:13
adiroibanwhen doing pagetest, and using find_tag_by_id, is there a function for getting links withing that tag?19:13
adiroibanlike browser.getLink?19:14
marsadiroiban, it uses beautiful soup under the hood, and soup can do that, so maybe check the find_tag_by_id() function definition.19:14
maxbmars: Here's my personal gathering of things I've played around with launchpadlib: http://paste.ubuntu.com/339440/ - hope it's useful19:45
marsmaxb, thanks19:45
marsturns out it was my user pythonpath being loaded over the system libraries19:46
marsnice19:46
marsexcellent!  you can pull raw API JSON using a call launchpad._browser.get()19:56
=== matsubara is now known as matsubara-afk
=== salgado is now known as salgado-afk
=== EdwinGrubbs_ is now known as EdwinGrubbs
=== fjlacoste is now known as flacoste

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